Method: AMQ::Client::Async::Consumer#consume

Defined in:
lib/amq/client/async/consumer.rb

#consume(nowait = false, &block) ⇒ Object



63
64
65
66
67
68
69
70
# File 'lib/amq/client/async/consumer.rb', line 63

def consume(nowait = false, &block)
  @connection.send_frame(Protocol::Basic::Consume.encode(@channel.id, @queue.name, @consumer_tag, @no_local, @no_ack, @exclusive, nowait, @arguments))
  self.redefine_callback(:consume, &block)

  @channel.consumers_awaiting_consume_ok.push(self)

  self
end