1

I have huge number of messages in azure service bus dead letter queue. When I see the messages, I see that most of the messages are expired.

I want to know what happens when we try to re-submit the expired deadletter queue message back to its original queue?

Can anyone help me out in explaining this ?

Thank you !

Amit
  • 167
  • 1
  • 2
  • 14

2 Answers2

1

I am trying to answer two of your questions below,

when you receive an expired message from the dead letter queue to process/resubmit to main queue(Using ReceiveAsync() to receive a message), the state of the message will be changed to deferred state. So, the message won't be available for receiving in the Dead-Letter queue anymore.

For your question on, what happens to the message when you resubmit, it would be submitted as a new message into the target queue.

Yuvaranjani
  • 300
  • 2
  • 12
0

We could use FormatDeadLetterPath() method to build the format name for the specified dead letter queue path and create a receiver and retrieve messages from a DLQ. If you’d like to resubmit message back into the main queue, you could create and send a new message based on retrieved message in DLQ. And you could investigate why the message has been dead-lettered via checking DeadLetterReason and DeadLetterErrorDescription properties.

This link explained Dead-Letter Queues with a sample, please refer to it.

Fei Han
  • 26,415
  • 1
  • 30
  • 41
  • Han - I am able to Re-submit the DLQ messages. But here I am talking about the expired dead letter queue messages. Like what happens when we re-submit the expired DLQ message back to the QUEUE. It surely doesn't get process. – Amit Feb 23 '17 at 09:38
  • ``what happens when we re-submit the expired DLQ message back to the QUEUE.`` it depends on how do you process these messages (that you resubmit) in the main queue. For example, if no jobs process messages from your main queue, the messages will be expired in and it may be passed to DLQ again. – Fei Han Feb 23 '17 at 09:53
  • When we receive a message in a queue then I am converting that message to JSON and storing it in blob storage. But I cant see the JSON message in BLOB as well not in DLQ again. Here my question is like do that expired message is processed or not ? – Amit Feb 23 '17 at 11:08
  • Hi @Amit, I understand your worry is if the resubmitted expired dead letter messages will be processed by the receiving application or not? is't? When you resubmit a TTLExpired Dead letter message, it would be en queued as a new message with TTL reset. This message will be received by the listening downstream application. In fact this is the real purpose of resubmitting a message. – Ezhilarasi Jan 30 '19 at 05:38