Amit
Amit

Reputation: 187

Azure service bus dead letter

I am trying to resubmit all the deadletter messages back to its original queue. When I resubmit the message, it's again moving to deadletter.
This time I thought there might be some problem with the message. When I debugged it, it was having no problem. Can anyone help me out?

Upvotes: 0

Views: 1995

Answers (1)

Sean Feldman
Sean Feldman

Reputation: 25994

Possible scenarios your messages end up in the DLQ are:

  1. Too slow processing, message LockDuration expires and message is retried again until all of the DeliveryCounts are exhausted and message is DLQ-ed.
  2. You have an aggressive PrefetchCount. Messages that are prefetched and not processed within LockDuration time are subject to DeliveryCount increase (see #1)
  3. Too short of LockDuration causing messages to being processed while the re-appear on the queue and picked up by other processing instances (or if you use OnMessage API with concurrency> 1).
  4. Processing constantly failing, causing message eventually to end up in a DLQ.

I suspect you have #4. Not sure how you re-submit, but you have to clone the message and send it back. There was a similar question here, have a look.

Upvotes: 2

Related Questions