Let's say I have two producers (ProducerA and ProducerB) writing to the same topic with a single partition. Each producer is writing it's own unique events serially. So if ProducerA fired 3 events and then ProducerB fired 3 events, my understanding is that Kafka cannot guarantee the order across the producer's events like this:
- ProducerA_event_1
- ProducerA_event_2
- ProducerA_event_3
- ProducerB_event_1
- ProducerB_event_2
- ProducerB_event_3
due to acking, retrying, etc.
However will individual producer's events still be in order? For example:
- ProducerA_event_1
- ProducerB_event_2
- ProducerB_event_1
- ProducerA_event_2
- ProducerA_event_3
- ProducerB_event_3
This is of course a simplified version of what I am doing, but I just want to guarantee that if I am reading from a topic for a specific producer's events, then those events will be in order even if other producer's events interleave them.