In this post , we will see How To Fix - Message Out Of Order Issue in Kafka Broker . During Kafka runtime , sometimes due to network failure or any other reasons , the sync between Producer and Kafka broker gets broken . Thereby impacting the confusion whether the last messages were delivered (and replicated) or not. And once you bring up and restart the system and Resend the messages , you might notice Ordering of the Messages getting impacted in Kafka Broker or the messages are not in sequence. To handle this issue , we can take help of the Kafka Idempotent Producer feature . This feature is supported in version Kafka 0.11 . The idempotent producer feature ensures that Producer messages are delivered in Sequence and Always in order . As a matter of fact , if your Kafka configuration or set-up uses Complete in-sync replicas or acks=all , then you Must Potentially Enable this Feature. This Simplifies the complete situation of Debugging when messages are lost. And saves a lot of time of the debugger or the developer. To enable the Idempotent Producer feature , do the following -
enable.idempotence=true
message.send.max.retries
Acks=All
max.in.flight.requests.per.connection
Hope this post helps you to understand - How To Enable - Idempotent Producer in Kafka . **Additional Read - **