Class: Freddy::Adapters::MarchHareAdapter::Channel
- Inherits:
-
Object
- Object
- Freddy::Adapters::MarchHareAdapter::Channel
- Extended by:
- Forwardable
- Defined in:
- lib/freddy/adapters/march_hare_adapter.rb
Constant Summary collapse
- NO_ROUTE =
312
Instance Method Summary collapse
-
#initialize(channel) ⇒ Channel
constructor
A new instance of Channel.
- #on_no_route(&block) ⇒ Object
- #queue(*args) ⇒ Object
Constructor Details
#initialize(channel) ⇒ Channel
Returns a new instance of Channel.
30 31 32 |
# File 'lib/freddy/adapters/march_hare_adapter.rb', line 30 def initialize(channel) @channel = channel end |
Instance Method Details
#on_no_route(&block) ⇒ Object
40 41 42 43 44 45 46 |
# File 'lib/freddy/adapters/march_hare_adapter.rb', line 40 def on_no_route(&block) @channel.on_return do |reply_code, _, exchange_name, _, properties| if exchange_name != Freddy::FREDDY_TOPIC_EXCHANGE_NAME && reply_code == NO_ROUTE block.call(properties.correlation_id) end end end |