Skip to content

fix(pubsub): retry acks when channel closes#4575

Merged
dbolduc merged 1 commit intogoogleapis:mainfrom
dbolduc:fix-pubsub-retry-acks-when-channel-closes
Feb 5, 2026
Merged

fix(pubsub): retry acks when channel closes#4575
dbolduc merged 1 commit intogoogleapis:mainfrom
dbolduc:fix-pubsub-retry-acks-when-channel-closes

Conversation

@dbolduc
Copy link
Copy Markdown
Member

@dbolduc dbolduc commented Feb 5, 2026

Fixes #4471

Use the at least once policies in the default leaser. The policies depend on the gRPC subchannel count, so plumb that through all the layers.

The effect is that we retry acks that fail with transport errors when a channel closes, and the application avoids frozen messages every hour or so.

@product-auto-label product-auto-label bot added the api: pubsub Issues related to the Pub/Sub API. label Feb 5, 2026
@codecov
Copy link
Copy Markdown

codecov bot commented Feb 5, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 95.02%. Comparing base (8690db5) to head (c0c5607).
⚠️ Report is 2 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #4575      +/-   ##
==========================================
+ Coverage   95.01%   95.02%   +0.01%     
==========================================
  Files         195      195              
  Lines        7456     7456              
==========================================
+ Hits         7084     7085       +1     
+ Misses        372      371       -1     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@dbolduc dbolduc marked this pull request as ready for review February 5, 2026 15:05
@dbolduc dbolduc requested a review from a team February 5, 2026 15:05
Comment on lines +35 to +37
subscription: String,
client_id: String,
grpc_subchannel_count: usize,
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These three fields repeat in a number of places. Time to refactor to a struct?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pass. Maybe next time.

@dbolduc dbolduc merged commit 8c41727 into googleapis:main Feb 5, 2026
34 checks passed
@dbolduc dbolduc deleted the fix-pubsub-retry-acks-when-channel-closes branch February 5, 2026 16:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

api: pubsub Issues related to the Pub/Sub API.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Retry at-least-once lease operations that fail when a connection is closed

2 participants