question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Cannot update `ackDeadline` via `setOptions()`

See original GitHub issue

Environment details

  • OS: Distroless
  • Node.js version: v12
  • npm version: N/A
  • @google-cloud/pubsub version: 2.6.0

Steps to reproduce

  1. Create a subscription by calling:
const subscription = topic.subscription('example-name', {
    ackDeadline: 300,
});

if (!(await subscription.exists())[0]) {
    await subscription.create({
        ackDeadlineSeconds: 300,
    });
}
  1. Later, attempt to update the ackDeadline by calling:
const subscription = topic.subscription('example-name', {
    ackDeadline: 60,
});

subscription.setOptions({
    ackDeadline: 60,
});
  1. See that in the Google Cloud Platform console, the deadline does not change:
Screen Shot 2020-10-22 at 2 17 42 PM

Other notes

The .setMetadata() call works just fine, at least with retryPolicy values.

Issue Analytics

  • State:open
  • Created 3 years ago
  • Comments:9 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
laljikanjareeyacommented, Oct 30, 2020

I was trying to explain that if you have created two instance and you are setting ackDeadline using setOption to one of them subscription will not affect to second one.

 const subscription1 = topic.subscription('example-name')
 const subscription2 = topic.subscription('example-name')

subscription1.setOptions({
    ackDeadline: 60,
});

In above example subscription2 will use the ackDeadline that has been set on console.

0reactions
feywindcommented, Feb 16, 2022

@kamalaboulhosn I’m probably explaining this poorly 😄 Feel free to throw in any clarification for that comment.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Class Subscription (3.2.1) | Node.js client library - Google Cloud
A Subscription object will give you access to your Cloud Pub/Sub subscription. Subscriptions are sometimes retrieved when using various ...
Read more >
React Native Cannot update a component from inside the ...
Finally I found solution :) it is simple :) I wrapped navigation.setOption({ ... }) by componentDidUpdate(){}. DefaultLogin.js
Read more >
v1beta1 - Go Packages
LateInitialize this LiteReservation using its observed tfState. returns True if there are any spec changes for the resource.
Read more >
Changelog | google-cloud-cpp
Normally implementation details are not breaking changes, but any application mocking the storage library necessarily depends on these implementation details.
Read more >
Index (Apache Beam 2.7.0)
Construct a path from an absolute component path hierarchy. accept() - Method in class org.apache.beam.sdk.extensions.sql.impl.interpreter.operator.arithmetic.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found