You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@kafka.apache.org by James King <ja...@gmail.com> on 2015/03/31 15:10:25 UTC

Kafka Consumer

I created a topic using:

bin/kafka-topics.sh --create --zookeeper localhost:2181
--replication-factor 1 --partitions 1 --topic test

How do I find out what group it belongs to?

Thank you.

Re: Kafka Consumer

Posted by svante karlsson <sa...@csi.se>.
Your consumer "might" belong to a consumer group. Just commit offsets to
that consumer groups/topic/partition and it will work.

That said - if you want to figure out the consumers groups that exists you
have to look in zookeeper. There is no kafka API to get or create them. In
the java client it is done internally by a zookeeper connector

the following paths seems to exists for all consumer groups
/consumers/"consumer_group"/offsets
/consumers/"consumer_group"/owners

/svante




2015-03-31 15:10 GMT+02:00 James King <ja...@gmail.com>:

> I created a topic using:
>
> bin/kafka-topics.sh --create --zookeeper localhost:2181
> --replication-factor 1 --partitions 1 --topic test
>
> How do I find out what group it belongs to?
>
> Thank you.
>

Re: Kafka Consumer

Posted by James King <ja...@gmail.com>.
Many thanks for the responses.

Harsh your response has clarified things a bit for me.

I'm trying from Spark:

KafkaUtils.createStream(spark, "zkHos:2181", "groupid", topics);

And wasn't sure what value i should use for 'group' in consumer docs it
says default is groupid so used that.

But will read further to be more clear on this.

Thanks.


On Tue, Mar 31, 2015 at 3:44 PM, Harsha <ka...@harsha.io> wrote:

> Hi James,
>         Can you elaborate on what you mean by group here?. There are no
> groups on the topic side but there are consumer groups and these will be on
> consumer side .
> "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.”
> More info on this page http://kafka.apache.org/documentation.html look
> for "consumer group”.
>
>
> --
> Harsha
>
>
> On March 31, 2015 at 6:10:59 AM, James King (jakwebinbox@gmail.com) wrote:
>
> I created a topic using:
>
> bin/kafka-topics.sh --create --zookeeper localhost:2181
> --replication-factor 1 --partitions 1 --topic test
>
> How do I find out what group it belongs to?
>
> Thank you.
>
>

Re: Kafka Consumer

Posted by Harsha <ka...@harsha.io>.
Hi James,
        Can you elaborate on what you mean by group here?. There are no groups on the topic side but there are consumer groups and these will be on consumer side .
"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.”
More info on this page http://kafka.apache.org/documentation.html look for "consumer group”. 


-- 
Harsha


On March 31, 2015 at 6:10:59 AM, James King (jakwebinbox@gmail.com) wrote:

I created a topic using:  

bin/kafka-topics.sh --create --zookeeper localhost:2181  
--replication-factor 1 --partitions 1 --topic test  

How do I find out what group it belongs to?  

Thank you.