Closed DerekSMorin closed 6 months ago
I see two alternatives.
Either: Set Lock duration to maximum unless you suspect that could cause trouble for clients reading messages from the queue. Maximum Lock duration is five minutes. You may still not be able to send all messages in the same batch. When done set Lock duration back to what it was.
Or: Uncheck Remove message from DLQ and send them all. When done, Purge the Dead Letter Queue (DLQ). Before purging, check that no new messages have arrived in the DLQ. There is a risk that if a message gets moved to the DLQ it would be lost though. You can disable Send to the queue when doing this if you are sure that the sending clients can handle that.
You can disable Send to the queue when doing this if you are sure that the sending clients can handle that. Risky. Especially when there's no control over senders.
I don't remember the logic to move messages out of DLQ, but it might explain the issue if the code is greedy. Then, the max lock duration on the queue won't help.
This might be a question or possibly a feature request. If we have a few thousand messages in the deadletter queue, I'm wondering what the best way is to transfer all of them back for reprocessing?
Currently I do something like this:
But if we try more than a few hundred messages we frequently get this:
<06:52:05> Not all the selected messages were moved. This was caused by the time to go through the messages were longer than Lock duration for the queue. Either delete some messages in the dead letter subqueue or increase the Lock duration for the queue. The Lock duration for the queue is currently 60 seconds. I realize altering the lock duration could make a difference, but I'm wondering what the recommended approach is? I generally end up doing 100-200 messages at a time but this is manual and time-consuming.