Custom Message Dispatcher

You can create a custom implementation of the message dispatcher if needed. Your class must implement the MessageDispatcher interface:


namespace EventSauce\EventSourcing;

interface MessageDispatcher
    public function dispatch(Message ... $messages): void;

It’s recommended to leverage the MessageSerializer capabilities, just like the custom repository does.

Frank de Jonge

EventSauce is a project by Frank de Jonge.