-
Notifications
You must be signed in to change notification settings - Fork 55
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Do not process already process messages with a custom strategy #159
Conversation
f4f180b
to
afa40e8
Compare
@@ -27,6 +27,10 @@ function (ActionEvent $actionEvent): void { | |||
$message = $actionEvent->getParam(MessageBus::EVENT_PARAM_MESSAGE); | |||
$handlers = $actionEvent->getParam(EventBus::EVENT_PARAM_EVENT_LISTENERS, []); | |||
|
|||
if ($actionEvent->getParam(MessageBus::EVENT_PARAM_MESSAGE_HANDLED, false)) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
move this code up, message and handlers don't need to get fetched before this check.
@@ -30,6 +30,10 @@ function (ActionEvent $actionEvent): void { | |||
|
|||
$deferred = $actionEvent->getParam(QueryBus::EVENT_PARAM_DEFERRED); | |||
|
|||
if ($actionEvent->getParam(MessageBus::EVENT_PARAM_MESSAGE_HANDLED, false)) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
move this code up, finder, query and deferred don't need to get fetched before this check.
@@ -26,6 +26,10 @@ function (ActionEvent $actionEvent): void { | |||
$message = $actionEvent->getParam(MessageBus::EVENT_PARAM_MESSAGE); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
move this code up, message and handlers don't need to get fetched before this check.
Thanks. Will release new version tomorrow. |
See #156
There was no check in the InvokeStrategy if a message was already handled