Custom Message Dispatcher

Last updated at 26 March 2018 | Published at 07 March 2018

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

<?php

namespace EventSauce\EventSourcing;

interface MessageDispatcher
{
    public function dispatch(Message ... $messages);
}

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