mirror of https://github.com/apache/kafka.git
MINOR: Bump the request timeout for the transactional message copier
Multiple inflights means that when there are rolling bounces or other cluster instability, there is an increased likelihood of having previously tried batch expire in the accumulator. This is a fatal error for a transactional producer, causing the `TransactionalMessageCopier` to exit. To work around this, we bump the request timeout. We can get rid of this when KIP-91 is merged. Author: Apurva Mehta <apurva@confluent.io> Reviewers: Jason Gustafson <jason@confluent.io> Closes #4039 from apurvam/MINOR-bump-request-timeout-in-transactional-message-copier
This commit is contained in:
parent
31fe1f98e2
commit
34188b4cc4
|
@ -155,6 +155,12 @@ public class TransactionalMessageCopier {
|
|||
props.put(ProducerConfig.BATCH_SIZE_CONFIG, "512");
|
||||
props.put(ProducerConfig.MAX_IN_FLIGHT_REQUESTS_PER_CONNECTION, "5");
|
||||
|
||||
// Multiple inflights means that when there are rolling bounces and other cluster instability, there is an
|
||||
// increased likelihood of having previously tried batch expire in the accumulator. This is a fatal error
|
||||
// for a transaction, causing the copier to exit. To work around this, we bump the request timeout.
|
||||
// We can get rid of this when KIP-91 is merged.
|
||||
props.put(ProducerConfig.REQUEST_TIMEOUT_MS_CONFIG, "60000");
|
||||
|
||||
return new KafkaProducer<>(props);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue