问题描述ApplicationContextException: 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.
    at org.springframework.context.support.DefaultLifecycleProcessor.doStart(DefaultLifecycleProcessor.java:185)
    at org.springframework.context.support.DefaultLifecycleProcessor.access$200(DefaultLifecycleProcessor.java:53)
    at org.springframework.context.support.DefaultLifecycleProcessor$LifecycleGroup.start(DefaultLifecycleProcessor.java:360)
    at org.springframework.context.support.DefaultLifecycleProcessor.startBeans(DefaultLifecycleProcessor.java:158)
    at org.springframework.context.support.DefaultLifecycleProcessor.onRefresh(DefaultLifecycleProcessor.java:122)
    at org.springframework.context.support.AbstractApplicationContext.finishRefresh(AbstractApplicationContext.java:894)
    at org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.finishRefresh(ServletWebServerApplicationContext.java:162)
    at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:553)
    at org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.refresh(ServletWebServerApplicationContext.java:141)
    at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:747)
    at org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:397)
    at org.springframework.boot.SpringApplication.run(SpringApplication.java:315)
    at org.springframework.boot.SpringApplication.run(SpringApplication.java:1226)
    at org.springframework.boot.SpringApplication.run(SpringApplication.java:1215)
    at com.yunda.BootbaseApplication.main(BootbaseApplication.java:23)
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.
    at org.springframework.util.Assert.state(Assert.java:73)
    at org.springframework.kafka.listener.AbstractMessageListenerContainer.checkGroupId(AbstractMessageListenerContainer.java:399)
    at org.springframework.kafka.listener.AbstractMessageListenerContainer.start(AbstractMessageListenerContainer.java:335)
    at org.springframework.kafka.config.KafkaListenerEndpointRegistry.startIfNecessary(KafkaListenerEndpointRegistry.java:312)
    at org.springframework.kafka.config.KafkaListenerEndpointRegistry.start(KafkaListenerEndpointRegistry.java:257)
    at org.springframework.context.support.DefaultLifecycleProcessor.doStart(DefaultLifecycleProcessor.java:182)
    ... 14 common frames omitted

解决方案】:监听的类需要添加消费者所属的组名 groupId = "自行定义"

1 @KafkaListener(groupId = "xxx", topics = {ENTRY_TOPIC_NAME},containerFactory="stringkafkaListenerContainerFactory")
2 public void revice(String data) throws Exception {

SpringBoot 整合 Kafka 与 Avro 【No group.id】 问题解决方法的更多相关文章

  1. SpringBoot整合Kafka和Storm

    前言 本篇文章主要介绍的是SpringBoot整合kafka和storm以及在这过程遇到的一些问题和解决方案. kafka和storm的相关知识 如果你对kafka和storm熟悉的话,这一段可以直接 ...

  2. SpringBoot系列八:SpringBoot整合消息服务(SpringBoot 整合 ActiveMQ、SpringBoot 整合 RabbitMQ、SpringBoot 整合 Kafka)

    声明:本文来源于MLDN培训视频的课堂笔记,写在这里只是为了方便查阅. 1.概念:SpringBoot 整合消息服务 2.具体内容 对于异步消息组件在实际的应用之中会有两类: · JMS:代表作就是 ...

  3. springBoot上传文件时MultipartFile报空问题解决方法

    springBoot上传文件时MultipartFile报空问题解决方法 1.问题描述: 之前用spring MVC,转成spring boot之后发现上传不能用.网上参考说是spring boot已 ...

  4. Kafka:Springboot整合Kafka消息队列

    本文主要分享下Spring Boot和Spring Kafka如何配置整合,实现发送和接收来自Spring Kafka的消息. 项目结构 pom依赖包 <?xml version="1 ...

  5. SpringBoot整合Kafka

    一.准备工作 提前启动zk,kafka,并且创建一个Topic("Hello-Kafk") bin/kafka-topics.sh --create --zookeeper 192 ...

  6. springboot 整合kafka

    本文介绍如何在springboot项目中集成kafka收发message. 1.先解决依赖 springboot相关的依赖我们就不提了,和kafka相关的只依赖一个spring-kafka集成包 &l ...

  7. springboot系列八、springboot整合kafka

    背景: 当业务在同一时间出现高并发的时候,这个时候我们不想无限的增加服务器,但是又想提高吞吐量.这时可以考虑使用消息异步处理,进行消峰填谷:同时还可以降低耦合度.常见的消息中间件有kafka,rabb ...

  8. SpringBoot整合kafka(实现producer和consumer)

    本文代码使用的是Spring Boot 2.1.8.RELEASE 版本 <parent> <groupId>org.springframework.boot</grou ...

  9. springboot整合mybatis时无法读取xml文件解决方法(必读)

    转    http://baijiahao.baidu.com/s?id=1588136004120071836&wfr=spider&for=pc 在springboot整合myba ...

  10. springboot整合kafka应用

    1.kafka在消息传递的使用非常普遍,相对于activemq来说kafka的分布式管理和使用更加灵活. 2.activemq的搭建和使用可以参考: activemq搭建和springmvc的整合:h ...

随机推荐

  1. 波利亚(George Pólya)的一些链接

    忽然决定还是要写个博客. 第一篇献给波利亚. 他最有名的应该是<怎样解题>(How to solve it)这本书了.我认为只要读了前面几页就能提高普通人解决问题的能力,真的应该列为中学必 ...

  2. x-www-form-urlencoded请求封装

    <dependency> <groupId>commons-httpclient</groupId> <artifactId>commons-httpc ...

  3. 通过Windows定时任务执行Python脚本给钉钉群发送消息

    前提:已经存在有成功发送钉钉群机器人消息的python脚本,参考上一篇Python调用钉钉群机器人发送群消息 Windows定时任务设置 1.本机是Win7系统:控制面板->系统和安全-> ...

  4. 后台http请求

    HttpResponse response = HttpContext.Current.Response; response.Buffer = true; response.Clear(); resp ...

  5. Python turtle print TaiChi

    import turtle turtle.pensize(20) turtle.pencolor("black") turtle.penup() turtle.goto(0,300 ...

  6. asm 理解

    stm32中有3条总线:地址总线,数据总线,系统总线:地址总线上是地址值,数据总线上是数据值,cpu读写时会先在地址总线上传输地址值,如果是写操作之后数据总线上会放往前面地址处写入的数据值,如果是读操 ...

  7. AirServer 7(专业mac投屏软件)v7.2.6中文版

    AirServer Mac是一款好用的投屏工具,它可以将您的Mac变成通用镜像接收器,允许您使用内置的AirPlay或基于Google Cast的屏幕投影功能镜像设备的显示器.您可以通过任何AirPl ...

  8. C# 连接EXCEL和ACCESS字符串2003及2007版字符串说明

    97-2003版本 EXCEL Provider=Microsoft.Jet.OLEDB.4.0;Data Source=文件位置;ExtendedProperties=Excel 8.0;HDR=Y ...

  9. Mysql的驱动表 被驱动表 join buffer

    1.为什么小表驱动大表: for(int i=5;.......){     for(int j=1000;......)     {}} 1.1如果小的循环在外层,对于数据库连接来说就只连接5次,进 ...

  10. jquery的ajax方法获取不到return返回值

    /** 2 * 方式:(1)同步调用 (2)在ajax函数中return值 3 * 结果:返回 1.未成功获取返回值 4 * 失败原因:ajax内部是一个或多个定义的函数,ajax中return返回值 ...