We have two services set up to communicate utilizing Kafka as our event bus (using axon-kafka
and axon-kafka-spring-boot-starter
). They are both pointed to the same topic for inter-service communication. Randomly we will see our publishers fail with an error message similar to the following:
org.apache.kafka.common.errors.ProducerFencedException: Producer with transactionalId 'null0' and ProducerIdAndEpoch(producerId=69453, epoch=695) has been fenced by another producer with the same transactionalId
org.apache.kafka.common.errors.ProducerFencedException: There is a newer producer with the same transactionalId which fences the current one.
There doesn’t seem to be much of a pattern as to when this occurs. Can’t quite figure out what’s going on here and wondering if anyone has any insight into this problem