0.0
No commit activity in last 3 years
No release in over 3 years
RabbitMQ publishers & consumers in a rails-inspired syntax
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

~> 0.9
~> 10.3.2
~> 3.1

Runtime

~> 2.0
>= 0
 Project Readme

ActiveRabbit

Easy to use workers for RabbitMQ + Ruby

Work in progress

Getting Started

Define your exchanges:

# config/rabbit/exchanges.rb
ActiveRabbit.configuration.exchanges.draw do
  topic :logs
  namespace :actions do
    direct :login
  end
end

Define your queues:

# config/rabbit/queues.rb
ActiveRabbit.configuration.queues.draw do
  queue :log_queue, bind: :logs, routing_key: '*.critical', exclusive: true
end

Define your worker:

# app/rabbit_consumers/log_queue_consumer.rb
class LogQueueConsumer < ActiveRabbit::Consumer

  def consume
    puts message
    puts message.body
  end
end

Publish to exchanges:

message = 'Hello World!'
ActiveRabbit.publish('actions.login', message)