Skip to content

Handling Wallet Area DeadLetters

Overview

This is a document regarding how to handler deadletters that are caused by known issues

Handling Specific DeadLetters

create-ledger-account DeadLetters

Common Issues

  1. Age validation mismatch

    • Occurs when a user is created on their birthday, but due to timezone differences they are treated as 17 instead of 18.
    • This causes the account creation to fail.
  2. Unsupported special characters

    • External provider (Galileo) does not support certain special characters in firstname or lastname.
    • Likely to always be related to name fields.
  3. Invalid or unsupported locale

    • Wrong format example: "locale":"es-US-u-fw-s".
    • Unsupported locale example: "locale":"en-MX" not recognized by Galileo.
  4. 3rd party downtime

    • Galileo service might be unavailable for all retry attempts.
    • Leads to messages going to DLQ after exhausting retries.

How to Resolve DLQs

Resolution depends on the root cause:

  • Case 1 and 4 (Age validation or Provider downtime)
    • Safe to move messages back to the original processing queue.
    • Use the RabbitMQ UI “Move Messages” button.
    • Target queue name = DLQ name without _dlq.
    • Example:
      • DLQ:
        Wallet.CreateLedgerAccountMessage_Minority.Wallet.Service_dlq
        
      • Processing Queue:
        Wallet.CreateLedgerAccountMessage_Minority.Wallet.Service
        
  • Case 2 and 3 (Invalid characters or locale issues)
    • Requires data correction before reprocessing.
    • Steps:
      1. Copy the message from the DLQ.
      2. Normalize invalid characters.
        • Example: "Müller""Muller".
      3. Fix locale values to the closest valid value.
        • "es-US-u-fw-s""es-US"
        • "en-MX""en-US"
      4. Insert the corrected message into the Wallet Outbox table.

SQL Example for reinsertion:

DECLARE @correlationId UNIQUEIDENTIFIER = NEWID();

INSERT INTO platform.MessageOutbox
    (MessageId, MessageName, ContentType, MessageData, MessageProperties, Ruid, ScheduledTime)
SELECT NEWID(), 
       'Wallet.CreateLedgerAccountMessage', 
       'application/json', 
       '{{UPDATED JSON OBJECT}}', 
       '{"X-Correlation-ID":"' + CAST(@correlationId AS NVARCHAR(36)) + '"}',
       @correlationId,
       GETUTCDATE();


Common Patterns

  • Retry Flow: Redirect messages from DLQs (e.g., create-ledger-account.dlq) to a retry queue with delays before reprocessing.
  • Error Tracking: If none of the above, Investigate issues in Kibana and add it in this doc.