Skip to content

Instantly share code, notes, and snippets.

@celldee
Created December 8, 2012 17:12
Show Gist options
  • Save celldee/4241063 to your computer and use it in GitHub Desktop.
Save celldee/4241063 to your computer and use it in GitHub Desktop.
Bunny - connect using SSL
require 'bunny'
# Usual arguments
conn = Bunny.new(:host => 'myhost', :ssl => true)
conn.start
puts conn.status # :open
puts conn.ssl? # true
# URI
conn2 = Bunny.new("amqps://myhost/%2F") # %2F is '/' URL encoded
conn2.start
puts conn2.status # :open
puts conn.ssl? # true
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment