-
Notifications
You must be signed in to change notification settings - Fork 230
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
add Subscription#setOptions() #12
Comments
You can set the options at the time of creating the Subscription reference object. topic.createSubscription('name', { /* options */ })
// or...
var subscription = topic.subscription('name', { /* options */ }) You do bring up a good question-- how can you set the options when you get a Subscription from |
From @callmehiphop on November 5, 2017 19:46 You currently can't, sounds like maybe we need to make a setter. |
We have a release coming up that will allow you to set options via subscription.setOptions({
ackDeadline: 10,
batching: {
callOptions: {}, // gax call options
maxMessages: 3000,
maxMilliseconds: 100,
},
flowControl: {
allowExcessMessages: true,
maxBytes: os.freem() * 0.2,
maxExtension: Infinity,
maxMessages: 100
},
streamingOptions: {
highWaterMark: 0,
maxStreams: 5, // formerly known as maxConnections
timeout: 60000 * 5, // 5 minutes
}
}); |
From @tonila on November 5, 2017 6:40
We are upgrading pubsub from 0.13.x to 0.14.x and current API documentation does not seem to answer our questions.
Documentation states that "subscription options do not persist across multiple instances".
With current knowledge, I assume it means, that subscription, that you see at cloud console does not store subscription options, so you need to set them for each instance you receive from the cloud.
But how do you set options, since subscription does not seem to have function for that?
Currently we are just always using topic.createSubscription() for new and existing subscriptions and it seems to work fine, but I am wondering, what is the intended way of doing this?
Copied from original issue: googleapis/google-cloud-node#2723
The text was updated successfully, but these errors were encountered: