Integrating with Ruby on Rails and other frameworks
Important
GitHub Wiki is just a mirror of our online documentation.
We highly recommend using our website docs due to Github Wiki limitations. Only some illustrations, links, screencasts, and code examples will work here, and the formatting may be broken.
Please use https://karafka.io/docs.
Want to use Karafka with Ruby on Rails or any other framework? It can be done easily!
Karafka detects Ruby on Rails by itself, so no extra changes are required besides running the standard installation process.
Add Karafka to your Gemfile:
bundle add karafka --version ">= 2.3.0"
and run the installation command:
bundle exec karafka install
It will create all the needed directories and files and the karafka.rb
configuration file. After that, you should be good to go.
We also have an example Ruby on Rails application that illustrates integration with this framework.
Non-Rails applications differ from one another. There are single-file applications and apps similar to the Rails structure. That's why we cannot provide a simple single tutorial. Here are some guidelines that you should follow to integrate it with Sinatra based application:
Add Karafka to your application Gemfile:
gem 'karafka'
run the installation process:
bundle exec karafka install
After that, ensure that your application is loaded before setting up and booting Karafka.
Home | Getting started | Components | Producing Messages | Consuming messages | Concurrency and multithreading | Error handling and back off policy
This wiki is tracked by git and publicly editable. You are welcome to fix errors and typos. Any defacing or vandalism of content will result in your changes being reverted and you being blocked.