amqplib icon indicating copy to clipboard operation
amqplib copied to clipboard

ConfirmChannel's publish callback not invoked on channel error

Open mhr3 opened this issue 9 years ago • 4 comments

It seems that if for example connection to the server is closed, the callback passed to ConfirmChannel.publish() is never invoked. Would be nice if some kind of error was propagated there.

mhr3 avatar Sep 30 '15 15:09 mhr3

+1 - I'm running into this, too. :(

jwalton avatar Oct 06 '15 19:10 jwalton

My test case, in case you're curious - if you connect with a heartbeat, then send a message, then suspend your worker process, wait for RabbitMQ to kill your connection, then resume your process, you never get any kind of error back for the publish.

jwalton avatar Oct 06 '15 19:10 jwalton

+1 this is vital for me

Matthew-Davey avatar Feb 22 '16 17:02 Matthew-Davey

Hi, just run into this as well. This behavior should be documented (and visibly), because it seems to be the popular consensus that a callback should always succeed or fail, and never "hang" if an underlying layer is known to have failed. Additionally, waitForConfirms does exactly the same - leaves promises hanging forever. A tutorial / tip should be included, telling users to manually "fail" their outstanding messages.

I find #220 to be relevant as well.

rkaw92 avatar Jun 27 '17 14:06 rkaw92