Method: Bunny::Channel#queue
- Defined in:
- lib/bunny/channel.rb
#queue(name = AMQ::Protocol::EMPTY_STRING, opts = {}) ⇒ Bunny::Queue
Declares a queue or looks it up in the per-channel cache.
478 479 480 481 482 483 484 485 |
# File 'lib/bunny/channel.rb', line 478 def queue(name = AMQ::Protocol::EMPTY_STRING, opts = {}) throw ArgumentError.new("queue name must not be nil") if name.nil? q = find_queue(name) || Bunny::Queue.new(self, name, opts) record_queue(q) register_queue(q) end |