othillo / broadway-replayer
Yet another event replayer for broadway/broadway
Installs: 17
Dependents: 0
Suggesters: 0
Security: 0
Stars: 1
Watchers: 1
Forks: 1
Open Issues: 0
Type:project
Requires
- broadway/broadway: ^0.9@dev
Requires (Dev)
- fabpot/php-cs-fixer: ^1.10
- phpunit/phpunit: ^4.5
This package is auto-updated.
Last update: 2020-04-18 10:45:41 UTC
README
Yet another event replayer for broadway/broadway
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