Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
tree: 846ae25b3a
Fetching contributors…

Cannot retrieve contributors at this time

file 17 lines (14 sloc) 0.454 kb
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17
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
Something went wrong with that request. Please try again.