Unable to retrieve dead letter messages for a specific sessionId in Azure Service Bus #2721
Labels
Needs: Triage (Functions)
potential-bug
Items opened using the bug report template, not yet triaged and confirmed as a bug
Description
When trying to process and permanently delete dead letter messages for a specific sessionId, there is no way to create a ServiceBusSessionReceiver that can target the dead letter queue.
Current working approach without sessions:
1. Create a receiver with SubQueue.DeadLetter.
2. Retrieve messages via ReceiveMessagesAsync.
3. Remove messages using CompleteMessageAsync.
However, when using sessions:
• AcceptSessionAsync is required to target specific sessions.
• But, ServiceBusSessionReceiver lacks a SubQueue option, making it impossible to filter for dead letter messages in a specific session.
A standard receiver retrieves all dead letter messages without session filtering.
How to retrieve dead letter messages for a specific sessionId?
Tested on Azure.Messaging.ServiceBus version 7.18.1
THX
Steps to reproduce
Setup Azure Service Bus with Sessions and Dead Letter Queue:
sessionId
.Try to retrieve dead letter messages for one specific session:
ServiceBusClient.AcceptSessionAsync(queueName, sessionId)
to create a session receiver.The text was updated successfully, but these errors were encountered: