IntermediateInternals
What is the significance of max.in.flight.requests.per.connection in relation to ordering?
Reference answer
max.in.flight.requests.per.connection is the maximum number of unacknowledged requests the client will send on a single connection before blocking (default 5). If it is greater than 1 and enable.idempotence is false, there is a risk of message reordering after a failed send: if two batches go to the same partition and the first fails and is retried while the second succeeds, the records in the second batch may appear first. Ordering is preserved if retries are disabled or if enable.idempotence is true. Idempotence is enabled by default (if no conflicting settings are made) and requires this value to be at most 5, because the broker retains only 5 batches for each producer; with idempotence on, any allowed value keeps ordering. For a non-idempotent producer, the options are to keep the value at 1 (at the cost of fewer pipelined requests) or to disable retries.
Expected key concepts: max.in.flight.requests.per.connection, ordering, retries, reordering, enable.idempotence, unacknowledged, partition, batches, default 5
How did that feel?
Your own verdict, not the score. It shows up next to this question in the list, so you can come back to the shaky ones.