Skip to content

fix(pubsub): ensure immediate message retry when noAck=true and processing fails #55

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

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

muhammedkamel
Copy link

@muhammedkamel muhammedkamel commented Jul 11, 2025

Fix Google Pub/Sub message retry behavior when noAck=true

Problem:
• When noAck=true was set, failed messages weren't retried immediately
• Messages only retried after the acknowledgment timeout, not according to retry policy
• This caused unexpected delays in message processing

Solution:
• Library now explicitly sends nack when message processing fails
• Failed messages retry immediately based on configured retry policy
• Removes silent delays in message reprocessing

Impact:
• More predictable error handling behavior
• Retry policies now work as expected
• Library handles both ack and nack automatically when noAck=true

@p-fedyukovich

This ensures that with noAck enabled ack message when handling message successfully, and nack it when handling it fails
Added tests to verify message acknowledgment behavior based on the noAck configuration. This includes scenarios for successful and failed message handling, ensuring proper acknowledgment and negative acknowledgment as expected.
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.

1 participant