Skip to content

Update pubsub.Subscription.ack()'s docstring to say the ID is explicitly an ackId #518

Description

@jgeewax

@pierre-b wrote in #487:

Could you please update the doc, the message.id should be message.ackId https://googlecloudplatform.github.io/gcloud-node/#/docs/v0.13.2/pubsub/subscription?method=ack

At first I thought we had this right, but it seems like the messageId might not be the same as the ackId (see RecievedMessage which says "ackId: This ID can be used to acknowledge the received message.")

Note: I still think we should call the parameter "ids", but that we should update the docstring.

On https://github.com/GoogleCloudPlatform/gcloud-node/blob/686fe62e7103f80dc053417e08c13abfc501f67f/lib/pubsub/subscription.js#L250

s/message IDs/message ackIds/

Activity

  1. added
    type: bugError or flaw in code with unintended results or allowing sub-optimal usage patterns.
    api: pubsubIssues related to the Pub/Sub API.
    on May 1, 2015
  2. added this to the Pub/Sub Beta milestone on May 1, 2015
  3. ryanseys commented on May 1, 2015

    @ryanseys
    Contributor

    Simple enough. I will change this today.

  4. jgeewax commented on May 1, 2015

    @jgeewax
    ContributorAuthor

    Style I was thinking was @param {string|string[]} ids - A single or multiple message acknowledgement IDs. but feel free to write whatever.

    Just want to make it clear that a Message itself doesn't have an ID we care about. Instead a ReceivedMessage has an acknowledgement ID (ackId) which you pass around.

  5. ryanseys commented on May 1, 2015

    @ryanseys
    Contributor

    Yeah I'll come up with something. I understand the confusion.

  6. 10 remaining items

  7. added a commit that references this issue on Feb 3, 2026
  8. added a commit that references this issue on Mar 12, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

api: pubsubIssues related to the Pub/Sub API.type: bugError or flaw in code with unintended results or allowing sub-optimal usage patterns.

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions