[Messenger] How do you handle failures for messages dispatched with DispatchAfterCurrentBus stamp? #54474
Unanswered
javaDeveloperKid
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi, a DispatchAfterCurrentBus stamp helps to make a businnes process atomic (to some degree, keep reading). If the message handlers throw at some point then a message dispatched inside handler will not be sent. This is the use case that Outbox Pattern solves as well. However the difference between these two aproaches is that DispatchAfterCurrentBus does not protect against connection failure with the message broker server. When it fails then the message dispatched after current bus is lost and system is left in inconsistent state.
What can be done to solve this issue?
Beta Was this translation helpful? Give feedback.
All reactions