Skip to content
This repository was archived by the owner on Mar 17, 2026. It is now read-only.
This repository was archived by the owner on Mar 17, 2026. It is now read-only.

Messages queues don't wait for the next batch timeout if a previous one finishes #1690

Closed

Description

@feywind

An earlier change made the message queues continue trying to send messages until the queues are empty (so that drain works). However, because of async code, it's possible that more messages might legitimately fill in that we don't want to send immediately (batching instead of flush). This was caused by:

https://github.com/googleapis/nodejs-pubsub/pull/1636/files#diff-71cf1b7861b4cf165750fbfb5f22b7e03e93044ac050a2f66895fe63ad6703e6R175

The visible symptom is that you can set a max number of messages in a batch with a long max timeout, and then do async publishMessage() for more than the max number of messages, but all of them will basically send at once, instead of waiting for the timeout for the second batch. (bug 270113896)

Activity

  1. added
    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.
    on Mar 3, 2023
  2. self-assigned this
    on Mar 3, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

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