kafka的2个topic,如果2个 ConsumerConfig配置不一样。
@KafkaListener(id = "${groupId}", topics={"TOPIC"}, containerFactory = "DefinekafkaListenerContainerFactory")
如果不配置 containerFactory,那么默认的是用 kafkaListenerContainerFactory。如果需要自定义,可以在 containerFactory设置。
参考链接:
https://docs.spring.io/spring-kafka/reference/html/#message-listener-container
https://stackoverflow.com/questions/62633041/how-does-default-kafkalistenercontainerfactory-work
标签:spring,KafkaListener,kafka,containerFactory,https,Kafka From: https://www.cnblogs.com/parkdifferent/p/17131428.html