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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ordering of DomainEventNotifications in OutboxMessages table #50

Open
PavloPaitak opened this issue Nov 18, 2023 · 0 comments
Open

Ordering of DomainEventNotifications in OutboxMessages table #50

PavloPaitak opened this issue Nov 18, 2023 · 0 comments

Comments

@PavloPaitak
Copy link

Hi, I appreciate your work a lot 馃挴 馃憤

I have one question.

Why in DomainEventsDispatcher do you decide firstly to publish DomainEvents to the specific Handlers and then only save DomainEventNotification into OutboxMessages?

image

In this case, the first handled commands will save DomainEventNotifications last, and the last handled commands first.
So the order is vice versa.

I saw that you also have OccurredOn but you do not use it during processing DomainEventNotifications in ProcessOutboxCommandHandler.

image

The only use of this property is in the Test OutboxMessagesHelper class.

image

In my case, after I used your code I can see that Messages in a Queue are in reverse order of how commands handlers and event handlers were processed.

Isn't it better to save DomainEventNotification into OutboxMessages first and then publish DomainEvents to the specific Handlers?

image

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

No branches or pull requests

1 participant