Last active
August 29, 2015 14:23
-
-
Save dan-palmer/d802fdf45f1d48fba27d to your computer and use it in GitHub Desktop.
Testing a connection to Rabbit MQ
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
session = Bunny.new( | |
Sneakers::CONFIG[:amqp], | |
heartbeat: Sneakers::CONFIG[:heartbeat], | |
vhost: Sneakers::CONFIG[:vhost]) | |
session.connected? # => false | |
session.start # connects to rabbit | |
session.connected? # => true | |
session.close # closes the connection | |
session.connected? # => false | |
# Sneakers is just a wrapper around the Bunny library so this should be ok |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment