ruby-kafka

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

Ruby

A Ruby client library for Apache Kafka

Kafka::Consumer#subscribe

Subscribes the consumer to a topic.

Typically you either want to start reading messages from the very
beginning of the topic's partitions or you simply want to wait for new
messages to be written. In the former case, set `default_offsets` to
`:earliest` (the default); in the latter, set it to `:latest`.

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


# Commit to git

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


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

hub pull-request


# Celebrate!