confluent-kafka message timeout: delivery.timeout.ms vs message.timeout.ms
Codemia Knowledge Hub ·
In confluent-kafka-dotnet (and the other Confluent clients built on librdkafka), a produced message times out when it is not delivered within message.timeout.ms, which defaults to 300,000 ms (5 minutes) and includes retries. delivery.timeout.ms is an alias for the same setting, not a separate limit. request.timeout.ms and retry.backoff.ms shape what happens inside that window.
confluent-kafka-dotnet is the Kafka client for .NET designed and maintained by Confluent. Timeouts can affect consumers too, but they show up most often on the producer.
The producer timeout settings
message.timeout.ms: how long the client waits for a message to be acknowledged by the broker, including retries, before it reports an error. Default 300,000 ms (5 minutes).delivery.timeout.ms: an alias formessage.timeout.msin librdkafka. It sets the upper bound on the time to report success or failure of a send.request.timeout.ms: the ack timeout of a single produce request. The broker enforces it, and it applies only whenacksis not 0. A request that times out can be retried whilemessage.timeout.mshas time left.retry.backoff.ms: how long the producer waits before retrying a failed send, which can help under load or partial outages.
| Configuration | Default Value (ms) | Description |
message.timeout.ms | 300000 | Max time producer will wait for message acknowledgment |
request.timeout.ms | 30000 | Max time for request response before timeout |
delivery.timeout.ms | 300000 | Alias for message.timeout.ms |
retry.backoff.ms | 100 | Wait time before retrying a failed send |
Configuring the producer in C#
When delivery does not succeed in time, ProduceAsync throws a ProduceException, and e.Error.Reason says why. ProducerConfig exposes this limit as MessageTimeoutMs. delivery.timeout.ms is only an alias for it, so configure one name, not both.
Dealing with timeout errors
Timeout errors are usually transient. Adjusting these settings or adding resources (network bandwidth, broker capacity) often resolves them. Errors that persist usually point to an underlying problem such as a network partition or a failed broker.
Practices that reduce timeouts
- Monitor Kafka, your applications and the network, which catches many issues early.
- Use retries with idempotent producers so messages are not lost and failures do not flood the network.
- Test failure scenarios to see how the system reacts and whether your timeout values hold up under different conditions.
Related reading
- Kafka - Consumer group creation with specific offset?
- Kafka - Consumers with different speeds
- Kafka - Could not find a 'KafkaClient' entry in the JAAS configuration java
- Kafka - Delayed Queue implementation using high level consumer
- Kafka Confluent error - java.net.BindException Address already in use
- Kafka consumer startup delay confluent dotnet
- Kafka - Deserializing the object in Consumer
- Kafka - difference between Log end offset(LEO) vs High Watermark(HW)
System design interview problems on this topic
- Design a Distributed Messaging System: solution and walkthrough
- Design a Log Collection and Analysis System: solution and walkthrough
- Design an Ad Click Aggregation System: solution and walkthrough
- Design a Webhook Notification Service: solution and walkthrough

System Design Fundamentals
Build a strong foundation in designing scalable, reliable distributed systems.
View the courseSystem Design practice on Codemia
Work through 120+ system design problems with detailed solutions, from rate limiters to multi-region storage.