Skip to content

mperham/bunny

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

This is a fork of bunny. It currently has a few bug fixes, a build system more to my liking and removed 0.9.1 support, so it’s not totally API compatible with the mainline. If you find any incompatibilities other than that, yell at me and I’ll try to fix it.

The bug fixes are largely to qrack, so hopefully they’ll make it upstream, but 0.9.1 support isn’t on my priority list so I bailed on making the main changes API compatible.

Bunny: A synchronous Ruby AMQP client

GitHub repo: github.com/celldee/bunny

Rubyforge: rubyforge.org/projects/bunny-amqp

Twitter: twitter.com/bunny_amqp

Google Group: groups.google.com/group/bunny-amqp

Blog: bunnyamqp.wordpress.com

DESCRIPTION:

Bunny is an AMQP (Advanced Message Queuing Protocol) client, written in Ruby, that is intended to allow you to interact with AMQP-compliant message brokers/servers such as RabbitMQ in a synchronous fashion.

It is based on a great deal of useful code from amqp by Aman Gupta and Carrot by Amos Elliston.

You can use Bunny to -

  • Create and delete exchanges

  • Create and delete queues

  • Publish and consume messages

Bunny is known to work with RabbitMQ versions 1.5.4 and above with version 0-8 of the AMQP specification.

INSTALL:

Rubyforge: gem install bunny

Gemcutter: gem install bunny

GitHub: Current gem is not available.

QUICK START:

require 'bunny'

b = Bunny.new(:logging => true)

# start a communication session with the amqp server
b.start

# declare a queue
q = b.queue('test1')

# publish a message to the queue
q.publish('Hello everybody!')

# get message from the queue
msg = q.pop[:payload]

puts 'This is the message: ' + msg + "\n\n"

# close the connection
b.stop

EVEN QUICKER START

require 'bunny'

# Create a direct queue named 'my_testq'
Bunny.run { |c| c.queue('my_testq') }

OTHER:

Please see the examples directory for additional usage information.

About

Another synchronous Ruby AMQP client

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Languages

  • Ruby 100.0%