Method: Bunny::Queue#subscribe_with
- Defined in:
- lib/bunny/queue.rb
#subscribe_with(consumer, opts = {:block => false}) ⇒ Object
Adds a consumer object to the queue (subscribes for message deliveries).
250 251 252 253 254 255 |
# File 'lib/bunny/queue.rb', line 250 def subscribe_with(consumer, opts = {:block => false}) @channel.basic_consume_with(consumer) @channel.work_pool.join if opts[:block] consumer end |