Event-Driven

Dead Letter Queue (DLQ)

Description

A service queue implementation to store messages that the messaging system cannot deliver to their destination or cannot be processed.

Where to use

  • Debugging failed messages.
  • \n
  • Preventing poison messages from blocking the system.

Real World Example

If a message fails to process 5 times, it is moved to the DLQ. DevOps can later inspect why it failed.

Code Example

class DeadLetterQueue(DLQ):\n    def __init__(self):\n        pass\n\n    def execute(self):\n        print('Executing Dead Letter Queue (DLQ)')