This is an example application which uses Karafka framework to receive messages from Apache Kafka server, WaterDrop gem to send messages to Kafka server and (for some topics) Karafka Sidekiq Backend (optional) to process them in Sidekiq.
Note: Sidekiq usage in Karafka is optional and it is not a default. To use it, you need to use Karafka Sidekiq Backend. It is added here just as an example of possibility to process things in it automatically.
To run this application locally you should run Apache Kafka on those hosts and ports which are set in karafka.rb
file.
Following commands are available. You should run them in the console.
Run Sidekiq worker to manage messages background processing (only when using Karafka Sidekiq Backend that is optional). You will need to install Redis and run it before running the worker:
bundle exec karafka worker
Run Karafka server to consume messages, schedule and/or process them:
bundle exec karafka s
Generate messages to Kafka server by sending them using WaterDrop:
bundle exec rake waterdrop:send
First, thank you for considering contributing to Karafka! It's people like you that make the open source community such a great community!
Each pull request must pass all the RSpec specs and meet our quality requirements.
To check if everything is as it should be, we use Coditsu that combines multiple linters and code analyzers for both code and documentation. Once you're done with your changes, submit a pull request.
Coditsu will automatically check your work against our quality standards. You can find your commit check results on the builds page of Karafka example app repository.