Skip to content

rubyzhang/kafka-demo

 
 

Repository files navigation

Simple demo that uses Kafka as the pub-sub broker. Demo simply sends a stream of words from a novel (ex: Count of Monte Cristo). Last message produced is 'END-OF-STREAM'; this lets the consumer know that no more messages will be coming. The consumer processes each word and keeps tally of the most frequent word it's seen thus far. **NOTE: This is a Apache Kafka demo only. This use-case is probably not best solved by the publish-subscriber pattern. Only meant to demostrate Kafka's ruby api.

To see in action do following:

  • Install Kafka + Zookeeper locally (see their respective documentation for further details).
  • Modify Procfile so it references the correct location of your local Kafka server
  • foreman start
  • ruby kafka-demo.rb

About

Simple demo of Apache Kafka

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Ruby 100.0%