You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@kafka.apache.org by Joyce Chen <jo...@equinix.com> on 2016/09/14 23:55:52 UTC

Kafka consumer group problem

Hi,

I created a few consumers that belong to the same group_id, but I noticed that each consumer get all messages instead of only some of the messages.

As for the topic, I did create the topic with a few partitions.

Anyone else had the same problem? Is there any configuration parameter I need to set in order for consumer groups to work?

Below the sample of the python code:
consumer = KafkaConsumer(topic, group_id, bootstrap_servers=["%s:%d" % (kafka_host, kafka_port)])


Thanks!
Joyce




Re: Kafka consumer group problem

Posted by Michael Freeman <mi...@gmail.com>.
Did you try  props.put("group.id", "test");

On Thu, Sep 15, 2016 at 12:55 AM, Joyce Chen <jo...@equinix.com> wrote:

> Hi,
>
> I created a few consumers that belong to the same group_id, but I noticed
> that each consumer get all messages instead of only some of the messages.
>
> As for the topic, I did create the topic with a few partitions.
>
> Anyone else had the same problem? Is there any configuration parameter I
> need to set in order for consumer groups to work?
>
> Below the sample of the python code:
> consumer = KafkaConsumer(topic, group_id, bootstrap_servers=["%s:%d" %
> (kafka_host, kafka_port)])
>
>
> Thanks!
> Joyce
>
>
>
>