Class: MessageQueue::Adapters::Bunny
- Defined in:
- lib/message_queue/adapters/bunny.rb
Defined Under Namespace
Classes: Connection
Instance Method Summary collapse
-
#new_connection(serializer, options = {}) ⇒ Object
Public: Initialize a RabbitMQ connection.
Methods inherited from Adapter
Instance Method Details
#new_connection(serializer, options = {}) ⇒ Object
Public: Initialize a RabbitMQ connection.
options - The Hash options used to initialize a connection.
:uri - The String URI described in http://rubybunny.info/articles/connecting.html.
Returns MessageQueue::Adapters::Bunny::Connection if the options are valid. Raises ArgumentError when connection URI schema is not amqp or amqps, or the path contains multiple segments.
13 14 15 16 |
# File 'lib/message_queue/adapters/bunny.rb', line 13 def new_connection(serializer, = {}) settings = [:uri] ? AMQ::Settings.parse_amqp_url([:uri]).merge() : Connection.new(serializer, settings) end |