Hi Keith,
you can use the `auto_offset_reset` parameter to kafka-python's
KafkaConsumer. It behaves the same as the java consumer configuration of
the same name. See
http://kafka-python.readthedocs.org/en/latest/apidoc/kafka.consumer.html#kafka.consumer.KafkaConsumer.configure
for more details on how to configure a KafkaConsumer instance.
For fine-grained control wrt configuring topic/partition offsets, use
KafkaConsumer.set_topic_partitions() . For the most control, pass a
dictionary of {(topic, partition): offset, ...} .
see
http://kafka-python.readthedocs.org/en/latest/apidoc/kafka.consumer.html#kafka.consumer.kafka.KafkaConsumer.set_topic_partitions
-Dana
On Tue, Jul 28, 2015 at 8:47 PM, Keith Wiley <[email protected]> wrote:
> I haven’t found a way to specify that a consumer should read from the
> beginning, or from any other explicit offset, or that the offset should be
> “reset” in any way. The command-line shell scripts (which I believe simply
> wrap the Scala tools) have flags for this sort of thing. Is there any way
> to do this through the python library?
>
> Thanks.