Breaking News: Grepper is joining You.com. Read the official announcement!
Check it out

Ordering guarantee#

Sumit Rawal answered on May 31, 2023 Popularity 1/10 Helpfulness 1/10

Contents


More Related Answers


Ordering guarantee#

0

An interesting situation arises when the retries is set to non-zero and the max.in.flight.requests.per.connection is greater than one. This allows the producer to send out more than one batch of messages without having received acknowledgements for any. Consider the following scenario:

Two batches of messages are sent, one after another, destined for the same partition.

The first batch of messages fails to be written successfully at the Kafka broker.

The second batch gets written successfully.

The producer retries sending the first batch again which gets written successfully this time.

The consequence is that the ordering of messages isn’t preserved within the partition, which can be a critical requirement for some applications. In such situations max.in.flight.requests.per.connection should be set to 1, though it will severely impact the throughput of the producer.

Popularity 1/10 Helpfulness 1/10 Language whatever
Source: Grepper
Tags: whatever
Link to this answer
Share Copy Link
Contributed on May 31 2023
Sumit Rawal
0 Answers  Avg Quality 2/10

Closely Related Answers



0

An interesting situation arises when the retries is set to non-zero and the max.in.flight.requests.per.connection is greater than one. This allows the producer to send out more than one batch of messages without having received acknowledgements for any. Consider the following scenario:

Two batches of messages are sent, one after another, destined for the same partition.

The first batch of messages fails to be written successfully at the Kafka broker.

The second batch gets written successfully.

The producer retries sending the first batch again which gets written successfully this time.

The consequence is that the ordering of messages isn’t preserved within the partition, which can be a critical requirement for some applications. In such situations max.in.flight.requests.per.connection should be set to 1, though it will severely impact the throughput of the producer.

Popularity 1/10 Helpfulness 1/10 Language whatever
Source: Grepper
Tags: whatever
Link to this answer
Share Copy Link
Contributed on May 31 2023
Sumit Rawal
0 Answers  Avg Quality 2/10


X

Continue with Google

By continuing, I agree that I have read and agree to Greppers's Terms of Service and Privacy Policy.
X
Grepper Account Login Required

Oops, You will need to install Grepper and log-in to perform this action.