Skip to content
This repository was archived by the owner on Nov 17, 2023. It is now read-only.
This repository was archived by the owner on Nov 17, 2023. It is now read-only.

[BUG] There seems to be an atomicity issue while rising domain events in Ordering.Api #700

@arielmoraes

Description

@arielmoraes

In the Ordering service we have a ValidateOrAddBuyerAggregateWhenOrderStartedDomainEventHandler which handles the OrderStartedDomainEvent, after the Buyer is added or updated a call to SaveEntitiesAsync is made to dispatch the domain events and save the changes to the database, after that, a call to PublishThroughEventBusAsync is made. So, if the changes was already saved by calling the SaveEntitiesAsync method no atomicity will be in place or am I missing something? There is even a bigger problem if a chain of domain events are raised because only the last call to PublishThroughEventBusAsync will have atomicity between the current handled aggregate and the event.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions