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

Messages delivered out-of-order despite enable_message_ordering set. #300

Open
ryzhyk opened this issue Aug 22, 2024 · 2 comments
Open

Messages delivered out-of-order despite enable_message_ordering set. #300

ryzhyk opened this issue Aug 22, 2024 · 2 comments

Comments

@ryzhyk
Copy link

ryzhyk commented Aug 22, 2024

Thanks for this very useful crate!

I am not sure if the following problem is caused by something I am doing wrong, a bug in this crate, or an issue in the Pub/Sub service itself.

I create a subscription with enable_message_ordering set to true. I publish several messages to the topic with the same ordering key using the publisher API. However, when I read from the subscription using the Subscription::subscribe API, messages occasionally appear out of order in the resulting stream. I have confirmed that the enable_message_ordering flag is set for the subscription and that the messages have correct ordering key in the Google Cloud Console.

Interestingly, this only seems to happen when the subscription has a filter configured.

Any ideas what could be going on? Thanks!

@ryzhyk
Copy link
Author

ryzhyk commented Aug 22, 2024

PS. I've also confirmed that messages appear in the correct order when I pull them from the Google Console instead of via the API.

@yoshidan
Copy link
Owner

Currently, I have set up a filter in my environment with subscription and run it for a day, but I have not been able to confirm any cases where the order is broken.

Since the filter operation is completed in Cloud Pub/Sub, it is unlikely that the problem is caused by crates.

What happens if I subscribe to other language libraries, for example google-cloud-go, for the relevant subscriptions?

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

No branches or pull requests

2 participants