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

Event router plugin API #130

Closed
krasserm opened this issue Oct 28, 2015 · 2 comments
Closed

Event router plugin API #130

krasserm opened this issue Oct 28, 2015 · 2 comments

Comments

@krasserm
Copy link
Contributor

At the moment, routing of written event to their registered event-sourced destinations (actors, view and processors) is based on hard-coded logic. Applications should be able to plugin their custom routing logic. This could be used to implement #46.

@krasserm krasserm added this to the 0.4 milestone Oct 28, 2015
@krasserm krasserm modified the milestone: 0.5 Nov 8, 2015
@krasserm
Copy link
Contributor Author

Two cases must be distinguished here:

  • With persistent routing decisions, the destination aggregateIds are persisted with the events, both in the raw event log and in the index. A persistent router can be easily implemented on top of the existing persist and persistOnEvent API that take a customDestinationAggregateIds parameter. Here, the emitter make a routing decision, and persists that decision by setting customDestinationAggregateIds. Now special router plugin API is be needed in this case.
  • With transient routing decisions, the destinations are not persisted with events. By replaying events from the raw event log, routing decisions can also be replayed. This is to some extend comparable to handling decisions made by event handlers i.e. whether an event should be handled or not. This routing approach however is not compatible with replaying events from an aggregateId-based index as the index hasn't recorded custom routing decisions, so only a subset of the originally routed events would actually be replayed to a given destination which is a causality violation.

@krasserm
Copy link
Contributor Author

Won't implement for reasons explained in previous comment.

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