Skip to content

Comments

Fix/update inventory on nacks#2071

Open
Luisgustavom1 wants to merge 3 commits intogoogleapis:mainfrom
Luisgustavom1:fix/update-inventory-on-nacks
Open

Fix/update inventory on nacks#2071
Luisgustavom1 wants to merge 3 commits intogoogleapis:mainfrom
Luisgustavom1:fix/update-inventory-on-nacks

Conversation

@Luisgustavom1
Copy link

Fixes #2070 🦕

@Luisgustavom1 Luisgustavom1 requested a review from a team July 19, 2025 12:04
@Luisgustavom1 Luisgustavom1 requested a review from a team as a code owner July 19, 2025 12:04
@product-auto-label product-auto-label bot added size: s Pull request size is small. api: pubsub Issues related to the googleapis/nodejs-pubsub API. labels Jul 19, 2025
@Luisgustavom1 Luisgustavom1 force-pushed the fix/update-inventory-on-nacks branch from 89bf54e to 9a2ca06 Compare July 19, 2025 15:46
const latency = (Date.now() - startTime) / 1000;
this._latencies.add(latency);

this._inventory.remove(message);
Copy link
Collaborator

Choose a reason for hiding this comment

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

I think we wouldn't want to remove it in the case of a legit modack, just in the case of nack. But yeah, this clearly seems like an oversight.

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 googleapis/nodejs-pubsub API. size: s Pull request size is small.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

When use exact-once-delivery, and allowExcessMessages is false, nacking a number of messages equal to maxMessages subscriber stop of receive messages

2 participants