Gopinath TM
Gopinath TM

Reputation: 127

How do i reset "delivery count" for each broken message in azure service bus?

In Real time, i have few azure service bus queues. Each queue has its own default limit of message delivery count. When it exceeds the delivery count, the messages are moving to "Dead Letter Queue".

Now i have to repost the DeadLetter Messages to Original Queue for reprocessing. Due to delivery count, it push the message back to dead letter.

I don't want to change the Queue max delivery count. Now, How can i reset the delivery count on each broken messages?

Upvotes: 1

Views: 4219

Answers (1)

Mikhail Shilkov
Mikhail Shilkov

Reputation: 35154

Azure Service Bus by design doesn't support message resubmission per se. There's no built-in mechanism to resend the very same message from Dead-Letter queue back to the queue.

So, "repost" means that you are retrieving a message from DLQ, then create a new message with properties copied from the DLQ message and finally submit this new message to the original queue.

At this point the Delivery Count of the new message should be 0 out of the box.

Upvotes: 6

Related Questions