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

question about consumer group. #9

Closed
xiaojun789 opened this issue Jan 9, 2014 · 10 comments
Closed

question about consumer group. #9

xiaojun789 opened this issue Jan 9, 2014 · 10 comments

Comments

@xiaojun789
Copy link

in the kakfa document said, only one conusmer can consume one partition in the same consumer group. but I test kafka-node, it seems allow doing this.

doese the kafka-node support this feature? or I have some mistake? Thanks~!

@haio
Copy link
Member

haio commented Jan 9, 2014

I think multiple consumers of the same consumer group can consume the same one partition, as is kafka-node.There is no way to prevent user from creating many consumer with the same group, it's all up to you. The default consumer group of consumer in kafka-node is kafka-node-group.

@geoffrey-young
Copy link

from

from https://kafka.apache.org/documentation.html#introduction"

"Consumers label themselves with a consumer group name, and each message published to a topic is delivered to one consumer instance within each subscribing consumer group. Consumer instances can be in separate processes or on separate machines. If all the consumer instances have the same consumer group, then this works just like a traditional queue balancing load over the consumers."

kafka-node doesn't currently support this, as far as I can tell - concurrent kafka-node scripts using the same groupId will all receive the same message, and therefore each message is processed multiple times.

this comment:

dpkp/kafka-python#112

makes me think it's not possible, but I haven't been able to figure out why some languages are capable of supporting coordinated consumers and others are not...

@haio
Copy link
Member

haio commented Mar 20, 2014

This problem is interesting, I don't know why this feature not support non-JVM clients, maybe kafka guys can explain it ^_^.

@haio haio closed this as completed Apr 6, 2014
@karthic891
Copy link

Hi haio,

As @geoffrey-young pointed out, in Kafka, message distribution is load balanced across all the consumers of the same consumer group and hence should not receive the same message.

Currently with kafka-node, all the consumers under a consumer group, listening to the same topic, receive the same set of messages. Would there be a fix for this in kafka-node?

I'm building a Node.js + Socket.io cluster for server-side push using Kafka as the event-driven messaging system. The kafka-node consumers in all the nodes in my cluster is listening to the same topic and gets the same message, and hence I end up pushing the same message to the browser multiple times(the same number as the number of Kafka consumers).

Thanks & Regards,
Karthic

@dmtrs
Copy link

dmtrs commented Sep 22, 2015

+1

@dmtrs
Copy link

dmtrs commented Sep 22, 2015

@karthic891 Did you actually resolve this issue?

@karthic891
Copy link

@dmtrs No, the issue is still open as I couldn't find any alternative way(hack) to achieve the desired behaviour. CC'ing @haio

@dmtrs
Copy link

dmtrs commented Oct 6, 2015

@haio Can we reopen this issue please. It seems that they have result issue in python client

@rajiff
Copy link

rajiff commented Apr 5, 2017

+1

Let's try to see how this can be fixed, if possible, I am willing to contribute with some help

@hyperlink
Copy link
Collaborator

Are you using the ConsumerGroup? This is not still an issue afaik.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

7 participants