Closed
Description
Message loss with receiveMessages in receiveAndDelete mode
When the maxWaitTime is smaller such as 1500ms, calling await receiver.receiveMessages(50, { maxWaitTimeInMs: 1500 })
repeatedly in a while loop causes message loss.
Reason could be the placement of drain call.
- Not seen with larger maxWaitTime.
- Not seen with subscribe (more reason to believe the issue is related to draining credits)
- Behavior is seen better with partitioned queues than unpartitioned (since receiving from partitioned queues is relatively slower when compared).
Code to repro - https://github.com/HarshaNalluru/sb-2048-issues/blob/main/message-loss-repro.ts
Observed while working on #14060
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment