After trying for analyze how Kafka topic partitioning will work with Axon event processing segments, I’ve got an impression that having a Kafka topic with several partitions and at the same time more than one Axon segment can potentially lead to skipped, not processed events.
Consider a situation with a topic with two partitions and two configured Axon processor’s segments. Also let’s assume two JVMs trying to process events concurrently. In such scenario kafka consumer in each JVM will be assigned with one of the two partitions. Then the event processor in each JVM will try to lock a segment. Now it might happen that an event processor’s segment doesn’t match some or all events in its kafka consumer’s partition (i.e. those events are in the second partition), in which case we will have skipped event messages.
Is my understanding correct or I’m missing something?