Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
wrapper around the bunny / rabbitmq gem
Ruby
branch: master

Fetching latest commit…

Cannot retrieve the latest commit at this time

Failed to load latest commit information.
lib
test
.gitignore
Gemfile
README
Rakefile
roger_rabbit.gemspec

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
Something went wrong with that request. Please try again.