Projection CLI Actions
PHP rebuild and delete projections
Projection Actions
Projection initialization
As projection can be restarted, deleted and created differently. When the projection knows how to setup it itself, it's easy to rebuild it when change is needed.
And inside the projection we need to implement ProjectionInitialization
to tell Ecotone
what to do:
With Polling projections, your projection will be initialized automatically. With Event Driven projections, your projections will not be created on startup, consider running command first.
Resetting/Rebuilding the projection
In order to restart the projection in case we want to provide incompatible change, we can simply reset the projection and it will build up from the beginning.
And inside the projection we need to implement ProjectionReset
to tell Ecotone
what to do:
Deleting the projection
If we want to delete the projection
And inside the projection we need to implement ProjectionDelete
to tell Ecotone
what to do:
Manually triggering projection
If we want to manually trigger projection
This can come in handy is specific situations. E.g. in case of asynchronous event-driven projection failed in the middle of resetting. Instead of resetting it again or waiting for event which will trigger your projection, you can do it manually.
Last updated