amqp-as-promised icon indicating copy to clipboard operation
amqp-as-promised copied to clipboard

Support Publisher Confirms

Open mk-pmb opened this issue 5 years ago • 2 comments

Since the docs say exchange.publish returns a promise, I thought I could rely on that to determine when it's ok to close the connection. Looks like it's not, at least not when I have other unrelated publisher connections running at the same time. At least Wireshark can't see any feedback from the server that would warrant the promise being resolved, and nonetheless, it is resolved. When I subsequently close the connection, my last message is lost.

Could you maybe use Publisher Confirms to make sure the promise only resolves once the server got the message? Please also document whether I can use the same publisher channel to send lots of messages (awaiting all their confirms later) and have them be sent in a large burst instead of one by one. cf. Ack Latency for Persistent Messages

Also please document whether amqp-a-p will take care of potential problems with Delivery Tag approaching Number.MAX_SAFE_INTEGER,

mk-pmb avatar Sep 14 '18 13:09 mk-pmb