amqplib
amqplib copied to clipboard
ConfirmChannel's publish callback not invoked on channel error
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.
+1 - I'm running into this, too. :(
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.
+1 this is vital for me
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.