Search documentation of phoenix_kit

# mix phoenix_kit.email.debug_sqs (phoenix_kit v1.6.19)

View Source

Mix task to debug SQS queue messages and analyze message ID matching issues.

This task helps diagnose problems with email status updates by:

- Retrieving all messages from the SQS queue
- Analyzing message IDs from AWS SES events
- Comparing with existing EmailLog records in the database
- Identifying mismatches and providing recommendations

## Usage

    # Basic debug - analyze all messages in queue
    mix phoenix_kit.email.debug_sqs

    # Retrieve and analyze specific number of messages
    mix phoenix_kit.email.debug_sqs --max-messages 20

    # Include DLQ analysis
    mix phoenix_kit.email.debug_sqs --include-dlq

    # Process and delete messages after analysis
    mix phoenix_kit.email.debug_sqs --process --delete

    # Verbose output with full message details
    mix phoenix_kit.email.debug_sqs --verbose

## Options

    --max-messages N      Maximum number of messages to retrieve (default: 50)
    --include-dlq        Also analyze Dead Letter Queue
    --process            Process messages through SQSProcessor
    --delete             Delete messages after processing (requires --process)
    --verbose            Show detailed message content
    --message-id ID      Focus on specific message ID

## Output

The task provides detailed analysis including:

- Total messages found in queue
- Message ID format analysis
- EmailLog matching statistics
- Specific mismatch details
- Recommendations for fixing issues

## Examples

    # Quick analysis
    mix phoenix_kit.email.debug_sqs

    # Full analysis with DLQ
    mix phoenix_kit.email.debug_sqs --include-dlq --verbose

    # Process and clean up queue
    mix phoenix_kit.email.debug_sqs --process --delete --max-messages 10