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`.
Edit
git clone [email protected]:zendesk/ruby-kafka.git
cd ruby-kafka
open lib/kafka/consumer.rb
Contribute
# Make a new branchgit checkout -b -your-name--update-docs-Kafka--Consumer-subscribe-for-pr
# Commit to gitgit add lib/kafka/consumer.rbgit commit -m "better docs for Kafka::Consumer#subscribe"
# Open pull requestgem 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!