DWQA QuestionsCategory: ProgramKafka consumer group
esolve asked 11 months ago

In a springboot project
The ID number of Kafka consumption group is to be configured in the configuration file
spring.kafka.consumer.group-id
Kafka is then used to consume the data
@KafkaListener(topics = “TOPIC_NAME”)
I changed the group ID name in the configuration file
You can’t spend it
Please select a group ID randomly in the configuration of springboot
After the service is up, a new consumer group can be created
Or do you want to create a consumer group on Kafka with the command
Then use the established consumer group ID on the configuration file?

2 Answers
iamzhoug37 answered 11 months ago

Consumer ID is stored on the broker to identify a group of consumers under a topic. Only with the concept of consumption group can we identify where you have consumed, offset submission, partition allocation, etc.. And resources need to be applied for. I really don’t know how to answer you. I suggest that you look through the documents on the official website or find some information on the Internet

iamzhoug37 replied 11 months ago

That certainly can’t consume, you didn’t apply

codecraft answered 11 months ago

The consumer group can define itself. If the same group wants to repeat consumption, it needs to be set auto.offset.reset We can start from scratch