【多种情况】Springboot集成kafka-No group.id found in consumer config

  • 作者: 凯哥Java(公众号:凯哥Java)
  • kafka
  • 时间:2022-01-09 15:45
  • 7175人已阅读
简介 问题:Caused by: java.lang.IllegalStateException: No group.id found in consumer config, container properties, or @KafkaListener annotation; a group.id is required when group management is used

🔔🔔🔔好消息!好消息!🔔🔔🔔

有需要的朋友👉:联系凯哥 微信号 kaigejava2022

问题:Caused by: java.lang.IllegalStateException: No group.id found in consumer config, container properties, or @KafkaListener annotation; a group.id is required when group management is used

错误截图如下:

6cfb81f770250df17fa00df24a7c5052.png

场景:Springboot集成kafka

解决方案:在application.proerties中配置消费者的group-id:

spring.kafka.consumer.group-id=test-consumer-group

185fc847756a0f2607a692f2944f93f0.png

情况二:

如果按照上面,添加了,还是报错。解决:

2ca2ad692933df2fbf554d47a4df8790.png

TopTop