简体   繁体   中英

the meaning of Spring Kafka Listener Thread name?

when I use spring kafka, I hava noticed my log just like this:

2021-01-16 17:07:25.795 [org.springframework.kafka.KafkaListenerEndpointContainer#0-8-C-1] WARN  c.d.j.k.KafkaConsumer [listenerHomework:86]    - no message

and my logback encoder

<pattern>%d{yyyy-MM-dd HH:mm:ss.SSS} [%thread] %-5level %logger{15} [%M:%L] - %msg%n

org.springframework.kafka.KafkaListenerEndpointContainer#0-8-C-1 is the thread name, I want to know the meaning of 0-8-C-1 , or some else doc I can find?

The prefix org.springframework.kafka.KafkaListenerEndpointContainer#0 is a generated bean name. It is a standard Spring container behavior to generate bean names from their classes if no explicit name. The 8 means the consumer index in this container. 1 means that this consumer has been started only once.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM