Sha256: d2406412924944f5d72000a1d1562ac03415357a56abc9e067f01e237ff626d0

Contents?: true

Size: 797 Bytes

Versions: 5

Compression:

Stored size: 797 Bytes

Contents

require "bunny"

module MessageQueue
  module Adapters
    class Bunny < Adapter
      # 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.
      def new_connection(serializer, options = {})
        settings = options[:uri] ? AMQ::Settings.parse_amqp_url(options[:uri]).merge(options) : options
        Connection.new(serializer, settings)
      end
    end
  end
end

require "message_queue/adapters/bunny/connection"

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
message_queue-0.1.1 lib/message_queue/adapters/bunny.rb
message_queue-0.1.0 lib/message_queue/adapters/bunny.rb
message_queue-0.0.4 lib/message_queue/adapters/bunny.rb
message_queue-0.0.3 lib/message_queue/adapters/bunny.rb
message_queue-0.0.2 lib/message_queue/adapters/bunny.rb