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

后端 未结 4 654
执笔经年
执笔经年 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

    There was race condition in my Producer initialization code. I have fixed by changing Producer map to the type ConcurrentHashMap to ensure thread safe.

提交回复
热议问题