Spring Kafka Consumer Client-Id configuration

☆樱花仙子☆ 提交于 2019-12-12 04:18:23

问题


I am where i have two Kafka Listener components, each listening to a different topic and expecting a different payload. My question is, can i use the same client-id for both or does it have to be different? If the client-id has to be different i am wanting to understand a use-case where the client-id can be effectively used.


回答1:


According to the docs:

An id string to pass to the server when making requests. The purpose of this is to be able to track the source of requests beyond just ip/port by allowing a logical application name to be included in server-side request logging.

So, technically you really can have the same value for different consumers/producers



来源:https://stackoverflow.com/questions/45173712/spring-kafka-consumer-client-id-configuration

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!