Search code examples
c#azureservicebus

Does ServiceBusProcessor receive its own abandoned messages?


Suppose a ServiceBusProcessor with a ProcessMessageAsync handler abandons a specific message with AbandonMessageAsync, or the message is abandoned due to lock timeout because it never got completed.

What happens with this abandoned message? Will the processor

  1. never receive it again?
  2. receive it again straight away (provided it's not dead lettered)?
  3. receive it again after some delay (provided it's not dead lettered)?

Solution

  • If the message is abandoned and hasn't exceeded the maximum delivery number (MaxDeliveryCount property of the entity), the message will be recieved again. Wherever it would be immediately or after the messages that have been already prefetched, depends on your settings.

    Abandoning with delay is not supported yet. But you can upvote the feature request.