How to guarantee order in Kafka partition -


ok understand order guarantee per partition.

just random thought/question.

assuming partition strategy correct , messages grouped correctly proper partition (or using 1 partition)

i suppose producing application must send each message 1 1 kafka , make sure each message has been acked before sending next 1 right?

yes, correct order producing application sends message dictates order stored in partition.

messages sent producer particular topic partition appended in order sent. is, if message m1 sent same producer message m2, , m1 sent first, m1 have lower offset m2 , appear earlier in log. http://kafka.apache.org/documentation.html#intro_guarantees

however, if have multiple messages in flight simultaneously not sure how order determined.

you might want think acks config producer well. there failure conditions message may missing if leader goes down after m1 published , new leader receives m2. in case won't have out of order condition, missing message it's orthogonal original question consider if message guarantees , order critical application. http://kafka.apache.org/documentation.html#producerconfigs

overall, designing system small differences in order not important can simplify things.


Comments

Popular posts from this blog

unity3d - Rotate an object to face an opposite direction -

angular - Is it possible to get native element for formControl? -

javascript - Why jQuery Select box change event is now working? -