-
-
Notifications
You must be signed in to change notification settings - Fork 973
Allow enable_exactly_once_delivery for gcpubsub #2431
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
base: main
Are you sure you want to change the base?
Allow enable_exactly_once_delivery for gcpubsub #2431
Conversation
This option will ensure no duplication for delivered messages. Redelivery is still possible if the acknowledgement deadline expires.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
This PR adds support for exactly-once delivery in GCP Pub/Sub subscriptions through a new enable_exactly_once_delivery transport option. When enabled, Google Cloud Pub/Sub provides message deduplication to prevent duplicate message delivery, though redelivery can still occur if the acknowledgment deadline expires.
Key Changes
- Added
enable_exactly_once_deliveryboolean transport option (defaults to False) - Updated subscription creation to include the exactly-once delivery setting
- Added comprehensive tests for the new feature
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| kombu/transport/gcpubsub.py | Added documentation, default constant, cached property, and integration into subscription creation; includes incidental quote style normalization in request dict |
| t/unit/transport/test_gcpubsub.py | Added PropertyMock import and two parameterized tests to verify property behavior and subscription creation with the new setting |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #2431 +/- ##
=======================================
Coverage 81.19% 81.19%
=======================================
Files 77 77
Lines 9735 9739 +4
Branches 1098 1098
=======================================
+ Hits 7904 7908 +4
Misses 1625 1625
Partials 206 206 ☔ View full report in Codecov by Sentry. |
This option will ensure no duplication for delivered messages. Redelivery is still possible if the acknowledgement deadline expires.
4f6c742 to
934c9e6
Compare
…hub.com/tungntpham/kombu into gcpubsub-add-enable-exactly-once-option
Added missing comma
This option will ensure no duplication for delivered messages. Redelivery is still possible if the acknowledgement deadline expires.