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¶
-
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.
-
Unsupported special characters
- External provider (Galileo) does not support certain special characters in firstname or lastname.
- Likely to always be related to name fields.
-
Invalid or unsupported locale
- Wrong format example:
"locale":"es-US-u-fw-s". - Unsupported locale example:
"locale":"en-MX"not recognized by Galileo.
- Wrong format example:
-
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
- DLQ:
- Case 2 and 3 (Invalid characters or locale issues)
- Requires data correction before reprocessing.
- Steps:
- Copy the message from the DLQ.
- Normalize invalid characters.
- Example:
"Müller"→"Muller".
- Example:
- Fix locale values to the closest valid value.
"es-US-u-fw-s"→"es-US""en-MX"→"en-US"
- 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.