Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support streaming confirms #432

Open
baelter opened this issue Aug 18, 2016 · 2 comments
Open

Support streaming confirms #432

baelter opened this issue Aug 18, 2016 · 2 comments
Labels

Comments

@baelter
Copy link
Contributor

baelter commented Aug 18, 2016

From rabbitmq docs:

"To improve throughput, applications are strongly advised to process acknowledgements asynchronously (as a stream) or publish batches of messages and wait for outstanding confirms. The exact API for this varies between client libraries"

Without it the channel is blocked until last publish is confirmed.

@michaelklishin
Copy link
Member

I am surprised that confirms callbacks aren't implemented but Bunny::Channel#handle_ack_or_nack suggests just that :/

@olivierlacan
Copy link

olivierlacan commented Oct 11, 2018

@baelter Pretty sure that's exactly how Bunny handles this by default. Tested this yesterday and even with channel.confirm_select called prior to publishing 20k messages the messages are published in about 9/10 seconds, it's only on channel.wait_for_confirms that the process is blocked until this call returns with either true or false while also populating channel.nacked_sets with a set of message IDs which were nacked. In my experience it took about 40/60 seconds for the same set of 20k messages.

So yeah, it's not truly streaming confirms but it's efficiently batching publishes and I can't honestly think of a situation (I could be wrong) where you wouldn't want to wait (block) until all confirms have been received.

Definitely this could be improved with some sort of Promise or streaming the reception of confirms in a way that would allow the client to start handling publication failures.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants