Clarification on Azure Service Bus Deferral

PHILLIP CARTER 0 Reputation points
2024-09-27T16:23:02.2666667+00:00

The documentation I have found so far is not clear on what Deferring a message does in regards to settlement.

https://video2.skills-academy.com/en-us/azure/service-bus-messaging/message-deferral

For instance the documentation states: "When a client tries to retrieve a deferred message, it's checked for expired condition and moved to a dead-letter queue if it's already expired." Then later, "Any receiver that knows the sequence number of a deferred message can later receive the message by using receive methods that take the sequence number as a parameter."

Please confirm is the following statements are true.

  1. The original receiver that pulled the message and got the PeekLock defers the message. The PeekLock timeout continues to count down.
  2. Any other receiver may then pull the deferred message using the sequence number. If the original PeekLock has since timed out, they get an exception attempting to pull the deferred message.
  3. The deferred message does not go directly to the DLQ but rather the DeliveryCount is incremented. Obviously, if the DeliveryCount exceeds the limit the message is dead lettered.
  4. The receiver that got the timeout exception can try again to pull the deferred message by sequence number? This time getting it and a new PeekLock and the message state is back to the original as if it were never deferred?
  5. The message can be re-deferred and re-read as often as it wants to be until the DeliveryCount exceeds the limit and it is dead lettered?
  6. Multiple receivers that all know the Sequence number can pull the deferred message at the same time? Or is a second read using the sequence number blocked?
  7. If a receiver reads the deferred message by sequence number before it is expired, it can then extend the lock on that message and continue processing as long as necessary as long as it keeps extending the lock when necessary?

Thank you.

Azure Service Bus
Azure Service Bus
An Azure service that provides cloud messaging as a service and hybrid integration.
621 questions
0 comments No comments
{count} votes

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.