spring集成kafka消费者监听没有触发是怎么回事?
能运行程序,也能连到服务器上,但是消费者监听没有触发,不知道什么原因
我的kafka消费者文件配置,基础连接的配置属性那部分应该没问题,因为是可以连上的
<!-- 创建consumerFactory bean -->
<bean id="consumerFactory" class="org.springframework.kafka.core.DefaultKafkaConsumerFactory">
<constructor-arg>
<ref bean="consumerProperties"/>
</constructor-arg>
</bean>
<!-- 实际执行消息消费的类 -->
<bean id="messageListernerConsumerService" class="kafka.KafkaConsumerListener"/>
<!-- 消费者容器配置信息 -->
<bean id="containerProperties" class="org.springframework.kafka.listener.config.ContainerProperties">
<constructor-arg name="topics" value="${topic}"/>
<property name="messageListener" ref="messageListernerConsumerService"/>
</bean>
<bean id="messageListenerContainer" class="org.springframework.kafka.listener.ConcurrentMessageListenerContainer"
init-method="doStart">
<constructor-arg ref="consumerFactory"/>
<constructor-arg ref="containerProperties"/>
</bean>
运行后打印的日志,因为一直在循环,所以只截了部分,类似于(Tsouche-gps-to-zgj-13, Tsouche-gps-to-zgj-9, Tsouche-gps-to-zgj-5, Tsouche-gps-to-zgj-25, Tsouche-gps-to-zgj-1, Tsouche-gps-to-zgj-29, Tsouche-gps-to-zgj-17, Tsouche-gps-to-zgj-21)中的数字是什么意思?前面的是我的用户名。然后最后一行(Received: 0 records)是表示没有任何数据从服务器取到还是已经取到数据但是没触发监听?
DEBUG messageListenerContainer-0-C-1 [org.apache.kafka.clients.consumer.internals.Fetcher] - Sending READ_UNCOMMITTED fetch for partitions [Tsouche-gps-to-zgj-13, Tsouche-gps-to-zgj-9, Tsouche-gps-to-zgj-5, Tsouche-gps-to-zgj-25, Tsouche-gps-to-zgj-1, Tsouche-gps-to-zgj-29, Tsouche-gps-to-zgj-17, Tsouche-gps-to-zgj-21] to broker gk2.kafka.souche.com:11092 (id: 102 rack: null)
2018-11-30 17:40:18,634 DEBUG kafka-coordinator-heartbeat-thread | CID-T-souche-gps-zgj [org.apache.kafka.clients.consumer.internals.Fetcher] - Fetch READ_UNCOMMITTED at offset 0 for partition Tsouche-gps-to-zgj-26 returned fetch data (error=NONE, highWaterMark=0, lastStableOffset = -1, logStartOffset = 0, abortedTransactions = null, recordsSizeInBytes=0)
2018-11-30 17:40:18,635 DEBUG kafka-coordinator-heartbeat-thread | CID-T-souche-gps-zgj [org.apache.kafka.clients.consumer.internals.Fetcher] - Fetch READ_UNCOMMITTED at offset 0 for partition Tsouche-gps-to-zgj-18 returned fetch data (error=NONE, highWaterMark=0, lastStableOffset = -1, logStartOffset = 0, abortedTransactions = null, recordsSizeInBytes=0)
2018-11-30 17:40:18,635 DEBUG kafka-coordinator-heartbeat-thread | CID-T-souche-gps-zgj [org.apache.kafka.clients.consumer.internals.Fetcher] - Fetch READ_UNCOMMITTED at offset 0 for partition Tsouche-gps-to-zgj-22 returned fetch data (error=NONE, highWaterMark=0, lastStableOffset = -1, logStartOffset = 0, abortedTransactions = null, recordsSizeInBytes=0)
2018-11-30 17:40:18,635 DEBUG kafka-coordinator-heartbeat-thread | CID-T-souche-gps-zgj [org.apache.kafka.clients.consumer.internals.Fetcher] - Fetch READ_UNCOMMITTED at offset 0 for partition Tsouche-gps-to-zgj-10 returned fetch data (error=NONE, highWaterMark=0, lastStableOffset = -1, logStartOffset = 0, abortedTransactions = null, recordsSizeInBytes=0)
2018-11-30 17:40:18,635 DEBUG kafka-coordinator-heartbeat-thread | CID-T-souche-gps-zgj [org.apache.kafka.clients.consumer.internals.Fetcher] - Fetch READ_UNCOMMITTED at offset 0 for partition Tsouche-gps-to-zgj-14 returned fetch data (error=NONE, highWaterMark=0, lastStableOffset = -1, logStartOffset = 0, abortedTransactions = null, recordsSizeInBytes=0)
2018-11-30 17:40:18,635 DEBUG kafka-coordinator-heartbeat-thread | CID-T-souche-gps-zgj [org.apache.kafka.clients.consumer.internals.Fetcher] - Fetch READ_UNCOMMITTED at offset 0 for partition Tsouche-gps-to-zgj-6 returned fetch data (error=NONE, highWaterMark=0, lastStableOffset = -1, logStartOffset = 0, abortedTransactions = null, recordsSizeInBytes=0)
2018-11-30 17:40:18,635 DEBUG kafka-coordinator-heartbeat-thread | CID-T-souche-gps-zgj [org.apache.kafka.clients.consumer.internals.Fetcher] - Fetch READ_UNCOMMITTED at offset 0 for partition Tsouche-gps-to-zgj-2 returned fetch data (error=NONE, highWaterMark=0, lastStableOffset = -1, logStartOffset = 0, abortedTransactions = null, recordsSizeInBytes=0)
2018-11-30 17:40:18,636 DEBUG messageListenerContainer-0-C-1 [org.apache.kafka.clients.consumer.internals.Fetcher] - Added READ_UNCOMMITTED fetch request for partition Tsouche-gps-to-zgj-26 at offset 0 to node gk3.kafka.souche.com:11092 (id: 103 rack: null)
2018-11-30 17:40:18,636 DEBUG messageListenerContainer-0-C-1 [org.apache.kafka.clients.consumer.internals.Fetcher] - Added READ_UNCOMMITTED fetch request for partition Tsouche-gps-to-zgj-18 at offset 0 to node gk3.kafka.souche.com:11092 (id: 103 rack: null)
2018-11-30 17:40:18,636 DEBUG messageListenerContainer-0-C-1 [org.apache.kafka.clients.consumer.internals.Fetcher] - Added READ_UNCOMMITTED fetch request for partition Tsouche-gps-to-zgj-22 at offset 0 to node gk3.kafka.souche.com:11092 (id: 103 rack: null)
2018-11-30 17:40:18,636 DEBUG messageListenerContainer-0-C-1 [org.apache.kafka.clients.consumer.internals.Fetcher] - Added READ_UNCOMMITTED fetch request for partition Tsouche-gps-to-zgj-10 at offset 0 to node gk3.kafka.souche.com:11092 (id: 103 rack: null)
2018-11-30 17:40:18,636 DEBUG messageListenerContainer-0-C-1 [org.apache.kafka.clients.consumer.internals.Fetcher] - Added READ_UNCOMMITTED fetch request for partition Tsouche-gps-to-zgj-14 at offset 0 to node gk3.kafka.souche.com:11092 (id: 103 rack: null)
2018-11-30 17:40:18,637 DEBUG messageListenerContainer-0-C-1 [org.apache.kafka.clients.consumer.internals.Fetcher] - Added READ_UNCOMMITTED fetch request for partition Tsouche-gps-to-zgj-6 at offset 0 to node gk3.kafka.souche.com:11092 (id: 103 rack: null)
2018-11-30 17:40:18,637 DEBUG messageListenerContainer-0-C-1 [org.apache.kafka.clients.consumer.internals.Fetcher] - Added READ_UNCOMMITTED fetch request for partition Tsouche-gps-to-zgj-2 at offset 0 to node gk3.kafka.souche.com:11092 (id: 103 rack: null)
2018-11-30 17:40:18,637 DEBUG messageListenerContainer-0-C-1 [org.apache.kafka.clients.consumer.internals.Fetcher] - Sending READ_UNCOMMITTED fetch for partitions [Tsouche-gps-to-zgj-26, Tsouche-gps-to-zgj-18, Tsouche-gps-to-zgj-22, Tsouche-gps-to-zgj-10, Tsouche-gps-to-zgj-14, Tsouche-gps-to-zgj-6, Tsouche-gps-to-zgj-2] to broker gk3.kafka.souche.com:11092 (id: 103 rack: null)
2018-11-30 17:40:18,657 DEBUG messageListenerContainer-0-C-1 [org.apache.kafka.clients.consumer.internals.Fetcher] - Fetch READ_UNCOMMITTED at offset 0 for partition Tsouche-gps-to-zgj-11 returned fetch data (error=NONE, highWaterMark=0, lastStableOffset = -1, logStartOffset = 0, abortedTransactions = null, recordsSizeInBytes=0)
2018-11-30 17:40:18,657 DEBUG messageListenerContainer-0-C-1 [org.apache.kafka.clients.consumer.internals.Fetcher] - Fetch READ_UNCOMMITTED at offset 0 for partition Tsouche-gps-to-zgj-15 returned fetch data (error=NONE, highWaterMark=0, lastStableOffset = -1, logStartOffset = 0, abortedTransactions = null, recordsSizeInBytes=0)
2018-11-30 17:40:18,657 DEBUG messageListenerContainer-0-C-1 [org.apache.kafka.clients.consumer.internals.Fetcher] - Fetch READ_UNCOMMITTED at offset 0 for partition Tsouche-gps-to-zgj-7 returned fetch data (error=NONE, highWaterMark=0, lastStableOffset = -1, logStartOffset = 0, abortedTransactions = null, recordsSizeInBytes=0)
2018-11-30 17:40:18,657 DEBUG messageListenerContainer-0-C-1 [org.apache.kafka.clients.consumer.internals.Fetcher] - Fetch READ_UNCOMMITTED at offset 0 for partition Tsouche-gps-to-zgj-3 returned fetch data (error=NONE, highWaterMark=0, lastStableOffset = -1, logStartOffset = 0, abortedTransactions = null, recordsSizeInBytes=0)
2018-11-30 17:40:18,657 DEBUG messageListenerContainer-0-C-1 [org.apache.kafka.clients.consumer.internals.Fetcher] - Fetch READ_UNCOMMITTED at offset 0 for partition Tsouche-gps-to-zgj-27 returned fetch data (error=NONE, highWaterMark=0, lastStableOffset = -1, logStartOffset = 0, abortedTransactions = null, recordsSizeInBytes=0)
2018-11-30 17:40:18,657 DEBUG messageListenerContainer-0-C-1 [org.apache.kafka.clients.consumer.internals.Fetcher] - Fetch READ_UNCOMMITTED at offset 0 for partition Tsouche-gps-to-zgj-19 returned fetch data (error=NONE, highWaterMark=0, lastStableOffset = -1, logStartOffset = 0, abortedTransactions = null, recordsSizeInBytes=0)
2018-11-30 17:40:18,657 DEBUG messageListenerContainer-0-C-1 [org.apache.kafka.clients.consumer.internals.Fetcher] - Fetch READ_UNCOMMITTED at offset 0 for partition Tsouche-gps-to-zgj-23 returned fetch data (error=NONE, highWaterMark=0, lastStableOffset = -1, logStartOffset = 0, abortedTransactions = null, recordsSizeInBytes=0)
2018-11-30 17:40:18,658 DEBUG messageListenerContainer-0-C-1 [org.apache.kafka.clients.consumer.internals.Fetcher] - Added READ_UNCOMMITTED fetch request for partition Tsouche-gps-to-zgj-11 at offset 0 to node gk4.kafka.souche.com:11092 (id: 104 rack: null)
2018-11-30 17:40:18,658 DEBUG messageListenerContainer-0-C-1 [org.apache.kafka.clients.consumer.internals.Fetcher] - Added READ_UNCOMMITTED fetch request for partition Tsouche-gps-to-zgj-15 at offset 0 to node gk4.kafka.souche.com:11092 (id: 104 rack: null)
2018-11-30 17:40:18,658 DEBUG messageListenerContainer-0-C-1 [org.apache.kafka.clients.consumer.internals.Fetcher] - Added READ_UNCOMMITTED fetch request for partition Tsouche-gps-to-zgj-7 at offset 0 to node gk4.kafka.souche.com:11092 (id: 104 rack: null)
2018-11-30 17:40:18,658 DEBUG messageListenerContainer-0-C-1 [org.apache.kafka.clients.consumer.internals.Fetcher] - Added READ_UNCOMMITTED fetch request for partition Tsouche-gps-to-zgj-3 at offset 0 to node gk4.kafka.souche.com:11092 (id: 104 rack: null)
2018-11-30 17:40:18,659 DEBUG messageListenerContainer-0-C-1 [org.apache.kafka.clients.consumer.internals.Fetcher] - Added READ_UNCOMMITTED fetch request for partition Tsouche-gps-to-zgj-27 at offset 0 to node gk4.kafka.souche.com:11092 (id: 104 rack: null)
2018-11-30 17:40:18,659 DEBUG messageListenerContainer-0-C-1 [org.apache.kafka.clients.consumer.internals.Fetcher] - Added READ_UNCOMMITTED fetch request for partition Tsouche-gps-to-zgj-19 at offset 0 to node gk4.kafka.souche.com:11092 (id: 104 rack: null)
2018-11-30 17:40:18,659 DEBUG messageListenerContainer-0-C-1 [org.apache.kafka.clients.consumer.internals.Fetcher] - Added READ_UNCOMMITTED fetch request for partition Tsouche-gps-to-zgj-23 at offset 0 to node gk4.kafka.souche.com:11092 (id: 104 rack: null)
2018-11-30 17:40:18,659 DEBUG messageListenerContainer-0-C-1 [org.apache.kafka.clients.consumer.internals.Fetcher] - Sending READ_UNCOMMITTED fetch for partitions [Tsouche-gps-to-zgj-11, Tsouche-gps-to-zgj-15, Tsouche-gps-to-zgj-7, Tsouche-gps-to-zgj-3, Tsouche-gps-to-zgj-27, Tsouche-gps-to-zgj-19, Tsouche-gps-to-zgj-23] to broker gk4.kafka.souche.com:11092 (id: 104 rack: null)
2018-11-30 17:40:18,717 DEBUG messageListenerContainer-0-C-1 [org.apache.kafka.clients.consumer.internals.ConsumerCoordinator] - Sending asynchronous auto-commit of offsets {Tsouche-gps-to-zgj-24=OffsetAndMetadata{offset=0, metadata=''}, Tsouche-gps-to-zgj-28=OffsetAndMetadata{offset=0, metadata=''}, Tsouche-gps-to-zgj-11=OffsetAndMetadata{offset=0, metadata=''}, Tsouche-gps-to-zgj-0=OffsetAndMetadata{offset=57044, metadata=''}, Tsouche-gps-to-zgj-16=OffsetAndMetadata{offset=0, metadata=''}, Tsouche-gps-to-zgj-13=OffsetAndMetadata{offset=0, metadata=''}, Tsouche-gps-to-zgj-26=OffsetAndMetadata{offset=0, metadata=''}, Tsouche-gps-to-zgj-15=OffsetAndMetadata{offset=0, metadata=''}, Tsouche-gps-to-zgj-9=OffsetAndMetadata{offset=0, metadata=''}, Tsouche-gps-to-zgj-7=OffsetAndMetadata{offset=0, metadata=''}, Tsouche-gps-to-zgj-5=OffsetAndMetadata{offset=0, metadata=''}, Tsouche-gps-to-zgj-18=OffsetAndMetadata{offset=0, metadata=''}, Tsouche-gps-to-zgj-20=OffsetAndMetadata{offset=0, metadata=''}, Tsouche-gps-to-zgj-3=OffsetAndMetadata{offset=0, metadata=''}, Tsouche-gps-to-zgj-22=OffsetAndMetadata{offset=0, metadata=''}, Tsouche-gps-to-zgj-25=OffsetAndMetadata{offset=0, metadata=''}, Tsouche-gps-to-zgj-1=OffsetAndMetadata{offset=0, metadata=''}, Tsouche-gps-to-zgj-10=OffsetAndMetadata{offset=0, metadata=''}, Tsouche-gps-to-zgj-29=OffsetAndMetadata{offset=0, metadata=''}, Tsouche-gps-to-zgj-14=OffsetAndMetadata{offset=0, metadata=''}, Tsouche-gps-to-zgj-27=OffsetAndMetadata{offset=0, metadata=''}, Tsouche-gps-to-zgj-12=OffsetAndMetadata{offset=0, metadata=''}, Tsouche-gps-to-zgj-17=OffsetAndMetadata{offset=0, metadata=''}, Tsouche-gps-to-zgj-8=OffsetAndMetadata{offset=0, metadata=''}, Tsouche-gps-to-zgj-19=OffsetAndMetadata{offset=0, metadata=''}, Tsouche-gps-to-zgj-4=OffsetAndMetadata{offset=0, metadata=''}, Tsouche-gps-to-zgj-6=OffsetAndMetadata{offset=0, metadata=''}, Tsouche-gps-to-zgj-23=OffsetAndMetadata{offset=0, metadata=''}, Tsouche-gps-to-zgj-2=OffsetAndMetadata{offset=0, metadata=''}, Tsouche-gps-to-zgj-21=OffsetAndMetadata{offset=0, metadata=''}} for group CID-T-souche-gps-zgj
2018-11-30 17:40:18,727 DEBUG messageListenerContainer-0-C-1 [org.apache.kafka.clients.consumer.internals.ConsumerCoordinator] - Group CID-T-souche-gps-zgj committed offset 0 for partition Tsouche-gps-to-zgj-24
2018-11-30 17:40:18,727 DEBUG messageListenerContainer-0-C-1 [org.apache.kafka.clients.consumer.internals.ConsumerCoordinator] - Group CID-T-souche-gps-zgj committed offset 0 for partition Tsouche-gps-to-zgj-28
2018-11-30 17:40:18,727 DEBUG messageListenerContainer-0-C-1 [org.apache.kafka.clients.consumer.internals.ConsumerCoordinator] - Group CID-T-souche-gps-zgj committed offset 0 for partition Tsouche-gps-to-zgj-11
2018-11-30 17:40:18,727 DEBUG messageListenerContainer-0-C-1 [org.apache.kafka.clients.consumer.internals.ConsumerCoordinator] - Group CID-T-souche-gps-zgj committed offset 57044 for partition Tsouche-gps-to-zgj-0
2018-11-30 17:40:18,727 DEBUG messageListenerContainer-0-C-1 [org.apache.kafka.clients.consumer.internals.ConsumerCoordinator] - Group CID-T-souche-gps-zgj committed offset 0 for partition Tsouche-gps-to-zgj-13
2018-11-30 17:40:18,727 DEBUG messageListenerContainer-0-C-1 [org.apache.kafka.clients.consumer.internals.ConsumerCoordinator] - Group CID-T-souche-gps-zgj committed offset 0 for partition Tsouche-gps-to-zgj-16
2018-11-30 17:40:18,727 DEBUG messageListenerContainer-0-C-1 [org.apache.kafka.clients.consumer.internals.ConsumerCoordinator] - Group CID-T-souche-gps-zgj committed offset 0 for partition Tsouche-gps-to-zgj-26
2018-11-30 17:40:18,727 DEBUG messageListenerContainer-0-C-1 [org.apache.kafka.clients.consumer.internals.ConsumerCoordinator] - Group CID-T-souche-gps-zgj committed offset 0 for partition Tsouche-gps-to-zgj-15
2018-11-30 17:40:18,727 DEBUG messageListenerContainer-0-C-1 [org.apache.kafka.clients.consumer.internals.ConsumerCoordinator] - Group CID-T-souche-gps-zgj committed offset 0 for partition Tsouche-gps-to-zgj-9
2018-11-30 17:40:18,727 DEBUG messageListenerContainer-0-C-1 [org.apache.kafka.clients.consumer.internals.ConsumerCoordinator] - Group CID-T-souche-gps-zgj committed offset 0 for partition Tsouche-gps-to-zgj-7
2018-11-30 17:40:18,727 DEBUG messageListenerContainer-0-C-1 [org.apache.kafka.clients.consumer.internals.ConsumerCoordinator] - Group CID-T-souche-gps-zgj committed offset 0 for partition Tsouche-gps-to-zgj-5
2018-11-30 17:40:18,727 DEBUG messageListenerContainer-0-C-1 [org.apache.kafka.clients.consumer.internals.ConsumerCoordinator] - Group CID-T-souche-gps-zgj committed offset 0 for partition Tsouche-gps-to-zgj-18
2018-11-30 17:40:18,727 DEBUG messageListenerContainer-0-C-1 [org.apache.kafka.clients.consumer.internals.ConsumerCoordinator] - Group CID-T-souche-gps-zgj committed offset 0 for partition Tsouche-gps-to-zgj-20
2018-11-30 17:40:18,727 DEBUG messageListenerContainer-0-C-1 [org.apache.kafka.clients.consumer.internals.ConsumerCoordinator] - Group CID-T-souche-gps-zgj committed offset 0 for partition Tsouche-gps-to-zgj-3
2018-11-30 17:40:18,727 DEBUG messageListenerContainer-0-C-1 [org.apache.kafka.clients.consumer.internals.ConsumerCoordinator] - Group CID-T-souche-gps-zgj committed offset 0 for partition Tsouche-gps-to-zgj-22
2018-11-30 17:40:18,727 DEBUG messageListenerContainer-0-C-1 [org.apache.kafka.clients.consumer.internals.ConsumerCoordinator] - Group CID-T-souche-gps-zgj committed offset 0 for partition Tsouche-gps-to-zgj-25
2018-11-30 17:40:18,727 DEBUG messageListenerContainer-0-C-1 [org.apache.kafka.clients.consumer.internals.ConsumerCoordinator] - Group CID-T-souche-gps-zgj committed offset 0 for partition Tsouche-gps-to-zgj-1
2018-11-30 17:40:18,727 DEBUG messageListenerContainer-0-C-1 [org.apache.kafka.clients.consumer.internals.ConsumerCoordinator] - Group CID-T-souche-gps-zgj committed offset 0 for partition Tsouche-gps-to-zgj-10
2018-11-30 17:40:18,727 DEBUG messageListenerContainer-0-C-1 [org.apache.kafka.clients.consumer.internals.ConsumerCoordinator] - Group CID-T-souche-gps-zgj committed offset 0 for partition Tsouche-gps-to-zgj-29
2018-11-30 17:40:18,727 DEBUG messageListenerContainer-0-C-1 [org.apache.kafka.clients.consumer.internals.ConsumerCoordinator] - Group CID-T-souche-gps-zgj committed offset 0 for partition Tsouche-gps-to-zgj-14
2018-11-30 17:40:18,727 DEBUG messageListenerContainer-0-C-1 [org.apache.kafka.clients.consumer.internals.ConsumerCoordinator] - Group CID-T-souche-gps-zgj committed offset 0 for partition Tsouche-gps-to-zgj-27
2018-11-30 17:40:18,727 DEBUG messageListenerContainer-0-C-1 [org.apache.kafka.clients.consumer.internals.ConsumerCoordinator] - Group CID-T-souche-gps-zgj committed offset 0 for partition Tsouche-gps-to-zgj-12
2018-11-30 17:40:18,727 DEBUG messageListenerContainer-0-C-1 [org.apache.kafka.clients.consumer.internals.ConsumerCoordinator] - Group CID-T-souche-gps-zgj committed offset 0 for partition Tsouche-gps-to-zgj-17
2018-11-30 17:40:18,727 DEBUG messageListenerContainer-0-C-1 [org.apache.kafka.clients.consumer.internals.ConsumerCoordinator] - Group CID-T-souche-gps-zgj committed offset 0 for partition Tsouche-gps-to-zgj-8
2018-11-30 17:40:18,727 DEBUG messageListenerContainer-0-C-1 [org.apache.kafka.clients.consumer.internals.ConsumerCoordinator] - Group CID-T-souche-gps-zgj committed offset 0 for partition Tsouche-gps-to-zgj-19
2018-11-30 17:40:18,727 DEBUG messageListenerContainer-0-C-1 [org.apache.kafka.clients.consumer.internals.ConsumerCoordinator] - Group CID-T-souche-gps-zgj committed offset 0 for partition Tsouche-gps-to-zgj-4
2018-11-30 17:40:18,727 DEBUG messageListenerContainer-0-C-1 [org.apache.kafka.clients.consumer.internals.ConsumerCoordinator] - Group CID-T-souche-gps-zgj committed offset 0 for partition Tsouche-gps-to-zgj-6
2018-11-30 17:40:18,727 DEBUG messageListenerContainer-0-C-1 [org.apache.kafka.clients.consumer.internals.ConsumerCoordinator] - Group CID-T-souche-gps-zgj committed offset 0 for partition Tsouche-gps-to-zgj-23
2018-11-30 17:40:18,728 DEBUG messageListenerContainer-0-C-1 [org.apache.kafka.clients.consumer.internals.ConsumerCoordinator] - Group CID-T-souche-gps-zgj committed offset 0 for partition Tsouche-gps-to-zgj-2
2018-11-30 17:40:18,728 DEBUG messageListenerContainer-0-C-1 [org.apache.kafka.clients.consumer.internals.ConsumerCoordinator] - Group CID-T-souche-gps-zgj committed offset 0 for partition Tsouche-gps-to-zgj-21
2018-11-30 17:40:18,728 DEBUG messageListenerContainer-0-C-1 [org.apache.kafka.clients.consumer.internals.ConsumerCoordinator] - Completed auto-commit of offsets {Tsouche-gps-to-zgj-24=OffsetAndMetadata{offset=0, metadata=''}, Tsouche-gps-to-zgj-28=OffsetAndMetadata{offset=0, metadata=''}, Tsouche-gps-to-zgj-11=OffsetAndMetadata{offset=0, metadata=''}, Tsouche-gps-to-zgj-0=OffsetAndMetadata{offset=57044, metadata=''}, Tsouche-gps-to-zgj-16=OffsetAndMetadata{offset=0, metadata=''}, Tsouche-gps-to-zgj-13=OffsetAndMetadata{offset=0, metadata=''}, Tsouche-gps-to-zgj-26=OffsetAndMetadata{offset=0, metadata=''}, Tsouche-gps-to-zgj-15=OffsetAndMetadata{offset=0, metadata=''}, Tsouche-gps-to-zgj-9=OffsetAndMetadata{offset=0, metadata=''}, Tsouche-gps-to-zgj-7=OffsetAndMetadata{offset=0, metadata=''}, Tsouche-gps-to-zgj-5=OffsetAndMetadata{offset=0, metadata=''}, Tsouche-gps-to-zgj-18=OffsetAndMetadata{offset=0, metadata=''}, Tsouche-gps-to-zgj-20=OffsetAndMetadata{offset=0, metadata=''}, Tsouche-gps-to-zgj-3=OffsetAndMetadata{offset=0, metadata=''}, Tsouche-gps-to-zgj-22=OffsetAndMetadata{offset=0, metadata=''}, Tsouche-gps-to-zgj-25=OffsetAndMetadata{offset=0, metadata=''}, Tsouche-gps-to-zgj-1=OffsetAndMetadata{offset=0, metadata=''}, Tsouche-gps-to-zgj-10=OffsetAndMetadata{offset=0, metadata=''}, Tsouche-gps-to-zgj-29=OffsetAndMetadata{offset=0, metadata=''}, Tsouche-gps-to-zgj-14=OffsetAndMetadata{offset=0, metadata=''}, Tsouche-gps-to-zgj-27=OffsetAndMetadata{offset=0, metadata=''}, Tsouche-gps-to-zgj-12=OffsetAndMetadata{offset=0, metadata=''}, Tsouche-gps-to-zgj-17=OffsetAndMetadata{offset=0, metadata=''}, Tsouche-gps-to-zgj-8=OffsetAndMetadata{offset=0, metadata=''}, Tsouche-gps-to-zgj-19=OffsetAndMetadata{offset=0, metadata=''}, Tsouche-gps-to-zgj-4=OffsetAndMetadata{offset=0, metadata=''}, Tsouche-gps-to-zgj-6=OffsetAndMetadata{offset=0, metadata=''}, Tsouche-gps-to-zgj-23=OffsetAndMetadata{offset=0, metadata=''}, Tsouche-gps-to-zgj-2=OffsetAndMetadata{offset=0, metadata=''}, Tsouche-gps-to-zgj-21=OffsetAndMetadata{offset=0, metadata=''}} for group CID-T-souche-gps-zgj
2018-11-30 17:40:18,772 DEBUG messageListenerContainer-0-C-1 [org.springframework.kafka.listener.KafkaMessageListenerContainer$ListenerConsumer] - Received: 0 records
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(4)
这个问题解决了吗?我也有相同的问题,没有头绪,topic里有数据,没也监控错,但就是监控不到数据, Received: 0 records
是对方的服务有问题,但是现在好了之后我这边监听方法是可以执行了,但是kafka一直通过偏移量查询分区,而目前分区只有很少一部分数据,能设置过滤让返回没有数据的ConsumerRecord不去触发监听吗?
回复
sparkstreaming是微批处理方式,监听后没法取消,可以在消费者类中加个判断,如果kafka topic没有数据就直接返回
topic是否正确?或者topic里本来就没有数据