You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The above code should given an error because you're not supposed to be able to create two consumer groups with the same group ID, but you're able to do so here.
Additional context
N/A
The text was updated successfully, but these errors were encountered:
The above code should given an error because you're not supposed to be able to create two consumer groups with the same group ID, but you're able to do so here
Why would it not be allowed? A consumer group is intended to contain more than one consumer. Whilst unusual, if you use the same groupId for two sarama.NewConsumerGroup(...) calls within the same Go process, it is really no different functionally to you running two separate Go processes that both join the same group. You'll just have two members within your single process, with different partition assignments within the same group.
Why would it not be allowed? A consumer group is intended to contain more than one consumer. Whilst unusual, if you use the same groupId for two sarama.NewConsumerGroup(...) calls within the same Go process, it is really no different functionally to you running two separate Go processes that both join the same group. You'll just have two members within your single process, with different partition assignments within the same group.
Alright, fair enough. It just wasn't something that was clear to me from looking at the function's signature / documentation because as far as I know in Kafka, if you try to create a new consumer group with the same group ID as one that already exists, you can't generally do that. What you're referring to seems to be adding new consumers to the existing consumer group (I could be wrong, I'm still learning Kafka).
Description
The issue is simple:
The above code should given an error because you're not supposed to be able to create two consumer groups with the same group ID, but you're able to do so here.
Additional context
N/A
The text was updated successfully, but these errors were encountered: