SubscriptionCommandController
final class SubscriptionCommandController extends CommandController (View source)
Manage subscriptions (mainly projections)
If any interaction is required "./flow cr:status" can be asked.
Replay for initialisation
For initialising on a new database - which contains events already - a replay will make sure that the subscriptions are emptied and reapply the events. This can be triggered via "./flow subscription:replay --subscription contentGraph" or "./flow subscription:replayall"
And after registering a new subscription a setup as well as a replay of this subscription is also required.
Replay to repair
In case a subscription is detached and then reinstalled a replay will make sure its caught up to all new events. And that the previous state will be reset as the projections logic might have changed.
Also in case a subscription runs into the error status, its code needs to be fixed, and it can be attempted to be replayed.
See also {\Neos\ContentRepository\Core\Service\ContentRepositoryMaintainer} for more information.
Properties
| protected ContentRepositoryRegistry | $contentRepositoryRegistry |
Methods
Replays the specified subscription of a Content Repository by resetting its state and performing a full catchup.
Replays all projections of the specified Content Repository by resetting their states and performing a full catchup
Reactivate a subscription (Advanced & Experimental)
Details
void
replayCommand(string $subscription, string $contentRepository = 'default', bool $force = false, bool $quiet = false)
Replays the specified subscription of a Content Repository by resetting its state and performing a full catchup.
void
replayAllCommand(string $contentRepository = 'default', bool $force = false, bool $quiet = false)
Replays all projections of the specified Content Repository by resetting their states and performing a full catchup
void
reactivateCommand(string $subscription, string $contentRepository = 'default', bool $quiet = false)
| internal | reactivation is an experimental and advanced concept, if possible a replay should be used instead which is more stable |
Reactivate a subscription (Advanced & Experimental)
The explicit catchup is only needed for projections in the error or detached status with left behind position. Running a full replay would work but might be overkill, instead this reactivation will just attempt catchup the subscription back to active from its current position.