Class: Freddy::Adapters::MarchHareAdapter::Queue

Inherits:
Shared::Queue show all
Defined in:
lib/freddy/adapters/march_hare_adapter.rb

Instance Method Summary collapse

Methods inherited from Shared::Queue

#bind, #initialize, #name

Constructor Details

This class inherits a constructor from Freddy::Adapters::Shared::Queue

Instance Method Details

#subscribe(&block) ⇒ Object



48
49
50
51
52
53
# File 'lib/freddy/adapters/march_hare_adapter.rb', line 48

def subscribe(&block)
  @queue.subscribe do |meta, payload|
    parsed_payload = Payload.parse(payload)
    block.call(Delivery.new(parsed_payload, meta, meta.routing_key))
  end
end