Skip to content
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

#126 - Use promise.allSettled() during message dispatch #168

Merged
merged 2 commits into from
Nov 21, 2021

Conversation

adenhertog
Copy link
Contributor

Closes #126

This uses promise.allSettled() instead of promise.all() when dispatching the same message to multiple handlers on the same instance. This is done as there is no coupling between handlers and failure in one shouldn't affect processing in another.

Note that this still throws all errors from the dispatch that are now inside the HandlerDispatchRejected error in the reasons attribute.

The message will still be retried, so it's still important as always to ensure message handling is idempotent.

@adenhertog adenhertog merged commit a5fb992 into master Nov 21, 2021
@adenhertog adenhertog deleted the 126-all-settled branch November 21, 2021 00:04
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.

Use Promise.allSettled when dispatching to handlers
1 participant