Messages queues don't wait for the next batch timeout if a previous one finishes #1690
Labels
api: pubsub
Issues related to the googleapis/nodejs-pubsub API.
priority: p2
Moderately-important priority. Fix may not be included in next release.
type: bug
Error or flaw in code with unintended results or allowing sub-optimal usage patterns.
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)
The text was updated successfully, but these errors were encountered: