项目场景:
- 在使用kafka进行信息的实时通信时,出现项目无法启动的问题,报错 信息如下
问题描述:
- Failed to start bean ‘org.springframework.kafka.config.internalKafkaListenerEndpointRegistry’; nested exception is 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.
原因分析:
- 首先要明白报错的信息的内容:
未能启动bean’org.springframework.kafka网站.config.internalKafkaListenerEndpointRegistry文件’;嵌套异常为java.lang.IllegalStateException异常:是否id在使用者配置、容器属性