0

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?

Amit
  • 167
  • 1
  • 2
  • 14

1 Answers1

2

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.

Community
  • 1
  • 1
Sean Feldman
  • 23,443
  • 7
  • 55
  • 80
  • BrokeredMessage sendMsgBackToQueue = new BrokeredMessage(); sendMsgBackToQueue = msg.Clone(); client.Send(sendMsgBackToQueue); msg.Complete(); – Amit Feb 15 '17 at 10:24
  • Code looks fine. Can you post a link to a simple repro code? – Sean Feldman Feb 15 '17 at 17:25