Method: Kafka::Consumer#seek
- Defined in:
- lib/kafka/consumer.rb
#seek(topic, partition, offset) ⇒ nil
Move the consumer's position in a topic partition to the specified offset.
Note that this has to be done prior to calling #each_message or #each_batch and only has an effect if the consumer is assigned the partition. Typically, you will want to do this in every consumer group member in order to make sure that the member that's assigned the partition knows where to start.
383 384 385 |
# File 'lib/kafka/consumer.rb', line 383 def seek(topic, partition, offset) @offset_manager.seek_to(topic, partition, offset) end |