Dead-Letter Queue
デッドレターキュー
デッドレターキューは、ソースキューが許可された試行回数の後に処理できなかったメッセージを保持します。人々は制御された再試行の前に失敗を確認することができます。
source queue + receive count > limit -> DLQ + configured monitor -> alert -> inspect/fix -> controlled redriveemail_804✓メインキュー継続email_803!無効な住所dead/email_803→最初に検査source queue + receive count > limit -> DLQ + configured monitor -> alert -> inspect/fix -> controlled redriveJOBもう一つの例
行 `row-73` のインポートは、日付が不正なため5回失敗します。Amazon SQSはメッセージをDLQに移動します。その後、チームが設定したアラームがオペレーターに通知します。パーサーを修正した後、オペレーターは安全な速度で小さなバッチを再送します。
主な部分
- 01ソースキュー
- 02試行回数の上限
- 03失敗理由
- 04デッドレターメッセージ
- 05アラートとオーナー
- 06検査、修正、および再実行
以下の場合に使用します
繰り返し失敗した場合にメインキューでの循環を停止する必要がある場合は、DLQを使用します。理由、発生元、試行回数、メッセージの経過時間、安全な再配信パスを保持してください。
以下の場合は使用しないでください
最初の短い失敗の後でメッセージを移動しないでください。増加するDLQを無視したり、原因を修正する前に再処理したりしないでください。1つのアイテムを削除することでも、順序が厳密に必要なフローを壊す可能性があります。
コードで使用する名前
source queue + receive count > limit -> DLQ + configured monitor -> alert -> inspect/fix -> controlled redrive 出荷前に
Check contracts and invariants, authorization, and input limits. Test retries, one-time effects, timeouts, and partial failures. Verify data integrity, compatibility, monitoring, recovery, and rollback.
Outcome:Complete the task with デッドレターキュー (Dead-Letter Queue)。 User context:行 `row-73` のインポートは、日付が不正なため5回失敗します。Amazon SQSはメッセージをDLQに移動します。その後、チームが設定したアラームがオペレーターに通知します。パーサーを修正した後、オペレーターは安全な速度で小さなバッチを再送します。 Technical concept or control:デッドレターキュー (Dead-Letter Queue)。 Why it fits:繰り返し失敗した場合にメインキューでの循環を停止する必要がある場合は、DLQを使用します。理由、発生元、試行回数、メッセージの経過時間、安全な再配信パスを保持してください。 Do not use it when:最初の短い失敗の後でメッセージを移動しないでください。増加するDLQを無視したり、原因を修正する前に再処理したりしないでください。1つのアイテムを削除することでも、順序が厳密に必要なフローを壊す可能性があります。 Engineering requirements: Define inputs, outputs, contracts, and rules that must always hold. Set authorization and input checks. Define failures, timeouts, retries, one-time effects, data moves, and compatibility limits. Operations: Add useful signals and logs that hide sensitive data. Set capacity limits and write an operator guide. Test recovery and rollback. Acceptance criteria: Contract and failure-path tests pass. Data and authorization rules still hold during retries and partial failures. Check performance limits, monitoring, recovery, and rollback. Evidence and limits (evidence boundary):単一の公式標準が全体の用語を管理するわけではありません。その意味はチーム、プラットフォーム、またはフレームワークによって変わる可能性があります。 Unknowns to confirm: Where the code runs, data stores, traffic shape, consistency needs, and the security boundary. Also confirm the compatibility period, service goals, and rollback limits.
このリクエストを確認する
Review how デッドレターキュー (Dead-Letter Queue) is used now. Definition: デッドレターキューは、ソースキューが許可された試行回数の後に処理できなかったメッセージを保持します。人々は制御された再試行の前に失敗を確認することができます。 Release checks: Check contracts and invariants, authorization, and input limits. Test retries, one-time effects, timeouts, and partial failures. Verify data integrity, compatibility, monitoring, recovery, and rollback. Before changing code, list the evidence, gaps, severity, and the smallest safe fix.