How is order guaranteed during outages at Kafka Async Producer?

If I use the producer Kafka Async, suppose there are an X number of messages in the buffer. When they are actually processed on the client, and if the broker or any particular section does not work for some time, the kafka client will try again, and if the message fails, whether it will be marked as a specific message as unsuccessful and go to the next message (this can disable messages)? Or, have the remaining messages in the package failed to maintain order?

I will maintain ordering, so ideally you want kafka not to execute the package from the place where it failed, so I can try again from the point of failure, how would I achieve this?

+4
source share
1 answer

As the kafka documentation says about trying

Setting a value greater than zero will lead to a resending of the client record, whose sending is not performed with a potentially temporary error. Please note that this replay is not different from if the client repeats the recording on receiving an error. Allowing retries can order records, because if two records are sent to one section, and the first is not executed and repeated, but the second, then the second record may appear first.

So, answering your question with a headline, kafka does not have order guarantees for asynchronous shipments.


I am updating the database of answers to a question from Peter Davis.

, , , max.in.flight.requests.per.connection=1, , :

, 1, , - ( , ).

+1

Source: https://habr.com/ru/post/1627722/


All Articles