othillo/broadway-replayer

This package is abandoned and no longer maintained. No replacement package was suggested.

Yet another event replayer for broadway/broadway

dev-master / 0.1.x-dev 2016-02-25 12:33 UTC

This package is auto-updated.

Last update: 2020-04-18 10:45:41 UTC


README

Yet another event replayer for broadway/broadway

Build Status

Motivation

Thanks to the EventStoreManagementInterface in Broadway replaying can be as easy as:

$eventStore->visitEvents(new Criteria(), new CallableEventVisitor(function($domainMessage) use ($projector) {
    $projector->handle($domainMessage);
}));

This project provides a EventBusPublishingVisitor allowing you to register projectors to the event bus just as you would do for regular event handling in Broadway.

In addition it provides a ReplayAwareInterface which provides you with hooks to prepare for and finalize replaying.

Installation

$ composer require othillo/broadway-replayer

Example

Check the ReplayerTest to see how this replayer works.

License

This project is licensed under the MIT License - see the LICENSE file for details