Skip to content
This repository was archived by the owner on Mar 17, 2026. It is now read-only.
This repository was archived by the owner on Mar 17, 2026. It is now read-only.

modifyAckDeadline is duplicating messages #124

@JamesTheTerry

Description

@JamesTheTerry

Environment details

  • OS: macOS 10.13.4 (High Sierra)
  • Node.js version: 9.11.1
  • npm version: 5.6.0
  • @google-cloud/pubsub version: 0.18.0

Steps to reproduce

  1. Create a subscriber and topic
  2. Send a message to the topic
  3. Use v1's pull method
  4. modifyAckDeadline of a single message
  5. ack said message a couple seconds later

I'm using Pub/Sub for processes that normally take a couple minutes, but can sometimes extend to 30+ mins. Here's a second by second look at what my little test setup does.

0:00 - pulldown 1 message from subscription with 20 second deadline (or 600 seconds, same result)
0:05 - modifyAckDeadline by 20 seconds
0:15 - ack message; then pull down the same message from the queue

I decided to try this with two instances pulling down messages. After sending one message, as soon as I would modifyAckDeadline on the instance that got the message, the other instance would pull down the message and start the same process.

Eventually, an ack finally sticks and the message goes away.

So it seems that modifyAckDeadline is creating a duplicate message.

Metadata

Metadata

Labels

🚨This issue needs some love.api: pubsubIssues related to the googleapis/nodejs-pubsub API.priority: p2Moderately-important priority. Fix may not be included in next release.type: questionRequest for information or clarification. Not an issue.

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions