danielcirket / OpenEventSourcing

MIT License
3 stars 0 forks source link

Support middleware for consuming events from a message bus? #21

Open danielcirket opened 4 years ago

danielcirket commented 4 years ago

Currently, the default implementations for consumers/message receivers simply dispatch incoming messages through the IEventDispatcher. Would adding the concept of middleware make sense? This would allow consumers the ability to configure the pipeline that the messages pass through, allowing additional functionality to be added as required without necessarily re-implementing the default dispatching, for example additional logging, projections running directly from the message bus or workflows/process managers and so on...

This would need to work across all providers using a sane API if this is something we want to add, but needs much more consideration.