-
Notifications
You must be signed in to change notification settings - Fork 3.3k
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
Question: How to publish an outbox-using distributed event that is compatible with the local event bus provider. #11100
Milestone
Comments
gdlcf88
changed the title
Question: How to publish a distributed event that is compatible with the local event implementation.
Question: How to publish a distributed event that is compatible with the local event bus provider.
Dec 28, 2021
gdlcf88
changed the title
Question: How to publish a distributed event that is compatible with the local event bus provider.
Question: How to publish outbox-using distributed event that is compatible with the local event bus provider.
Dec 28, 2021
gdlcf88
changed the title
Question: How to publish outbox-using distributed event that is compatible with the local event bus provider.
Question: How to publish an outbox-using distributed event that is compatible with the local event bus provider.
Dec 28, 2021
The local handler is run on the same UOW and will publish |
@maliming is there any chance use outbox pattern in local event,i want to save data and event in same transaction and then trigger event by background worker (with retry system),i don't want to use real distributed event bus. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Assume I am deleting a Book entity, and I want to send a notification email to the author if the deletion success.
After #10008, using the distributed event bus with outbox may be a good way since it ensures the UOW completion success and then publishes the domain events. When the
IDistributedEventHandler<EntityDeletedEto<BookEto>>
executes, the book entity must have been deleted.But the question is, I noticed that the LocalDistributedEventBus does not handle the param
useOutbox = true
:abp/framework/src/Volo.Abp.EventBus/Volo/Abp/EventBus/Distributed/LocalDistributedEventBus.cs
Lines 136 to 144 in e3e1779
This presents a problem because it invokes the handlers as a local event before the UOW saves changes. The book has not been deleted or even will fail to delete.
If the above business is in a module, I don't know whether the app developers are using a real distributed event bus provider or not. So what should I do as a module developer? Or, is there any deviation in my understanding of this design?
Thanks.
:)
The text was updated successfully, but these errors were encountered: