ruby-kafka

https://github.com/zendesk/ruby-kafka

Ruby

A Ruby client library for Apache Kafka

Kafka::Consumer#seek

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.

Source | Google | Stack overflow

Edit

git clone [email protected]:zendesk/ruby-kafka.git

cd ruby-kafka

open lib/kafka/consumer.rb

Contribute

# Make a new branch

git checkout -b -your-name--update-docs-Kafka--Consumer-seek-for-pr


# Commit to git

git add lib/kafka/consumer.rbgit commit -m "better docs for Kafka::Consumer#seek"


# Open pull request

gem install hub # on a mac you can `brew install hub`

hub fork

git push <your name> -your-name--update-docs-Kafka--Consumer-seek-for-pr

hub pull-request


# Celebrate!