Dbal Dead Letter

DBAL-based dead letter queue for storing and replaying failed messages

You want failed messages stored next to your application data so they survive a broker restart, can be queried with SQL, and replayed via a console command without writing custom tooling. The Dbal Dead Letter is a table in the same database your aggregates live in, holding every error message with its exception, headers, and payload — ready to be reviewed, replayed, or deleted.

Dbal Dead Letter

Ecotone provides full lifecycle management of error messages via the Dbal Module:

  • Store failed Message with all details about the exception

  • Allow for reviewing error Messages

  • Allow for deleting and replaying error Message back to the Asynchronous Message Channels

Installation

To make use of Dead Letter, we need to have Ecotone's Dbal Module installed.

Storing Messages in Dead Letter

If we configure default error channel to point to "dbal_dead_letter" then all Error Messages will land there directly

Storing Error Messages once they failed directly in Database

config/packages/ecotone.yaml

Dead Letter with Delayed Retries

We may also want to try to recover before we consider Message to be stored in Dead Letter:

Storing Error Messages in Dead Letter only if retries are exhausted

config/packages/ecotone.yaml

and then we use inbuilt Retry Strategy:

Dead Letter Console Commands

Help

Get more details about existing commands

Listing Error Messages

Listing current error messages

Show Details About Error Message

Get more details about given error message

Replay Error Message

Replay error message. It will return to previous channel for consumer to pick it up and handle again.

Replay All Messages

Replaying all the error messages.

Delete Message

Delete given error message

Turn off Dbal Dead Letter

Managing Multiple Ecotone Applications

The above solution requires running Console Line Commands. If we want however, we can manage all our Error Messages from one place using Ecotone Pulse.

This is especially useful when we've multiple Applications, so we can go to single place and see if any Application have failed to process Message.

Last updated

Was this helpful?