Custom Message Dispatcher

Last updated at 30 March 2021 | 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): 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.