Skip to content

PubSub Subscription 'ackDeadline' and/or 'ackDeadlineSeconds' #2567

@lc-chrisbarton

Description

@lc-chrisbarton

I am receiving "Error: .google.pubsub.v1.Subscription#ackDeadline is not a field: undefined" when using ackDeadline but switching the options to 'ackDeadlineSeconds' stops the error and reports the correct value in the GCP web console but seems to set the deadline to a very small value because it does not seem to have any effect i.e. I can make repeated calls and receive the same messages.

      let topic = client.pubsub.topic(topic_name)
      let opts = {
        ackDeadline: 60000,
        flowControl: { maxMessages: 5 },
      }
      topic.createSubscription('foo', opts)

but switching the options to the following works:

      let opts = {
        ackDeadlineSeconds: 60,
        flowControl: { maxMessages: 5 },
      }

Metadata

Metadata

Assignees

Labels

api: pubsubIssues related to the Pub/Sub API.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions