0.0
No commit activity in last 3 years
No release in over 3 years
Sweet wrapper around the bunny rabbitmq library
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Runtime

 Project Readme
roger_rabbit is a wrapper around the bunny rabbitmq gem
that makes doing things with rabbitmq simple.

The point is to come up with a set of conventions that make
rabbitmq services easy to configure, maintain, develop, and 
test.

# Messages are transmitted as json.  Deserialized as
# ActiveSupport::HashWithIndifferentAccess.

# Publishing a message, don't care about result.
RogerRabbit.publish "queue-name", :joe => "cool"

# Consuming the above message.
RogerRabbit.consume "queue-name" do |msg|
  # msg is { :joe => "cool" }
end


# Listening for a RPC message.
RogerRabbit.rpc_listen("another-queue") do |args|
  args.merge({:true => true})
end
  
# Sending an RPC message
result = RogerRabbit.rpc_message("another-queue", :joe => "cool")
# result is { :joe => "cool", :true => "true" }


# Sending an RPC message with result as block
RogerRabbit.rpc_message("another-queue", :joe => "cool") do |result|
  # result is { :joe => "cool", :true => "true" }
end