Dead letter message processing | Service Bus

PK 326 Reputation points
2021-05-21T04:29:41.23+00:00

Hello,

I'm looking out for options to process the dead letter messages in the queue.

Is there a way we can automate the processing of these messages seamlessly?

Thanks,
PK

Azure Service Bus
Azure Service Bus
An Azure service that provides cloud messaging as a service and hybrid integration.
700 questions
0 comments No comments
{count} votes

Accepted answer
  1. MayankBargali-MSFT 70,941 Reputation points Moderator
    2021-05-21T04:50:03.903+00:00

    @PK You can use Service Bus trigger for azure function, Service Bus connector for the logic app (that will continuously monitor if there is any active message in the dead letter queue), or write your own custom logic that will continue to monitoring if there are any active message in the dead letter queue and accordingly you can perform the operation on that message.

    If you are using the azure function then the queue name will be {yourqueuename}/$DeadLetterQueue

    public static void Run([ServiceBusTrigger("myqueuename/$DeadLetterQueue", Connection = "ServiceBusConnection")]string myQueueItem, ILogger log)  
            {  
                log.LogInformation($"C# ServiceBus queue trigger function processed message: {myQueueItem}");  
            }  
    

    You can refer to the service bus trigger document for more details. Feel free to get back to me if you have any queries or concerns.

    2 people found this answer helpful.

0 additional answers

Sort by: Most helpful

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.