You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@kafka.apache.org by Garrett Barton <ga...@gmail.com> on 2017/08/01 14:06:37 UTC
Monitor all stream consumers for lag
I have a simple stream setup which reads a source topic and forks to an
aggregation with its own statestore, and a flatmap().to("topic1") and that
topic is read in to a global state store.
I use ConsumerGroupCommand to query for the lag of each consumer on the
topics.
https://github.com/apache/kafka/blob/trunk/core/src/main/scala/kafka/admin/ConsumerGroupCommand.scala
It seems like ConsumerGroupCommand only shows some consumers, but not all.
I can see the consumer for the original source topic, but I don't see one
for 'topic1', yet the globalstatestore is populated.
How can I see the lag of the globalstatestore consumer?
Re: Monitor all stream consumers for lag
Posted by Garrett Barton <ga...@gmail.com>.
Oh that makes a lot of sense now that I think of it. GlobalStores cannot
be part of a group since they have to consume the entire stream per
instance.
On Tue, Aug 1, 2017 at 10:18 AM, Damian Guy <da...@gmail.com> wrote:
> Hi Garrett,
>
> The global state store doesn't use consumer groups and doesn't commit
> offsets. The offsets are checkpointed to local disk, so they won't show up
> with the ConsumerGroupCommand.
>
> That said it would be useful to see the lag, so maybe raise a JIRA for it?
>
> Thanks,
> Damian
>
> On Tue, 1 Aug 2017 at 15:06 Garrett Barton <ga...@gmail.com>
> wrote:
>
> > I have a simple stream setup which reads a source topic and forks to an
> > aggregation with its own statestore, and a flatmap().to("topic1") and
> that
> > topic is read in to a global state store.
> >
> > I use ConsumerGroupCommand to query for the lag of each consumer on the
> > topics.
> >
> > https://github.com/apache/kafka/blob/trunk/core/src/
> main/scala/kafka/admin/ConsumerGroupCommand.scala
> >
> > It seems like ConsumerGroupCommand only shows some consumers, but not
> all.
> > I can see the consumer for the original source topic, but I don't see one
> > for 'topic1', yet the globalstatestore is populated.
> >
> > How can I see the lag of the globalstatestore consumer?
> >
>
Re: Monitor all stream consumers for lag
Posted by Damian Guy <da...@gmail.com>.
Hi Garrett,
The global state store doesn't use consumer groups and doesn't commit
offsets. The offsets are checkpointed to local disk, so they won't show up
with the ConsumerGroupCommand.
That said it would be useful to see the lag, so maybe raise a JIRA for it?
Thanks,
Damian
On Tue, 1 Aug 2017 at 15:06 Garrett Barton <ga...@gmail.com> wrote:
> I have a simple stream setup which reads a source topic and forks to an
> aggregation with its own statestore, and a flatmap().to("topic1") and that
> topic is read in to a global state store.
>
> I use ConsumerGroupCommand to query for the lag of each consumer on the
> topics.
>
> https://github.com/apache/kafka/blob/trunk/core/src/main/scala/kafka/admin/ConsumerGroupCommand.scala
>
> It seems like ConsumerGroupCommand only shows some consumers, but not all.
> I can see the consumer for the original source topic, but I don't see one
> for 'topic1', yet the globalstatestore is populated.
>
> How can I see the lag of the globalstatestore consumer?
>