Thanks to visit codestin.com
Credit goes to github.com

Skip to content

calling setOptions on subscriber does not take effect #1879

@dermasmid

Description

@dermasmid

if changing flowControl settings after calling .on they dont not get into effect

const subscription = pubSubClient.subscription(subscriptionNameOrId);
const messageHandler = message => {

  message.ack();
};

subscription.on('message', messageHandler);

// does not have any effect on flow control
subscription.setOptions({
flowControl: {
          maxMessages: 1,
          allowExcessMessages: true,
 }
})

Metadata

Metadata

Assignees

No one assigned

    Labels

    api: pubsubIssues related to the googleapis/nodejs-pubsub API.priority: p2Moderately-important priority. Fix may not be included in next release.type: bugError or flaw in code with unintended results or allowing sub-optimal usage patterns.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions