Skip to content

[Service Bus] Message loss with receiveMessages in receiveAndDelete mode when maxWaitTime is under 2 seconds #15115

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

Metadata

Labels

ClientThis issue points to a problem in the data-plane of the library.Service BusbugThis issue requires a change to an existing behavior in the product in order to be resolved.

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions