ruby-kafka

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

Ruby

A Ruby client library for Apache Kafka

Kafka::Consumer#each_message

Fetches and enumerates the messages in the topics that the consumer group
subscribes to.

Each message is yielded to the provided block. If the block returns
without raising an exception, the message will be considered successfully
processed. At regular intervals the offset of the most recent successfully
processed message in each partition will be committed to the Kafka
offset store. If the consumer crashes or leaves the group, the group member
that is tasked with taking over processing of these partitions will resume
at the last committed offsets.

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-each_message-for-pr


# Commit to git

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


# 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-each_message-for-pr

hub pull-request


# Celebrate!