You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@kafka.apache.org by Stevo Slavić <ss...@gmail.com> on 2015/07/21 11:27:43 UTC

New consumer - ConsumerRecords partitions

Hello Apache Kafka community,

New HLC poll returns ConsumerRecords.

Do ConsumerRecords contain records for every partition that HLC is actively
subscribed on for every poll request, or does it contain only records for
partitions which had messages and which were retrieved in poll request?

If latter, then please consider adding a method to ConsumerRecords class,
"public Iterable<TopicPartition> getPartitions()" that the ConsumerRecords
has. I could provide a PR.

Kind regards,
Stevo Slavic.

Re: New consumer - ConsumerRecords partitions

Posted by Stevo Slavić <ss...@gmail.com>.
Hello Jason,

Thanks for feedback. I've created JIRA ticket for feature request:
https://issues.apache.org/jira/browse/KAFKA-2356

Kind regards,
Stevo Slavic.

On Tue, Jul 21, 2015 at 6:17 PM, Jason Gustafson <ja...@confluent.io> wrote:

> Hey Stevo,
>
> I think ConsumerRecords only contains the partitions which had messages.
> Would you mind creating a jira for the feature request? You're welcome to
> submit a patch as well.
>
> -Jason
>
> On Tue, Jul 21, 2015 at 2:27 AM, Stevo Slavić <ss...@gmail.com> wrote:
>
> > Hello Apache Kafka community,
> >
> > New HLC poll returns ConsumerRecords.
> >
> > Do ConsumerRecords contain records for every partition that HLC is
> actively
> > subscribed on for every poll request, or does it contain only records for
> > partitions which had messages and which were retrieved in poll request?
> >
> > If latter, then please consider adding a method to ConsumerRecords class,
> > "public Iterable<TopicPartition> getPartitions()" that the
> ConsumerRecords
> > has. I could provide a PR.
> >
> > Kind regards,
> > Stevo Slavic.
> >
>

Re: New consumer - ConsumerRecords partitions

Posted by Jason Gustafson <ja...@confluent.io>.
Hey Stevo,

I think ConsumerRecords only contains the partitions which had messages.
Would you mind creating a jira for the feature request? You're welcome to
submit a patch as well.

-Jason

On Tue, Jul 21, 2015 at 2:27 AM, Stevo Slavić <ss...@gmail.com> wrote:

> Hello Apache Kafka community,
>
> New HLC poll returns ConsumerRecords.
>
> Do ConsumerRecords contain records for every partition that HLC is actively
> subscribed on for every poll request, or does it contain only records for
> partitions which had messages and which were retrieved in poll request?
>
> If latter, then please consider adding a method to ConsumerRecords class,
> "public Iterable<TopicPartition> getPartitions()" that the ConsumerRecords
> has. I could provide a PR.
>
> Kind regards,
> Stevo Slavic.
>