Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Using Same Group ID with Multiple Consumer Groups Causes Problems #2975

Open
ugrkm opened this issue Aug 29, 2024 · 4 comments
Open

Using Same Group ID with Multiple Consumer Groups Causes Problems #2975

ugrkm opened this issue Aug 29, 2024 · 4 comments
Labels
stale Issues and pull requests without any recent activity

Comments

@ugrkm
Copy link

ugrkm commented Aug 29, 2024

Description

I use ConsumerGroups to consume kafka messages. I have two instances that run on kubernetes. I give the same group ID to both instances. This is to have fault tolerance (one of the pod goes down, the other should be able to keep consuming). What happens is, two instances run side by side. One of them consumes messages alright. But, when I kill one of the pods, the other one can't keep consuming. My guess is maybe broker only accepts one of the pod's ConsumerGroup and just ignores the other one? Could someone please clarify the behavior?

Versions
Sarama Kafka Go
v1.43.2 3.5.1 1.22.2
Configuration
config.Consumer.Offsets.AutoCommit.Enable = false
config.Consumer.Offsets.Initial = sarama.OffsetOldest
config.Consumer.Return.Errors = true
@lbydev
Copy link

lbydev commented Sep 14, 2024

Does your current topic have only one partition? If so, only one consumer will be able to consume messages. Could you check the number of partitions in your topic?

@puellanivis
Copy link
Contributor

Does your current topic have only one partition? If so, only one consumer will be able to consume messages. Could you check the number of partitions in your topic?

I mean, even if this were the case, it should redistribute partitions to the consumers if one of them fails, right?

@lbydev
Copy link

lbydev commented Sep 14, 2024

Thank you for your reply. I apologize for the misunderstanding. You are correct that Kafka should redistribute partitions among the remaining consumers in the group when one of them fails.

Copy link

Thank you for taking the time to raise this issue. However, it has not had any activity on it in the past 90 days and will be closed in 30 days if no updates occur.
Please check if the main branch has already resolved the issue since it was raised. If you believe the issue is still valid and you would like input from the maintainers then please comment to ask for it to be reviewed.

@github-actions github-actions bot added the stale Issues and pull requests without any recent activity label Dec 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
stale Issues and pull requests without any recent activity
Projects
None yet
Development

No branches or pull requests

3 participants