Skip to content

Instantly share code, notes, and snippets.

@hiyosi
Created March 20, 2012 12:54
Show Gist options
  • Save hiyosi/2135048 to your computer and use it in GitHub Desktop.
Save hiyosi/2135048 to your computer and use it in GitHub Desktop.
require 'rubygems'
require 'bunny'
b = Bunny.new(:host => '192.168.0.1')
b.start
q = b.queue("test1")
print "Message count: #{q.message_count}\n"
msg = q.pop[:payload]
puts "This is the message: " +msg+ "\n\n"
b.stop
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment