KAFKA - What is reason for getting ProducerFencedException during producer.send

后端 未结 4 596
执笔经年
执笔经年 2021-01-13 19:56

Trying to load around 50K messages into KAFKA topic. In the beginning of few runs getting below exception but not all the time.

org.apache.kafka.common.Kafka         


        
4条回答
  •  天涯浪人
    2021-01-13 20:33

    When running multiple instances of the application, transactional.id must be the same on all instances to satisfy fencing zombies when producing records on a listener container thread. However, when producing records using transactions that are not started by a listener container, the prefix has to be different on each instance.

    https://docs.spring.io/spring-kafka/reference/html/#transaction-id-prefix

提交回复
热议问题