Annotation Interface ReplayStatusChangedHandler
@Internal
@Retention(RUNTIME)
@MessageHandler(messageType=ReplayStatusChanged.class)
@Target({METHOD,ANNOTATION_TYPE})
public @interface ReplayStatusChangedHandler
Annotation that can be placed on a method that is to be invoked when the
ReplayStatus is about to change.
In doing so, this handler has two concrete moments when it is invoked:
- When the
ReplayStatuschanges fromReplayStatus.REGULARtoReplayStatus.REPLAY, exactly before the first replayed event is processed - When the
ReplayStatuschanges fromReplayStatus.REPLAYtoReplayStatus.REGULAR, exactly after processing the final event of the replay
Methods annotated with this annotation thus process replay status changes, typically to prepare for and finalize an event
replay. Actions to consider during a ReplayStatus change are cleaning up the projection state, clearing
caches, or switching storage solution aliases. To that end, the ReplayStatusChange message contains the
ReplayStatus that will be changed to.
- Since:
- 5.1.0
- Author:
- Simon Zambrovski, Stefan Dragisic, Steven van Beelen
- See Also: