-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Closed
Labels
ClientThis issue points to a problem in the data-plane of the library.This issue points to a problem in the data-plane of the library.Service Busblocking-releaseBlocks releaseBlocks release
Milestone
Description
Currently the receiveMessages() call in JavaScript works differently than the .NET algorithm. As part of making our libraries more consistent we'd like to change that.
The existing behavior:
- User calls receiveMessages(numMessages, maxTime)
- Timer is set for maxTime
- as messages are received we continually debounce a timer for 1 second
We return if:
- The debounced timer expires
- numMessages has been reached
- The maxTime has expired
In .NET the behavior is similar with slight differences that we would like to closely match:
- User calls receiveMessages(numMessages, maxTime)
- Timer is set for maxTime
- On receipt of first message set an absolute timer (no debounce) for 20 milliseconds
We return if:
- The absolute timer expires
- numMessages has been reached
- The maxTime has expired
The work shouldn't be too bad since some of the same behaviors were already present. To do this work we will need:
- Algorithm adjustment for batch receiver
- Non-sessions
- Sessions
- Coordinated doc string update to describe the behavior, at least in regards to how maxWaitTime works.
- Adjustment of the above timeout (possible). .NET's 20 milliseconds works well but they also have some other mitigating factors (background fetch into a buffer, etc..). It might still work for JS but we might want to stick with 1 second.
CC: @JoshLove-msft (to make sure my .NET description is accurate)
Metadata
Metadata
Assignees
Labels
ClientThis issue points to a problem in the data-plane of the library.This issue points to a problem in the data-plane of the library.Service Busblocking-releaseBlocks releaseBlocks release