Skip to content

VishalRam/karafka-example-app

 
 

Repository files navigation

Karafka example application

Build Status Code Climate

This is an example application which uses Karafka framework to receive messages from Apache Kafka server and WaterDrop gem to send messages to Kafka server.

To run this application locally you should run Apache Kafka and Apache ZooKeeper servers on those hosts and ports which are set in app.rb and /config/initializers/water_drop.rb files.

Usage

Following available. You should run them in the console.

Run sidekiq worker to manage perform methods of controllers

  bundle exec rake karafka:sidekiq

Run Kafka consumer. It will receive messages and send them to needed controller based on it's topic name

  bundle exec rake karafka:run

Generate messages to Kafka server by sending message directly

  bundle exec rake waterdrop:send

References

Note on Patches/Pull Requests

Fork the project. Make your feature addition or bug fix. Add tests for it. This is important so I don't break it in a future version unintentionally. Commit, do not mess with Rakefile, version, or history. (if you want to have your own version, that is fine but bump version in a commit by itself I can ignore when I pull). Send me a pull request. Bonus points for topic branches.

Each pull request must pass our quality requirements. To check if everything is as it should be, we use PolishGeeks Dev Tools that combine multiple linters and code analyzers. Please run:

bundle exec rake

to check if everything is in order. After that you can submit a pull request.

About

Karafka and WaterDrop example application

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Ruby 100.0%