Exception: AceMQ::AMQP::PublishError
- Inherits:
-
TransportError
- Object
- StandardError
- TransportError
- AceMQ::AMQP::PublishError
- Defined in:
- lib/acemq/amqp/transport.rb
Overview
A message the broker would not take, or took and could not route.
The two are told apart by #unroutable? rather than by two classes, because a caller who only wants to know that the message did not arrive should not have to rescue both. Go and Python split the same failure the same way — a flag on the one error — and the word the telemetry writes is read off it, so the counter and the span cannot disagree about which of the two happened.
Direct Known Subclasses
Instance Method Summary collapse
-
#initialize(message = nil, unroutable: false) ⇒ PublishError
constructor
A new instance of PublishError.
-
#unroutable? ⇒ Boolean
Whether the broker accepted the message and had nowhere to put it.
Constructor Details
#initialize(message = nil, unroutable: false) ⇒ PublishError
Returns a new instance of PublishError.
50 51 52 53 |
# File 'lib/acemq/amqp/transport.rb', line 50 def initialize( = nil, unroutable: false) super() @unroutable = unroutable end |
Instance Method Details
#unroutable? ⇒ Boolean
Whether the broker accepted the message and had nowhere to put it.
False for everything else: a refused publish, a connection that dropped mid-flight, a confirm that never came. Only a mandatory publish can ever set it, because only a mandatory publish is told.
46 |
# File 'lib/acemq/amqp/transport.rb', line 46 def unroutable? = @unroutable |