how about stop the kafka brokers and restart them and restart producers and 
consumers?




---- 回复的原邮件 ----
| 发件人 | Xiong, Pin<pinxion...@foxmail.com> |
| 日期 | 2022年03月31日 22:14 |
| 收件人 | users@kafka.apache.org<users@kafka.apache.org> |
| 抄送至 | |
| 主题 | [Question] What is the best practice in consuming multiple topics? |
To whom it may concern,

I have a very different problem when using Kafka, and hope someone can help me!

Background

I need to consume several different topics in my java project. For each topic, 
they has different configurations, such as max.pull.records, but the same 
consumer group.

Also, there are different business logic for each topic.


How did I do

I have created different KafkaConsumer instances with different topics. Because 
I can setup the configurations only when creating the KafkaConsumer instance.


Problem

Some topic partitions cannot be consumed. This is really a mazing phenomenon! I 
found that the client.id will be changed when I redeployed and restarted the 
project.

All of KafkaConsumer share with the global static variable 
CONSUMER_CLIENT_ID_SEQUENCE in ConsumerConfig if I didn’t set client.id .

Is it the best practice to configure the different client.id for each 
KafkaConsumer instance? Or who can tell me how to solve my issue?


Looking forward to your reply!

Thanks,
Pin

Reply via email to