Skip to content

refactor(dbal): take the dead letter replay target channel as a --targetChannel option - #728

Merged
dgafka merged 1 commit into
mainfrom
dgafka/dead-letter-target-channel-option
Oct 20, 2026
Merged

dgafka merged 1 commit into
mainfrom
dgafka/dead-letter-target-channel-option

Conversation

@dgafka

@dgafka dgafka commented Oct 20, 2026

Copy link
Copy Markdown
Member

Why is this change proposed?

#726 added a target channel to dead letter replay, but the console commands take it as a second positional argument. A positional, optional target reads as if it were part of the message reference, and it is easy to pass by accident. An option says what it is.

Description of Changes

  • ecotone:deadletter:replay and ecotone:deadletter:replayAll take the target channel as --targetChannel instead of a positional argument. Without it, each message goes back to its source channel, as before.
  • DeadLetterGateway::replay() and replayAll() are unchanged.
  • The replay tests now also assert that the source handler ran only for the original failure, so a replay to a target channel is proved to reach the target alone.
Framework Command
Symfony bin/console ecotone:deadletter:replay <messageId> --targetChannel=orders.recover
Laravel php artisan ecotone:deadletter:replay <messageId> --targetChannel=orders.recover
Tempest ./tempest ecotone:deadletter:replay <messageId> --targetChannel=orders.recover
Lite $ecotone->runConsoleCommand('ecotone:deadletter:replay', ['messageId' => $id, 'targetChannel' => 'orders.recover'])

replayAll takes the same option.

Pull Request Contribution Terms

  • I have read and agree to the contribution terms outlined in CONTRIBUTING.

…getChannel option

ecotone:deadletter:replay and ecotone:deadletter:replayAll take the target
channel as an option instead of a positional argument, so a replay without it
reads the same as before. The tests now also assert the source handler ran
only for the original failure, proving the replay reached the target alone.
@dgafka
dgafka merged commit 24e56c9 into main Oct 20, 2026
16 of 17 checks passed
@dgafka
dgafka deleted the dgafka/dead-letter-target-channel-option branch October 20, 2026 21:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant