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

Asyncronous delivery confirmation #116

Open
antoinerabany opened this issue Mar 15, 2022 · 4 comments
Open

Asyncronous delivery confirmation #116

antoinerabany opened this issue Mar 15, 2022 · 4 comments

Comments

@antoinerabany
Copy link

Hi,

First, thanks for the work.

We are experiencing some slow-down while enqueuing message with confirm-delivery. Some time before we were not using this feature and enqueuing would be quite fast, and after enabling this feature, enqueuing would become quite slower.

I checked and it seems that the lib wait for the confirmation on each message while on the following blog post (https://blog.rabbitmq.com/posts/2011/02/introducing-publisher-confirms) they seems to tell us to enqueue all the message and then wait for all the confirmations, do you think there would be a way for amqpstorm to handle that ? If you have some indications, I could try an implementation.

Thank you.

@eandersson
Copy link
Owner

There are some fundamental problems with how I implemented RPC that will make this a bit tricky to implement, but shouldn't be impossible. I'll need some time to think about it.

However, if you are simply looking at publishing multiple messages you could just wrap the messages you are trying to publish around a transaction, e.g.

with channel.tx:
    for index in range(100):
        channel.basic.publish(....)

This would allow you to publish 100 messages fast and then rollback in case something goes wrong.

@jhogg
Copy link
Collaborator

jhogg commented Mar 15, 2022 via email

@antoinerabany
Copy link
Author

Thanks for both your responses,

First I understood from the same article that transactions were quite slow. But It would fit my use case, so I will try to implement them and see if there is performance degradation.

Thank you again !

@eandersson
Copy link
Owner

Thanks for both your responses,

First I understood from the same article that transactions were quite slow. But It would fit my use case, so I will try to implement them and see if there is performance degradation.

Thank you again !

Sounds good! Let me know if you run into any performance issues!

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

No branches or pull requests

3 participants