An Azure service that provides cloud messaging as a service and hybrid integration.
Thank you for reaching out to Microsoft Q&A
Azure Service Bus Dead-Letter Queues (DLQs) do not support Time-To-Live (TTL) handling in the same way as active messages. While messages in the primary queue or topic can have a TTL configured and can expire automatically, TTL is not evaluated once a message has been moved to the DLQ. The DLQ is designed as a holding area for messages that could not be delivered or processed successfully, allowing administrators or applications to inspect and take corrective action on those messages. As a result, messages stored in the DLQ remain there indefinitely until they are explicitly retrieved and removed. Currently, Azure Service Bus does not provide a built-in option to enable automatic expiration, retention policies, or TTL-based cleanup for messages in the Dead-Letter Queue.
Refer below points to resolve this issue or use the available workaround:
1. Understand the DLQ Behavior
TTL is supported only for active messages in queues, topics, and subscriptions.
Once a message is dead-lettered, TTL is no longer observed.
Messages in the DLQ do not expire automatically and are not removed by the Service Bus platform.
2. Implement Custom DLQ Cleanup Logic
Create a scheduled process (Azure Function, Logic App, WebJob, or application service) that periodically reads messages from the DLQ.
Check the message age using properties such as EnqueuedTimeUtc.
Remove messages that exceed your desired retention period.
Optionally archive the messages before deletion for auditing or troubleshooting purposes.
3. Monitor and Manage the DLQ Regularly
Configure Azure Monitor alerts for DLQ message counts.
Review dead-lettered messages periodically to identify application failures or processing issues.
Resubmit valid messages after correcting the root cause.
Remove obsolete messages manually or through automation to prevent DLQ growth over time.
4. Consider Alternative Retention Strategies
If long-term retention is not required, move DLQ messages to external storage such as Azure Blob Storage, Azure SQL Database, or Cosmos DB.
Implement a separate retention policy on the archived data based on business requirements.user's question.