Does Apache Kafka® really preserve message ordering?
Apache Kafka is known to preserve message ordering per topic/partition, but there can be exceptions due to network issues or multiple producers. A single producer scenario may result in unexpected series of messages if a message gets delayed or lost. To ensure proper delivery and ordering, acknowledgment mechanisms and retries should be set up. Idempotent producers can also help maintain the global ordering of messages. For scenarios with multiple producers, it is crucial to handle event time properly on the consumer side. Some tools like Kafka Streams, Kafka Connect, and Apache Flink allow defining which field to use as event time for reshuffling message order.
Company
Aiven
Date published
March 21, 2023
Author(s)
Francesco Tisiot
Word count
1990
Hacker News points
3
Language
English