Sha256: 6b2a912e17e67db42e7a21552886d11043e6c612ab60b9d12ba5e22c0728d74b

Contents?: true

Size: 454 Bytes

Versions: 8

Compression:

Stored size: 454 Bytes

Contents

class FrenzyBunnies::QueueFactory
  def initialize(connection, exchange)
    @connection = connection
    @exchange = exchange
  end

  def build_queue(name, prefetch, durable)
    channel = @connection.create_channel
    channel.prefetch = prefetch

    exchange = channel.exchange(@exchange, :type => :direct, :durable => durable)

    queue = channel.queue(name, :durable => durable)
    queue.bind(exchange, :routing_key => name)
    queue
  end
end

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
frenzy_bunnies-0.0.8 lib/frenzy_bunnies/queue_factory.rb
frenzy_bunnies-0.0.7 lib/frenzy_bunnies/queue_factory.rb
frenzy_bunnies-0.0.6 lib/frenzy_bunnies/queue_factory.rb
frenzy_bunnies-0.0.5 lib/frenzy_bunnies/queue_factory.rb
frenzy_bunnies-0.0.4 lib/frenzy_bunnies/queue_factory.rb
frenzy_bunnies-0.0.3 lib/frenzy_bunnies/queue_factory.rb
frenzy_bunnies-0.0.2 lib/frenzy_bunnies/queue_factory.rb
frenzy_bunnies-0.0.1 lib/frenzy_bunnies/queue_factory.rb