Halloween DealsAmazon USHalloween week deals: useful picks before month-endAmazon US: current deals, useful picks and tech finds.Check DealsPC HealthRecommendedCrashes, freezes, slowdowns? Check your PC nowSpot repairable issues before they interrupt work.Check PCHalloween DealsAmazon USOctober picks are moving - compare before checkoutAmazon US: current deals, useful picks and tech finds.See Picks×
FREEDOM251

Freedom251 › Blog › Azure

How to Resubmit Azure Service Bus Dead-Letter Messages Without Losing Them

By Freedom251 Team · · 4 min read

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Receive the message from the correct dead-letter subqueue with Peek-Lock, diagnose and fix the cause, resend it, then complete the dead-letter copy only after the send succeeds. Where your Service Bus tier, SDK and entity configuration support it, a transaction can make sending and completing atomic. Without one, a crash between those operations can lead to a duplicate replay, so downstream processing must be idempotent.

How to resubmit a dead-letter message safely

  1. Choose the right dead-letter subqueue. A queue has its own DLQ; a topic message is copied to matching subscriptions, so inspect the relevant subscription DLQ. A failed auto-forward or send-via transfer may instead be in the source entity’s transfer DLQ. In .NET, select SubQueue.DeadLetter on receiver options, or SubQueue.TransferDeadLetter for a transfer DLQ. See Microsoft’s dead-letter queue documentation.
  2. Receive using Peek-Lock. This keeps the message unsettled while you investigate and resend it. Do not use Receive-and-Delete when losing the message is unacceptable: a client failure after delivery can leave no recoverable source copy. Microsoft recommends Peek-Lock for workloads where message loss is unacceptable; see message transfers, locks and settlement and preventing message loss and duplicate processing.
  3. Inspect the failure details and correct the cause. Read DeadLetterReason and DeadLetterErrorDescription. Common system reasons include MaxDeliveryCountExceeded, TTLExpiredException, HeaderSizeExceeded, Session ID is null and MaxTransferHopCountExceeded. Replaying without fixing the underlying issue can send the message straight back to the DLQ. The configured maximum delivery count determines when repeated abandon or lock expiry dead-letters a message; Microsoft documents a default of 10 deliveries for a queue or subscription.
  4. Resend the corrected message. For an operator-led replay, Azure portal Service Bus Explorer supports inspecting, editing, and resending individual messages or batches. For an automated workflow, receive through an SDK and send the corrected message to the intended queue or topic. Microsoft’s dead-letter queue sample, dated 2026-04-22, demonstrates retrieval, correction and resubmission.
  5. Complete the DLQ copy only after the send is acknowledged. In a nontransactional workflow, leave the source unsettled if sending fails. If the send succeeds but the process crashes before completing the DLQ message, Service Bus can deliver that source message again; a retry may therefore send a duplicate. Peek-Lock preserves the source for recovery, but it does not make the send and completion one atomic operation.

Choose between portal replay, separate SDK operations and a transaction

The right method depends on whether an operator or application is doing the replay, whether atomic handoff is available, and whether duplicate work is safe. A Service Bus transaction does not enlist an external database or service automatically.

As an Amazon Associate I earn from qualifying purchases.

Approach Best fit Recovery and duplicate trade-off Limits
Portal Service Bus Explorer Operator-led inspection and individual or batch replay Inspect, edit and resend; verify the send before explicitly completing the source message. Manual workflow. It does not guarantee exactly-once application side effects.
SDK: send, then complete Automated correction logic when a transaction is unavailable or unnecessary A failed send leaves the source unsettled. A crash after an accepted send but before source completion can result in a duplicate replay. Requires idempotent business handling and operational visibility into retries and settlement.
SDK transaction or supported send-via transfer Automated handoff where the tier, SDK, entities and configuration support transactions Can atomically couple the destination send and source completion. Basic tier and JavaScript SDK do not support transactions. Cross-entity transactions require client configuration, and a transaction times out after two minutes.

Microsoft documents transactional send and settlement in its Service Bus transaction overview. Check support for your actual SDK and entity path before relying on atomicity; transaction support is not universal across tiers and configurations.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Make replay safe when duplicates are possible

Peek-Lock permits redelivery, and acknowledgments can be lost. A stable application business key or MessageId can help consumers recognize work they have already performed. Broker duplicate detection is a separate, limited safeguard: it checks repeated MessageId values—or MessageId plus partition key when partitioning applies—within a configured history window. A repeated send inside that window may be acknowledged but dropped; this does not replace idempotent consumer logic. Microsoft documents a 10-minute default history window, configurable from 20 seconds to 7 days, and notes that duplicate detection can affect throughput. See Azure Service Bus duplicate message detection.

Account for locks and session ordering

Allow enough time to process under Peek-Lock

Microsoft documents a default Peek-Lock duration of one minute and a maximum of five minutes. Renew the lock if diagnosis and resend take longer; an expired lock can allow redelivery while your process is still working. Lock duration and renewal behavior are described in Message transfers, locks, and settlement.

Do not expect session replay to restore its old position

A resubmitted session message receives a new enqueue time and sequence number, so it does not regain its former position in the session’s order. If ordering matters, sequence replay using business data or reconcile the order explicitly. See Microsoft’s session documentation.

Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Support on Ko-Fi

What the DLQ retains—and what replay cannot guarantee

Dead-letter queues are subqueues of queues or topic subscriptions, not independent entities, and their messages remain until retrieved and completed. Microsoft states, “There’s no automatic cleanup of the DLQ.” DLQ messages do not observe TTL. Dead-letter causes include delivery-count exhaustion, expiry when configured, filter evaluation errors and transfer failures; inspect the actual reason before replaying. These behaviors are covered in Service Bus Dead-Letter Queues.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

A successful broker send and completion do not make a database update, API call or other external side effect atomic with Service Bus settlement. Transactions only cover supported Service Bus operations; arbitrary downstream work still needs its own idempotency and recovery design. The safest practical goal is to retain a recoverable source until the broker accepts the resend, use a Service Bus transaction when it is supported and appropriate, and make repeated application work harmless.

For new implementations, use current Azure SDK libraries and check Microsoft’s current support guidance: the documentation notes retirement of legacy Service Bus SDKs and SBMP on 2026-09-30.

Rank #4
Saypacck 1 Pcs Daily Service Record Books 8.5 x 11 Inches
  • Record Book: the package includes 1 daily service record book with 80 sheets, offering ample space to meet daily logging needs; It's a practical tool for tracking appointments, managing tasks, and enhancing customer service efficiency
  • Ideal Size: measuring 8.5 x 11 inches, this activity log notepad balances portability and capacity; With 80 pages, it's ideal for daily use in the automotive industry, serving as a reliable service record management tool for consistent tracking
  • Nice Quality: crafted from quality paper, the activity log book features reliable coil binding for easy page turning and tear-out; Its structured layout provides ample space for detailed entries, supporting effective schedule planning
  • Friendly Design: designed for convenience, the daily log book's coil binding allows effortless sheet removal whenever needed; The intuitive layout ensures quick access to logging sections, making daily activity recording simple and efficient
  • Versatile Usage: the service log book is a helper for the automotive industry or individuals to record scheduled maintenance, the shop can use it to register the maintenance needs of different customers, individuals can use it to keep track of flat rate hours

Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.

AzureAzure Service Busdead-letter queuemessage processingPeek-Lock

Leave a Reply

Your email address will not be published. Required fields are marked *

What’s actually slowing this PC down?

Pick the symptom - the matching free tool is one click away.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Recommended PC Tool
Recommended PC Tool
Crashes, No Sound, or Screen Glitches?Free driver scan
PC Slower Than It Used to Be?Free scan - under a minute

Two free Windows tools

One Free Minute Could Fix That PC

Before you go - each of these free tools takes about a minute and tackles what quietly slows a Windows PC down.

Special offer. View Outbyte info, uninstall instructions, EULA, and Privacy Policy.