Skip to content
This repository has been archived by the owner on Jun 1, 2021. It is now read-only.

Custom event routing #45

Closed
krasserm opened this issue Mar 3, 2015 · 1 comment
Closed

Custom event routing #45

krasserm opened this issue Mar 3, 2015 · 1 comment
Assignees
Milestone

Comments

@krasserm
Copy link
Contributor

krasserm commented Mar 3, 2015

After #36 is implemented, events are routed to Eventsourced actors (= destinations) based on the following default rules:

  1. if destination.aggregateId is not defined, the destination will receive all events regardless whether event.aggregateId is defined or not.
  2. if destination.aggregateId is defined, the destination will only receive events with matching event.aggregateId.

This shall be generalized to allow custom routing to destinations. When persisting events, EventsourcedActors should be able to specify a set of additional aggregate ids as routing destination. The default routing behavior as described above should be preserved.

An EventsourcedActor should also be able to opt-out from routing of events to replicas with the same aggregate id (by specifying an empty set). In this case, the only consumer of the event is the emitting EventsourcedActor. Routing of events to destination that have no aggregate id defined cannot be overriden. These destination must always receive all events from the event log (but can of course choose to ignore them).

@krasserm krasserm changed the title Content based event routing Custom event routing Mar 4, 2015
@krasserm krasserm added this to the 0.1 milestone Mar 4, 2015
@krasserm krasserm self-assigned this Mar 4, 2015
@krasserm krasserm reopened this Mar 17, 2015
@krasserm
Copy link
Contributor Author

Opt-out from event routing to replicas makes little sense. Consequently, an application shouldn't be able to override both default routing rules, defined above. If a single event-sourced actor should be isolated, an application shouldn't define replicas of that actor.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

1 participant