Repository navigation
refactor(dbal): take the dead letter replay target channel as a --targetChannel option - #728
Merged
Merged
Conversation
…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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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:replayandecotone:deadletter:replayAlltake the target channel as--targetChannelinstead of a positional argument. Without it, each message goes back to its source channel, as before.DeadLetterGateway::replay()andreplayAll()are unchanged.bin/console ecotone:deadletter:replay <messageId> --targetChannel=orders.recoverphp artisan ecotone:deadletter:replay <messageId> --targetChannel=orders.recover./tempest ecotone:deadletter:replay <messageId> --targetChannel=orders.recover$ecotone->runConsoleCommand('ecotone:deadletter:replay', ['messageId' => $id, 'targetChannel' => 'orders.recover'])replayAlltakes the same option.Pull Request Contribution Terms