Apache Kafka – Consumer Java – Duplicate Messages No.78

In this blog, Duplicate messages in Consumer are shown using Java with false of enable.auto.commit property. ▼1. What is enable.auto.commit property? Setting enable.auto.commit means that offsets are committed automatically. if it is false, committing offset is needed in producer. KafkaConsumer (clients 0.9.0.1 API) (apache.org) ”Manual Offset Control” ▼2. Prerequisites ▼3. Reproducing duplicate messages in Consumer Setting Auto Commit to false and adding commit offset in Consumer are usually executed to read messages in Java. for the purpose of reproducing duplicate messages, I commented out commitSync() in this case. 3-1. Deploying Consumer Java application Setting enable.auto.commit to false. 3-2. Runing Producer and write 5 messages in a topic Apache Kafka – Develop … Continue reading “Apache Kafka – Consumer Java – Duplicate Messages No.78”