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
EventBus.publish() should return a Promise #156
Comments
The implementation is based on RxJS streams. |
@kamilmysliwiec for systems where consistency is really important, it doesn't make sense not to have the ability to know whether or not the message has been received.
It it returns a |
@sroze please, note that this library is just a lightweight implementation based on RxJS. Systems vary by requirements and hence, for more sophisticated scenarios, this library should be forked and tailored to the technical expectations of the project (if needed). CQRS and event-based systems is a huge topic and it's pretty much impossible for us to cover every single use-case and provide all possibly useful functionalities out-of-the-box. |
I'm submitting a...
[x] Feature request
Current behavior
At the moment, the
publish
method of theEventBus
does returnvoid
. When publishing an event, how can I make sure that all handlers have been executed? Without this, I'm at risk of having lost some messages.Expected behavior
EventBus
should returnPromise<void>
.void
because we should not expect any return value.Others
Do you have any objection against this? The promise would resolve when all handlers have been called.
The text was updated successfully, but these errors were encountered: