Skip to content

Event from reaction is routed before the inititial event is dispatched to target #925

@mdrachuk

Description

@mdrachuk

This leads to an issue, when there is an event (UserSignedIn) which creates another event as a reaction (UserConsentRequested) and they both are dispatched to a single entity (SessionProjection) with the first event (UserSignedIn) actually creating it, and the second event requiring a repository (SessionRepository) query to be routed to the correct target.

As of now, after routing an event to a projection, a DispatchEventToSubscriber command is posted to the System Bounded Context, after which the next event from queue gets dispatched.

This means that upon dispatching two events from the DispatchQueue, when it comes to the second event, the first one is not dispatched, but scheduled to be dispatched in the System Bounded Context.

Metadata

Metadata

Assignees

Labels

/RoutingIssues related to signal routingbug

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions