class Liebre::Adapter::Bunny::Chan

Attributes

channel[R]

Public Class Methods

new(channel) click to toggle source
# File lib/liebre/adapter/bunny/chan.rb, line 9
def initialize channel
  @channel = channel
end

Public Instance Methods

close() click to toggle source
# File lib/liebre/adapter/bunny/chan.rb, line 31
def close
  channel.close
end
default_exchange() click to toggle source
# File lib/liebre/adapter/bunny/chan.rb, line 13
def default_exchange
  Exchange.new(channel.default_exchange)
end
exchange(name, type, opts) click to toggle source
# File lib/liebre/adapter/bunny/chan.rb, line 17
def exchange name, type, opts
  opts = opts.merge(:type => type)

  Exchange.new(channel.exchange(name, opts))
end
queue(name, opts) click to toggle source
# File lib/liebre/adapter/bunny/chan.rb, line 23
def queue name, opts
  Queue.new(channel.queue(name, opts))
end
set_prefetch(count) click to toggle source
# File lib/liebre/adapter/bunny/chan.rb, line 27
def set_prefetch count
  channel.basic_qos(count, false)
end