kafka-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "M. Manna" <manme...@gmail.com>
Subject Order of ConsumerRecords obtained by records(TopicPartition) in Kafka Consumer API
Date Thu, 06 Jul 2017 12:59:53 GMT

I had a question regarding records(TopicPartition partition) method in

I am trying to use auto.offset.reset=earliest and combine it with manual
offset control.
 I saw this sample code under "Manual Offset"


>From the API, I can see that records(TopicPartition) says:

> public List
> <http://docs.oracle.com/javase/7/docs/api/java/util/List.html?is-external=true>
> <ConsumerRecord
> <https://kafka.apache.org/0100/javadoc/org/apache/kafka/clients/consumer/ConsumerRecord.html>
> <K
> <https://kafka.apache.org/0100/javadoc/org/apache/kafka/clients/consumer/ConsumerRecords.html>
> ,V
> <https://kafka.apache.org/0100/javadoc/org/apache/kafka/clients/consumer/ConsumerRecords.html>
> >> records(TopicPartition
> <https://kafka.apache.org/0100/javadoc/org/apache/kafka/common/TopicPartition.html>
>  partition)
> Get just the records for the given partition

I am assuming that the "order" of ConsumerRecord is maintained in the list
somewhere but couldn't find the source (probably exhausted eyes). Does
anyone know where to find the information about the ordering?


  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message