Bogdan,

The kafka stream does not have an ID itself, the one you mentioned is the
ID of the fetcher thread that put data into the stream. Although there is a
one-to-one mapping between the fetcher thread and the stream, the Ids of
the fetcher cannot be accessed from the kafka stream itself.

Guozhang


On Fri, Jun 6, 2014 at 2:13 AM, Bogdan Dimitriu (bdimitri) <
bdimi...@cisco.com> wrote:

> Hello folks,
>
> I’m using Kafka 0.8.0 with the high level consumer and I have a situation
> where I need to obtain the ID for each of the KafkaStreams that I create.
> The KafkaStream class has a method called “clientId()” that I expected
> would give me just that, but unfortunately it returns the name of the
> consumer group.
> So to make it clear, what I want to obtain is the string that looks like
> this: myconsumergroup_myhost-1402045464004-2dc0cbf2-0.
> Is there any way I could get that value for each of the streams? I’ve
> looked around the source code but I can’t see any way to do this.
>
> Many thanks,
> Bogdan
>
>


-- 
-- Guozhang

Reply via email to