The Azure Service Bus Binding Function 2.x is straight forward to subscribe message from the queue, however, is there anyway that I can use same scenario to deal with any message that's being pushed into the DLQ using Azure Functions? I've been reading an article around it but looks like the tool/package is kind of old for the new Azure.ServiceBus API. What I'd like to do is to try fixing the message if possible, otherwise log the message in database. How would I setup my DLQ name in Azure Function?
Asked
Active
Viewed 913 times
0
-
When you say "fix a message", you mean receive the dead-lettered message and issue a replacement message? What if the message got dead-lettered not for the reason it was bad, but the handling logic had a bug? You'd not need to fix the message but simply retry. I'm lacking some context here. – Sean Feldman Sep 27 '19 at 18:30
-
@SeanFeldman, thank you for your suggestion and you are absolutely right! If there is bug in my handling logic then whatever message that's being sent would all fail. Here I'd just assume that my handling logic would be bug free and need to figure out a way to handling on the failed message based on what exception it may contain. – Drex Sep 30 '19 at 16:04
1 Answers
0
You should be able to just create another function that is queue-triggered but for the queue name use the following syntax
<queueName> /$deadletterqueue

jeffhollan
- 3,139
- 15
- 18
-
Oh that would work! I actually didn't think of the _$deadletterqueue_ should be just hardcoded after my queueName – Drex Sep 30 '19 at 16:00