You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
MINOR: clarify message ordering with max in-flight requests and idempotent producer (#10690)
The docs for the max.in.flight.requests.per.connection and enable.idempotence configs currently imply that setting the max in-flight request greater than 1 will break the message ordering guarantee, but that is only true if enable.idempotence is false. When using an idempotent producer, the max in-flight request can be up to 5 without re-ordering messages.
Reviewers: Matthias J. Sax <[email protected]>, Ismael Juma <[email protected]>, Luke Chen <[email protected]>
privatestaticfinalStringMAX_IN_FLIGHT_REQUESTS_PER_CONNECTION_DOC = "The maximum number of unacknowledged requests the client will send on a single connection before blocking."
203
-
+ " Note that if this setting is set to be greater than 1 and there are failed sends, there is a risk of"
204
-
+ " message re-ordering due to retries (i.e., if retries are enabled).";
203
+
+ " Note that if this config is set to be greater than 1 and <code>enable.idempotence</code> is set to false, there is a risk of"
204
+
+ " message re-ordering after a failed send due to retries (i.e., if retries are enabled).";
publicstaticfinalStringENABLE_IDEMPOTENCE_DOC = "When set to 'true', the producer will ensure that exactly one copy of each message is written in the stream. If 'false', producer "
248
248
+ "retries due to broker failures, etc., may write duplicates of the retried message in the stream. "
249
-
+ "Note that enabling idempotence requires <code>" + MAX_IN_FLIGHT_REQUESTS_PER_CONNECTION + "</code> to be less than or equal to 5, "
250
-
+ "<code>" + RETRIES_CONFIG + "</code> to be greater than 0 and <code>" + ACKS_CONFIG + "</code> must be 'all'. If these values "
251
-
+ "are not explicitly set by the user, suitable values will be chosen. If incompatible values are set, "
252
-
+ "a <code>ConfigException</code> will be thrown.";
249
+
+ "Note that enabling idempotence requires <code>" + MAX_IN_FLIGHT_REQUESTS_PER_CONNECTION + "</code> to be less than or equal to 5 "
250
+
+ "(with message ordering preserved for any allowable value), <code>" + RETRIES_CONFIG + "</code> to be greater than 0, and <code>"
251
+
+ ACKS_CONFIG + "</code> must be 'all'. If these values are not explicitly set by the user, suitable values will be chosen. If incompatible "
252
+
+ "values are set, a <code>ConfigException</code> will be thrown.";
0 commit comments