Skip to content

Conversation

@tungntpham
Copy link
Contributor

This option will ensure no duplication for delivered messages. Redelivery is still possible if the acknowledgement deadline expires.

This option will ensure no duplication for delivered messages.
Redelivery is still possible if the acknowledgement deadline expires.
Copy link
Contributor

Copilot AI left a 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_delivery boolean 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
Copy link

codecov bot commented Dec 16, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 81.19%. Comparing base (4055fa7) to head (4924df5).
✅ All tests successful. No failed tests found.

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.
📢 Have feedback on the report? Share it here.

This option will ensure no duplication for delivered messages.
Redelivery is still possible if the acknowledgement deadline expires.
@Nusnus Nusnus force-pushed the gcpubsub-add-enable-exactly-once-option branch from 4f6c742 to 934c9e6 Compare December 16, 2025 13:50
@auvipy auvipy added this to the 5.7.0 milestone Dec 17, 2025
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

Successfully merging this pull request may close these issues.

2 participants