Skip to content
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

AckDeadline does not work even after subscription creation with v1.SubscriptionClient #81

Closed
mmurygin opened this issue Feb 28, 2018 · 1 comment
Assignees
Labels
api: pubsub Issues related to the googleapis/nodejs-pubsub API. priority: p2 Moderately-important priority. Fix may not be included in next release. 🚨 This issue needs some love. type: question Request for information or clarification. Not an issue.

Comments

@mmurygin
Copy link

mmurygin commented Feb 28, 2018

In my app I really need to configure message ackDeadline. Because of that issue I am not able to do it using createSubscription. So I found out a way to create subscription with specific ackDeadlineSeconds using v1.SubscriptionClient. But client library does not care about that setting.

Environment details

  • OS: Ubuntu 16.04
  • Node.js version: 8.9.4
  • npm version: 5.5.1
  • @google-cloud/pubsub version: 0.16.4

I created a repository with code to reproduce this issue.

Steps to reproduce

  1. Clone repository https://github.com/muryginm/google-cloud-pubsub-issues
  2. npm install
  3. GOOGLE_PROJECT=your-project-id GOOGLE_APPLICATION_CREDENTIALS=path-to-credentials npm run ack-deadline
  4. In most cases the message was resent after ~60s even when I have ackDeadlineSeconds 180s.

In source code I did the following:

  1. Created topic
  2. Created subscription with ackDeadlineSeconds using v1.SubscriptionClient
  3. After step 2 I really had a subscription with custom ackDeadlineSeconds (I checked it using console.cloud.google.com and the command gcloud pubsub subscriptions describe name)
  4. Tracked the time between message events.

How can I achieve the correct behaviour of ackDeadlineSeconds feature?

Thanks!

@callmehiphop callmehiphop added priority: p2 Moderately-important priority. Fix may not be included in next release. type: question Request for information or clarification. Not an issue. labels Feb 28, 2018
@callmehiphop
Copy link
Contributor

Currently we don't allow the ack deadline to be modified. The Subscription object has an auto-leasing feature that will automatically extend the deadline on any messages waiting to be acked. Even if we allowed the deadline to be set, the current code would overwrite it and your message would not get redelivered until your subscription object was closed.

I'm going to close this issue because it looks to be a duplicate of #6. I'll be happy to re-open if you think that's not the case.

stephenplusplus pushed a commit to stephenplusplus/nodejs-pubsub that referenced this issue Aug 31, 2018
@google-cloud-label-sync google-cloud-label-sync bot added the api: pubsub Issues related to the googleapis/nodejs-pubsub API. label Jan 31, 2020
@yoshi-automation yoshi-automation added the 🚨 This issue needs some love. label Apr 7, 2020
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. priority: p2 Moderately-important priority. Fix may not be included in next release. 🚨 This issue needs some love. type: question Request for information or clarification. Not an issue.
Projects
None yet
Development

No branches or pull requests

3 participants