Service Bus - new message detection, while you have old messages is still active

Asanka Kumarasingha 20 Reputation points
2023-11-25T12:23:01.29+00:00

In service bus queue, I have max delivery count set as 3. It seems each delivery attempt is having 1 minute or more delay between each delivery failure and re-attempt.

Question 1: Is it possible to control timing of each delivery attempt?

Question 2: While old messages is in retry, If new messages comes, is it possible to remove old message from the queue ?

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

Accepted answer
  1. MayankBargali-MSFT 70,871 Reputation points
    2023-11-27T05:49:14.87+00:00

    @Asanka Kumarasingha Thanks for reaching out.

    In case if you are using Azure SDK then the delay between each delivery failure and re-attempt is managed by the Service Bus SDK itself and is based on the retry policy that you have set. For more details you can refer to this section for service bus retry guidance.

    Regarding your second question, it is not possible to remove an old message from the queue while it is in retry. Once a message is in the retry state, it will continue to be retried until it either reaches the maximum delivery count or is explicitly removed from the queue by the receiver. However, if a new message arrives in the queue while an old message is in retry, the new message will be processed normally and will not affect the retry status of the old message.

    I hope this helps! Let me know if you have any other questions.

    Please 'Accept Answer' if it helped so that it can help others in the community looking for help on similar topics.


0 additional answers

Sort by: Most helpful

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.