Exception: BugBunny::PublishNacked
- Defined in:
- lib/bug_bunny/exception.rb
Overview
Error lanzado cuando el broker responde NACK a una publicación en modo ‘:confirmed`.
Un NACK significa que el broker rechazó explícitamente el mensaje (ej: política de confirms interna, disk full, replicación insuficiente). El mensaje no fue aceptado y se considera no entregado — equivalente a un fallo de transporte desde la perspectiva del publisher.
Se levanta por default desde BugBunny::Producer#confirmed. Para opt-out, configurar ‘BugBunny.configuration.nack_raise = false` o pasar `nack_raise: false` por request.
Instance Attribute Summary collapse
-
#nacked_count ⇒ Integer
readonly
Cantidad de mensajes NACKeados según ‘Bunny::Channel#nacked_set`.
-
#path ⇒ String
readonly
La ruta del request cuyo publish fue NACKeado.
Instance Method Summary collapse
-
#initialize(path:, nacked_count:) ⇒ PublishNacked
constructor
A new instance of PublishNacked.
Constructor Details
#initialize(path:, nacked_count:) ⇒ PublishNacked
Returns a new instance of PublishNacked.
46 47 48 49 50 |
# File 'lib/bug_bunny/exception.rb', line 46 def initialize(path:, nacked_count:) @path = path @nacked_count = nacked_count super("broker NACK on path=#{path} (nacked=#{nacked_count})") end |
Instance Attribute Details
#nacked_count ⇒ Integer (readonly)
Returns Cantidad de mensajes NACKeados según ‘Bunny::Channel#nacked_set`.
42 43 44 |
# File 'lib/bug_bunny/exception.rb', line 42 def nacked_count @nacked_count end |
#path ⇒ String (readonly)
Returns La ruta del request cuyo publish fue NACKeado.
39 40 41 |
# File 'lib/bug_bunny/exception.rb', line 39 def path @path end |