我在应用程序启动时加载kafka使用者配置,然后运行kafka生成器以生成低于错误的消息(生产者和使用者都在相同的应用程序上下文中运行,这是要求)。
对此有何建议?
<int-kafka:producer-context id="kafkaProducerContext">
<int-kafka:producer-configurations>
<int-kafka:producer-configuration broker-list="localhost:9092"
key-class-type="java.lang.String"
value-class-type="com.test.MessageVo"
topic="inMessage_topic"
value-encoder="valueEncoder"
key-encoder="keyEncoder"
compression-type="none"/>
</int-kafka:producer-context>
<bean id="valueEncoder" class="org.springframework.integration.kafka.serializer.avro.AvroReflectDatumBackedKafkaEncoder">
<constructor-arg value="com.test.MessageVo" />
</bean>
<int-kafka:consumer-context id="consumerContext" consumer-timeout="4000" zookeeper-connect="zookeeperConnect">
<int-kafka:consumer-configurations>
<int-kafka:consumer-configuration group-id="default"
value-decoder="valueDecoder"
key-decoder="keyDecoder"
max-messages="5000">
<int-kafka:topic id="inMessage_topic" streams="4"/>
</int-kafka:consumer-configuration>
日志:
creating instance of bean 'org.springframework.integration.config.IdGeneratorConfigurer#0'
18:31:03.139 [main] DEBUG o.s.c.s.ClassPathXmlApplicationContext - Unable to locate LifecycleProcessor with name 'lifecycleProcessor': using default [org.springframework.context.support.DefaultLifecycleProcessor@22981654]
18:31:03.139 [main] DEBUG o.s.b.f.s.DefaultListableBeanFactory - Returning cached instance of singleton bean 'integrationHeaderChannelRegistry'
18:31:03.139 [main] DEBUG o.s.b.f.s.DefaultListableBeanFactory - Returning cached instance of singleton bean 'globalChannelInterceptorProcessor'
18:31:03.139 [main] DEBUG o.s.b.f.s.DefaultListableBeanFactory - Returning cached instance of singleton bean 'kafkaInboundChannelAdapter'
18:31:03.139 [main] DEBUG o.s.b.f.s.DefaultListableBeanFactory - Returning cached instance of singleton bean 'org.springframework.integration.config.ConsumerEndpointFactoryBean#0'
18:31:03.139 [main] DEBUG o.s.b.f.s.DefaultListableBeanFactory - Returning cached instance of singleton bean '_org.springframework.integration.errorLogger'
18:31:03.139 [main] DEBUG o.s.b.f.s.DefaultListableBeanFactory - Returning cached instance of singleton bean 'lifecycleProcessor'
18:31:03.139 [main] INFO o.s.c.s.DefaultLifecycleProcessor - Starting beans in phase -2147483648
18:31:03.139 [main] DEBUG o.s.c.s.DefaultLifecycleProcessor - Starting bean 'globalChannelInterceptorProcessor' of type [class org.springframework.integration.config.GlobalChannelInterceptorProcessor]
18:31:03.139 [main] DEBUG o.s.i.c.GlobalChannelInterceptorProcessor - No global channel interceptors.
18:31:03.140 [main] DEBUG o.s.c.s.DefaultLifecycleProcessor - Successfully started bean 'globalChannelInterceptorProcessor'
18:31:03.140 [main] INFO o.s.c.s.DefaultLifecycleProcessor - Starting beans in phase 0
18:31:03.140 [main] DEBUG o.s.c.s.DefaultLifecycleProcessor - Starting bean '_org.springframework.integration.errorLogger' of type [class org.springframework.integration.config.ConsumerEndpointFactoryBean]
18:31:03.140 [main] INFO o.s.i.endpoint.EventDrivenConsumer - Adding {logging-channel-adapter:_org.springframework.integration.errorLogger} as a subscriber to the 'errorChannel' channel
18:31:03.140 [main] INFO o.s.i.c.PublishSubscribeChannel - Channel 'org.springframework.context.support.ClassPathXmlApplicationContext@27ff9f78.errorChannel' has 1 subscriber(s).
18:31:03.140 [main] INFO o.s.i.endpoint.EventDrivenConsumer - started _org.springframework.integration.errorLogger
18:31:03.140 [main] DEBUG o.s.c.s.DefaultLifecycleProcessor - Successfully started bean '_org.springframework.integration.errorLogger'
18:31:03.140 [main] INFO o.s.c.s.DefaultLifecycleProcessor - Starting beans in phase 1073741823
18:31:03.140 [main] DEBUG o.s.c.s.DefaultLifecycleProcessor - Starting bean 'kafkaInboundChannelAdapter' of type [class org.springframework.integration.config.SourcePollingChannelAdapterFactoryBean]
18:31:03.140 [main] DEBUG o.s.b.f.s.DefaultListableBeanFactory - Returning cached instance of singleton bean 'taskScheduler'
18:31:03.140 [main] INFO o.s.i.e.SourcePollingChannelAdapter - started kafkaInboundChannelAdapter
18:31:03.140 [main] DEBUG o.s.c.s.DefaultLifecycleProcessor - Successfully started bean 'kafkaInboundChannelAdapter'
18:31:03.140 [main] DEBUG o.s.c.s.DefaultLifecycleProcessor - Starting bean 'org.springframework.integration.config.ConsumerEndpointFactoryBean#0' of type [class org.springframework.integration.config.ConsumerEndpointFactoryBean]
18:31:03.140 [main] DEBUG o.s.b.f.s.DefaultListableBeanFactory - Returning cached instance of singleton bean 'taskScheduler'
18:31:03.140 [main] INFO o.s.i.endpoint.PollingConsumer - started org.springframework.integration.config.ConsumerEndpointFactoryBean#0
18:31:03.140 [main] DEBUG o.s.c.s.DefaultLifecycleProcessor - Successfully started bean 'org.springframework.integration.config.ConsumerEndpointFactoryBean#0'
18:31:03.140 [main] DEBUG o.s.b.f.s.DefaultListableBeanFactory - Returning cached instance of singleton bean 'org.springframework.integration.config.IdGeneratorConfigurer#0'
18:31:03.142 [main] DEBUG o.s.c.e.PropertySourcesPropertyResolver - Searching for key 'spring.liveBeansView.mbeanDomain' in [systemProperties]
18:31:03.142 [main] DEBUG o.s.c.e.PropertySourcesPropertyResolver - Searching for key 'spring.liveBeansView.mbeanDomain' in [systemEnvironment]
18:31:03.142 [main] DEBUG o.s.c.e.PropertySourcesPropertyResolver - Could not find key 'spring.liveBeansView.mbeanDomain' in any property source. Returning [null]
18:31:03.142 [main] DEBUG o.s.b.f.s.DefaultListableBeanFactory - Returning cached instance of singleton bean 'integrationHeaderChannelRegistry'
18:31:03.142 [main] DEBUG o.s.b.f.s.DefaultListableBeanFactory - Returning cached instance of singleton bean 'globalChannelInterceptorProcessor'
18:31:03.142 [main] DEBUG o.s.b.f.s.DefaultListableBeanFactory - Returning cached instance of singleton bean 'kafkaInboundChannelAdapter'
18:31:03.142 [main] DEBUG o.s.b.f.s.DefaultListableBeanFactory - Returning cached instance of singleton bean 'org.springframework.integration.config.ConsumerEndpointFactoryBean#0'
18:31:03.142 [main] DEBUG o.s.b.f.s.DefaultListableBeanFactory - Returning cached instance of singleton bean '_org.springframework.integration.errorLogger'
18:31:03.142 [main] DEBUG o.s.b.f.s.DefaultListableBeanFactory - Returning cached instance of singleton bean 'lifecycleProcessor'
18:31:03.143 [main] INFO o.s.c.s.DefaultLifecycleProcessor - Starting beans in phase -2147483648
18:31:03.143 [main] DEBUG o.s.c.s.DefaultLifecycleProcessor - Starting bean 'globalChannelInterceptorProcessor' of type [class org.springframework.integration.config.GlobalChannelInterceptorProcessor]
18:31:03.143 [main] DEBUG o.s.c.s.DefaultLifecycleProcessor - Successfully started bean 'globalChannelInterceptorProcessor'
18:31:03.143 [main] INFO o.s.c.s.DefaultLifecycleProcessor - Starting beans in phase 0
18:31:03.143 [main] DEBUG o.s.c.s.DefaultLifecycleProcessor - Starting bean 'integrationHeaderChannelRegistry' of type [class org.springframework.integration.channel.DefaultHeaderChannelRegistry]
18:31:03.144 [main] DEBUG o.s.c.s.DefaultLifecycleProcessor - Successfully started bean 'integrationHeaderChannelRegistry'
18:31:03.144 [main] INFO o.s.c.s.DefaultLifecycleProcessor - Starting beans in phase 1073741823
18:31:03.144 [main] DEBUG o.s.b.f.s.DefaultListableBeanFactory - Returning cached instance of singleton bean 'org.springframework.integration.config.IdGeneratorConfigurer#0'
18:31:03.144 [task-scheduler-3-SendThread(192.168.4.102:2181)] INFO org.apache.zookeeper.ClientCnxn - Opening socket connection to server 192.168.4.102/192.168.4.102:2181. Will not attempt to authenticate using SASL (unknown error)
18:31:03.145 [main] DEBUG o.s.c.e.PropertySourcesPropertyResolver - Searching for key 'spring.liveBeansView.mbeanDomain' in [systemProperties]
18:31:03.145 [main] DEBUG o.s.c.e.PropertySourcesPropertyResolver - Searching for key 'spring.liveBeansView.mbeanDomain' in [systemEnvironment]
18:31:03.145 [main] DEBUG o.s.c.e.PropertySourcesPropertyResolver - Could not find key 'spring.liveBeansView.mbeanDomain' in any property source. Returning [null]
18:31:03.145 [main] DEBUG o.s.t.c.DefaultCacheAwareContextLoaderDelegate - Storing ApplicationContext in cache under key [[MergedContextConfiguration@588b873e testClass = NotificationServiceTest, locations = '{classpath:/bootstrap-test.xml}', classes = '{}', contextInitializerClasses = '[]', activeProfiles = '{}', propertySourceLocations = '{}', propertySourceProperties = '{}', contextLoader = 'org.springframework.test.context.support.DelegatingSmartContextLoader', parent = [null]]].
18:31:03.149 [main] DEBUG o.s.b.f.annotation.InjectionMetadata - Processing injected method of bean 'com.notificationengine.NotificationServiceTest': AutowiredFieldElement for private com.notificationengine.service.NotificationService com.notificationengine.NotificationServiceTest.notificationService
18:31:03.150 [main] DEBUG o.s.b.f.s.DefaultListableBeanFactory - Returning cached instance of singleton bean 'notificationService'
18:31:03.150 [main] DEBUG o.s.b.f.a.AutowiredAnnotationBeanPostProcessor - Autowiring by type from bean name 'com.notificationengine.NotificationServiceTest' to bean named 'notificationService'
18:31:03.154 [task-scheduler-2] INFO org.apache.zookeeper.ZooKeeper - Initiating client connection, connectString=192.168.4.102:2181 sessionTimeout=400 watcher=org.I0Itec.zkclient.ZkClient@2351449c
18:31:03.155 [task-scheduler-2-SendThread(192.168.4.102:2181)] INFO org.apache.zookeeper.ClientCnxn - Opening socket connection to server 192.168.4.102/192.168.4.102:2181. Will not attempt to authenticate using SASL (unknown error)
Started.testNotify
g reply sessionid:0x14fdaa20a9400b7, packet:: clientPath:null serverPath:null finished:false header:: 2,5 replyHeader:: 2,24649,0 request:: '/config/topics/inMessage_topic,#7b2276657273696f6e223a312c22636f6e666967223a7b7d7d,-1 response:: s{22809,24649,1442483209580,1442494932319,14,0,0,0,25,0,22809}
18:31:03.381 [task-scheduler-3-SendThread(192.168.4.102:2181)] DEBUG org.apache.zookeeper.ClientCnxn - Reading reply sessionid:0x14fdaa20a9400b5, packet:: clientPath:null serverPath:null finished:false header:: 2,3 replyHeader:: 2,24649,0 request:: '/consumers/test-consumer-group/ids,T response:: s{9182,9182,1441255409611,1441255409611,0,2250,0,0,0,4,24648}
18:31:04.058 [task-scheduler-6] DEBUG o.s.integration.channel.QueueChannel - preSend on channel 'inputToKafka', message: GenericMessage [payload=InMessageVO [notificationMethodTypes=[EMAIL], contentReferenceCode=Booking_Confirmataion, moduleName=notification, tenantId=KF, notificationTypeToRecieverMap={EMAIL={TO_ADDRESS=[ne.test@test.com]}}, notificationTypeToMessageDetailsMap={EMAIL={EMAIL_CONTENT=Hi <BR> This is a test email from NE <BR> Regards<BR>-NE, EMAIL_SUBJ=Test Message from NE}}], headers={timestamp=1442494864039, id=0c14746e-93b4-ced0-2fc2-e7117fef3409, tenantId=base, kafka_messageKey=key, kafka_partitionId=3, kafka_topic=inMessage_topic}]
18:31:04.058 [task-scheduler-6] DEBUG o.s.integration.channel.QueueChannel - postSend (sent=true) on channel 'inputToKafka', message: GenericMessage [payload=InMessageVO [notificationMethodTypes=[EMAIL], contentReferenceCode=Booking_Confirmataion, moduleName=notification, tenantId=KF, notificationTypeToRecieverMap={EMAIL={TO_ADDRESS=[ne.test@test.com]}}, notificationTypeToMessageDetailsMap={EMAIL={EMAIL_CONTENT=Hi <BR> This is a test email from NE <BR> Regards<BR>-NE, EMAIL_SUBJ=Test Message from NE}}], headers={timestamp=1442494864039, id=0c14746e-93b4-ced0-2fc2-e7117fef3409, tenantId=base, kafka_messageKey=key, kafka_partitionId=3, kafka_topic=inMessage_topic}]
18:31:05.014 [kafka-producer-network-thread | producer-1] DEBUG o.apache.kafka.clients.NetworkClient - Init connection to node -1 for sending metadata request in the next iteration
18:31:05.014 [kafka-producer-network-thread | producer-1] DEBUG o.apache.kafka.clients.NetworkClient - Initiating connection to node -1 at tncdev6.com:9092.
18:31:05.017 [kafka-producer-network-thread | producer-1] DEBUG o.apache.kafka.clients.NetworkClient - Trying to send metadata request to node -1
18:31:05.049 [kafka-producer-network-thread | producer-1] DEBUG o.apache.kafka.clients.NetworkClient - Completed connection to node -1
18:31:05.117 [kafka-producer-network-thread | producer-1] DEBUG o.apache.kafka.clients.NetworkClient - Trying to send metadata request to node -1
18:31:05.129 [kafka-producer-network-thread | producer-1] DEBUG o.apache.kafka.clients.NetworkClient - Sending metadata request ClientRequest(expectResponse=true, payload=null, request=RequestSend(header={api_key=3,api_version=0,correlation_id=0,client_id=producer-1}, body={topics=[inMessage_topic]})) to node -1
18:31:05.177 [kafka-producer-network-thread | producer-1] DEBUG o.a.k.c.producer.internals.Metadata - Updated cluster metadata version 2 to Cluster(nodes = [Node(0, 192.168.4.102, 9092)], partitions = [Partition(topic = inMessage_topic, partition = 1, leader = 0, replicas = [0,], isr = [0,], Partition(topic = inMessage_topic, partition = 4, leader = 0, replicas = [0,], isr = [0,], Partition(topic = inMessage_topic, partition = 0, leader = 0, replicas = [0,], isr = [0,], Partition(topic = inMessage_topic, partition = 2, leader = 0, replicas = [0,], isr = [0,], Partition(topic = inMessage_topic, partition = 3, leader = 0, replicas = [0,], isr = [0,]])
18:31:05.213 [taskExecutor-3] DEBUG o.s.i.endpoint.PollingConsumer - Received no Message during the poll, returning 'false'
18:31:05.215 [kafka-producer-network-thread | producer-1] DEBUG o.apache.kafka.clients.NetworkClient - Initiating connection to node 0 at 192.168.4.102:9092.
18:31:09.041 [main] DEBUG o.s.t.c.s.DirtiesContextTestExecutionListener - After test method: context [DefaultTestContext@3de0a45 testClass = NotificationServiceTest, testInstance = com.notificationengine.NotificationServiceTest@667439fe, testMethod = testNotify@NotificationServiceTest, testException = [null], mergedContextConfiguration = [MergedContextConfiguration@588b873e testClass = NotificationServiceTest, locations = '{classpath:/bootstrap-test.xml}', classes = '{}', contextInitializerClasses = '[]', activeProfiles = '{}', propertySourceLocations = '{}', propertySourceProperties = '{}', contextLoader = 'org.springframework.test.context.support.DelegatingSmartContextLoader', parent = [null]]], class dirties context [false], class mode [null], method dirties context [false].
18:31:09.043 [main] DEBUG o.s.t.c.s.DirtiesContextTestExecutionListener - After test class: context [DefaultTestContext@3de0a45 testClass = NotificationServiceTest, testInstance = [null], testMethod = [null], testException = [null], mergedContextConfiguration = [MergedContextConfiguration@588b873e testClass = NotificationServiceTest, locations = '{classpath:/bootstrap-test.xml}', classes = '{}', contextInitializerClasses = '[]', activeProfiles = '{}', propertySourceLocations = '{}', propertySourceProperties = '{}', contextLoader = 'org.springframework.test.context.support.DelegatingSmartContextLoader', parent = [null]]], dirtiesContext [false].
18:31:09.045 [Thread-3] INFO o.s.c.s.GenericApplicationContext - Closing org.springframework.context.support.GenericApplicationContext@551eef55: startup date [Thu Sep 17 18:31:01 IST 2015]; root of context hierarchy
18:31:09.046 [Thread-3] DEBUG o.s.b.f.s.DefaultListableBeanFactory - Returning cached instance of singleton bean 'org.springframework.integration.config.IdGeneratorConfigurer#0'
18:31:09.047 [Thread-3] DEBUG o.s.b.f.s.DefaultListableBeanFactory - Returning cached instance of singleton bean 'integrationHeaderChannelRegistry'
18:31:09.047 [Thread-3] DEBUG o.s.b.f.s.DefaultListableBeanFactory - Returning cached instance of singleton bean 'globalChannelInterceptorProcessor'
18:31:09.047 [Thread-3] DEBUG o.s.b.f.s.DefaultListableBeanFactory - Returning cached instance of singleton bean 'org.springframework.integration.config.ConsumerEndpointFactoryBean#0'
18:31:09.048 [Thread-3] DEBUG o.s.b.f.s.DefaultListableBeanFactory - Returning cached instance of singleton bean 'org.springframework.integration.config.ConsumerEndpointFactoryBean#1'
18:31:09.048 [Thread-3] DEBUG o.s.b.f.s.DefaultListableBeanFactory - Returning cached instance of singleton bean 'kafkaInboundChannelAdapter'
18:31:09.048 [Thread-3] DEBUG o.s.b.f.s.DefaultListableBeanFactory - Returning cached instance of singleton bean 'org.springframework.integration.config.ConsumerEndpointFactoryBean#2'
18:31:09.048 [Thread-3] DEBUG o.s.b.f.s.DefaultListableBeanFactory - Returning cached instance of singleton bean 'org.springframework.integration.config.ConsumerEndpointFactoryBean#3'
18:31:09.048 [Thread-3] DEBUG o.s.b.f.s.DefaultListableBeanFactory - Returning cached instance of singleton bean 'kafkaOutboundChannelAdapter'
18:31:09.048 [Thread-3] DEBUG o.s.b.f.s.DefaultListableBeanFactory - Returning cached instance of singleton bean 'kafkaProducerContext'
18:31:09.048 [Thread-3] DEBUG o.s.b.f.s.DefaultListableBeanFactory - Returning cached instance of singleton bean 'org.springframework.integration.config.ConsumerEndpointFactoryBean#4'
18:31:09.048 [Thread-3] DEBUG o.s.b.f.s.DefaultListableBeanFactory - Returning cached instance of singleton bean '_org.springframework.integration.errorLogger'
18:31:09.048 [Thread-3] DEBUG o.s.b.f.s.DefaultListableBeanFactory - Returning cached instance of singleton bean 'lifecycleProcessor'
18:31:09.049 [Thread-3] INFO o.s.c.s.DefaultLifecycleProcessor - Stopping beans in phase 1073741823
18:31:09.049 [Thread-3] DEBUG o.s.c.s.DefaultLifecycleProcessor - Asking bean 'org.springframework.integration.config.ConsumerEndpointFactoryBean#0' of type [class org.springframework.integration.config.ConsumerEndpointFactoryBean] to stop
18:31:09.050 [Thread-3] DEBUG o.s.c.s.DefaultLifecycleProcessor - Bean 'org.springframework.integration.config.ConsumerEndpointFactoryBean#0' completed its stop procedure
18:31:09.050 [task-scheduler-9] DEBUG o.s.i.endpoint.PollingConsumer - Received no Message during the poll, returning 'false'
18:31:09.050 [Thread-3] INFO o.s.i.endpoint.PollingConsumer - stopped org.springframework.integration.config.ConsumerEndpointFactoryBean#0
18:31:09.050 [Thread-3] DEBUG o.s.c.s.DefaultLifecycleProcessor - Asking bean 'org.springframework.integration.config.ConsumerEndpointFactoryBean#1' of type [class org.springframework.integration.config.ConsumerEndpointFactoryBean] to stop
18:31:09.050 [Thread-3] DEBUG o.s.c.s.DefaultLifecycleProcessor - Bean 'org.springframework.integration.config.ConsumerEndpointFactoryBean#1' completed its stop procedure
18:31:09.050 [Thread-3] INFO o.s.i.endpoint.PollingConsumer - stopped org.springframework.integration.config.ConsumerEndpointFactoryBean#1
18:31:09.050 [task-scheduler-5] DEBUG o.s.i.endpoint.PollingConsumer - Received no Message during the poll, returning 'false'
18:31:09.050 [Thread-3] DEBUG o.s.c.s.DefaultLifecycleProcessor - Asking bean 'kafkaInboundChannelAdapter' of type [class org.springframework.integration.config.SourcePollingChannelAdapterFactoryBean] to stop
18:31:09.051 [Thread-3] DEBUG o.s.c.s.DefaultLifecycleProcessor - Bean 'kafkaInboundChannelAdapter' completed its stop procedure
18:31:09.051 [Thread-3] INFO o.s.i.e.SourcePollingChannelAdapter - stopped kafkaInboundChannelAdapter
18:31:09.051 [Thread-3] DEBUG o.s.c.s.DefaultLifecycleProcessor - Asking bean 'org.springframework.integration.config.ConsumerEndpointFactoryBean#2' of type [class org.springframework.integration.config.ConsumerEndpointFactoryBean] to stop
18:31:09.051 [Thread-3] DEBUG o.s.c.s.DefaultLifecycleProcessor - Bean 'org.springframework.integration.config.ConsumerEndpointFactoryBean#2' completed its stop procedure
18:31:09.051 [Thread-3] INFO o.s.i.endpoint.PollingConsumer - stopped org.springframework.integration.config.ConsumerEndpointFactoryBean#2
18:31:09.051 [task-scheduler-8] DEBUG o.s.i.endpoint.PollingConsumer - Received no Message during the poll, returning 'false'
18:31:09.051 [task-scheduler-3] DEBUG o.s.b.f.s.DefaultListableBeanFactory - Returning cached instance of singleton bean 'errorChannel'
18:31:09.051 [Thread-3] DEBUG o.s.c.s.DefaultLifecycleProcessor - Asking bean 'org.springframework.integration.config.ConsumerEndpointFactoryBean#3' of type [class org.springframework.integration.config.ConsumerEndpointFactoryBean] to stop
18:31:09.051 [Thread-3] DEBUG o.s.c.s.DefaultLifecycleProcessor - Bean 'org.springframework.integration.config.ConsumerEndpointFactoryBean#3' completed its stop procedure
18:31:09.051 [task-scheduler-6] DEBUG o.s.i.endpoint.PollingConsumer - Received no Message during the poll, returning 'false'
18:31:09.051 [Thread-3] INFO o.s.i.endpoint.PollingConsumer - stopped org.springframework.integration.config.ConsumerEndpointFactoryBean#3
18:31:09.051 [Thread-3] DEBUG o.s.c.s.DefaultLifecycleProcessor - Asking bean 'kafkaOutboundChannelAdapter' of type [class org.springframework.integration.config.ConsumerEndpointFactoryBean] to stop
18:31:09.051 [Thread-3] DEBUG o.s.c.s.DefaultLifecycleProcessor - Bean 'kafkaOutboundChannelAdapter' completed its stop procedure
18:31:09.051 [Thread-3] INFO o.s.i.endpoint.PollingConsumer - stopped kafkaOutboundChannelAdapter
18:31:09.051 [Thread-3] DEBUG o.s.c.s.DefaultLifecycleProcessor - Asking bean 'org.springframework.integration.config.ConsumerEndpointFactoryBean#4' of type [class org.springframework.integration.config.ConsumerEndpointFactoryBean] to stop
18:31:09.052 [Thread-3] DEBUG o.s.c.s.DefaultLifecycleProcessor - Bean 'org.springframework.integration.config.ConsumerEndpointFactoryBean#4' completed its stop procedure
18:31:09.052 [task-scheduler-1] DEBUG o.s.i.endpoint.PollingConsumer - Received no Message during the poll, returning 'false'
18:31:09.052 [Thread-3] INFO o.s.i.endpoint.PollingConsumer - stopped org.springframework.integration.config.ConsumerEndpointFactoryBean#4
18:31:09.052 [task-scheduler-3] DEBUG o.s.i.c.PublishSubscribeChannel - preSend on channel 'errorChannel', message: ErrorMessage [payload=org.springframework.messaging.MessagingException: Consuming from Kafka failed; nested exception is java.lang.InterruptedException, headers={timestamp=1442494869052, id=f339b359-27d3-03e8-2cce-e80c31970c55}]
18:31:09.052 [Thread-3] INFO o.s.c.s.DefaultLifecycleProcessor - Stopping beans in phase 0
18:31:09.052 [task-scheduler-3] DEBUG o.s.i.handler.LoggingHandler - (inner bean)#78f92fba received message: ErrorMessage [payload=org.springframework.messaging.MessagingException: Consuming from Kafka failed; nested exception is java.lang.InterruptedException, headers={timestamp=1442494869052, id=f339b359-27d3-03e8-2cce-e80c31970c55}]
18:31:09.052 [Thread-3] DEBUG o.s.c.s.DefaultLifecycleProcessor - Asking bean 'kafkaProducerContext' of type [class org.springframework.integration.kafka.support.KafkaProducerContext] to stop
18:31:09.052 [kafka-producer-network-thread | producer-1] DEBUG o.a.k.c.producer.internals.Sender - Beginning shutdown of Kafka producer I/O thread, sending remaining records.
18:31:09.053 [kafka-producer-network-thread | producer-1] DEBUG o.a.k.c.producer.internals.Sender - Shutdown of Kafka producer I/O thread has completed.
18:31:09.054 [Thread-3] DEBUG o.a.k.clients.producer.KafkaProducer - The Kafka producer has closed.
18:31:09.054 [Thread-3] DEBUG o.s.c.s.DefaultLifecycleProcessor - Bean 'kafkaProducerContext' completed its stop procedure
18:31:09.054 [Thread-3] DEBUG o.s.c.s.DefaultLifecycleProcessor - Asking bean '_org.springframework.integration.errorLogger' of type [class org.springframework.integration.config.ConsumerEndpointFactoryBean] to stop
18:31:09.054 [Thread-3] INFO o.s.i.endpoint.EventDrivenConsumer - Removing {logging-channel-adapter:_org.springframework.integration.errorLogger} as a subscriber to the 'errorChannel' channel
18:31:09.054 [Thread-3] INFO o.s.i.c.PublishSubscribeChannel - Channel 'org.springframework.context.support.GenericApplicationContext@551eef55.errorChannel' has 0 subscriber(s).
18:31:09.054 [Thread-3] DEBUG o.s.c.s.DefaultLifecycleProcessor - Bean '_org.springframework.integration.errorLogger' completed its stop procedure
18:31:09.054 [Thread-3] INFO o.s.i.endpoint.EventDrivenConsumer - stopped _org.springframework.integration.errorLogger
18:31:09.054 [Thread-3] INFO o.s.c.s.DefaultLifecycleProcessor - Stopping beans in phase -2147483648
18:31:09.054 [Thread-3] DEBUG o.s.b.f.s.DefaultListableBeanFactory - Destroying singletons in org.springframework.beans.factory.support.DefaultListableBeanFactory@4ed405e2: defining beans [loadConsumer,kafkaProducer,org.springframework.context.annotation.internalConfigurationAnnotationProcessor,org.springframework.context.annotation.internalAutowiredAnnotationProcessor,org.springframework.context.annotation.internalRequiredAnnotationProcessor,org.springframework.context.annotation.internalCommonAnnotationProcessor,notificationService,emailNotificationDispatchService,notificationReceiverMessageHandler,emailNotificationReceiverMessageHandler,channelInitializer,$autoCreateChannelCandidates,IntegrationConfigurationBeanFactoryPostProcessor,integrationEvaluationContext,org.springframework.integration.expression.IntegrationEvaluationContextAwareBeanPostProcessor#0,integrationGlobalProperties,integrationHeaderChannelRegistry,globalChannelInterceptorProcessor,toStringFriendlyJsonNodeToStringConverter,converterRegistrar,integrationConversionService,DefaultConfiguringBeanFactoryPostProcessor,datatypeChannelMessageConverter,messageBuilderFactory,inMessage_topic,org.springframework.integration.config.RouterFactoryBean#0,fixedSubscriberChannelBeanFactoryPostProcessor,org.springframework.integration.config.ConsumerEndpointFactoryBean#0,org.springframework.integration.config.ServiceActivatorFactoryBean#0,org.springframework.integration.config.ConsumerEndpointFactoryBean#1,org.springframework.scheduling.support.PeriodicTrigger#0,org.springframework.integration.context.defaultPollerMetadata,inputFromKafka,receiveMessageFromKafkaChannel,kafkaKeyDecoder,kafkaValueDecoder,kafkaInboundChannelAdapter.source,org.springframework.scheduling.support.PeriodicTrigger#1,kafkaInboundChannelAdapter,consumerContext,consumerProperties,conditionalConsumerService,org.springframework.integration.config.ServiceActivatorFactoryBean#1,org.springframework.integration.config.ConsumerEndpointFactoryBean#2,zookeeperConnect,sendMessageToKafkaChannel,inputToKafka,conditionalProducerService,org.springframework.integration.config.ServiceActivatorFactoryBean#2,org.springframework.integration.config.ConsumerEndpointFactoryBean#3,org.springframework.integration.kafka.outbound.KafkaProducerMessageHandler#0,org.springframework.scheduling.support.PeriodicTrigger#2,kafkaOutboundChannelAdapter,kafkaProducerContext,producerProperties,kafkaKeyEncoder,kafkaValueEncoder,taskExecutor,kafkaProducerService,org.springframework.context.annotation.ConfigurationClassPostProcessor.importAwareProcessor,org.springframework.context.annotation.ConfigurationClassPostProcessor.enhancedConfigurationProcessor,org.springframework.integration.config.ServiceActivatorFactoryBean#3,org.springframework.integration.config.ConsumerEndpointFactoryBean#4,org.springframework.integration.kafka.outbound.KafkaProducerMessageHandler#1,org.springframework.scheduling.support.PeriodicTrigger#3,nullChannel,errorChannel,_org.springframework.integration.errorLogger,taskScheduler,org.springframework.integration.config.IdGeneratorConfigurer#0]; root of factory hierarchy
18:31:09.055 [Thread-3] DEBUG o.s.b.f.s.DefaultListableBeanFactory - Retrieved dependent beans for bean '(inner bean)#78f92fba': [_org.springframework.integration.errorLogger]
18:31:09.055 [task-scheduler-3] ERROR o.s.i.handler.LoggingHandler - org.springframework.messaging.MessagingException: Consuming from Kafka failed; nested exception is java.lang.InterruptedException
at org.springframework.integration.kafka.support.ConsumerConfiguration.executeTasks(ConsumerConfiguration.java:150)
at org.springframework.integration.kafka.support.ConsumerConfiguration.receive(ConsumerConfiguration.java:124)
at org.springframework.integration.kafka.support.KafkaConsumerContext.receive(KafkaConsumerContext.java:73)
at org.springframework.integration.kafka.inbound.KafkaHighLevelConsumerMessageSource.receive(KafkaHighLevelConsumerMessageSource.java:41)
at org.springframework.integration.endpoint.SourcePollingChannelAdapter.receiveMessage(SourcePollingChannelAdapter.java:144)
at org.springframework.integration.endpoint.AbstractPollingEndpoint.doPoll(AbstractPollingEndpoint.java:192)