Implement this interface for the Envelope handler in the Projection. Some projections
may have more specific handler types.
It can be stateful, with variables and mutable data structures.
It is invoked by the Projection machinery one envelope at a time and visibility
guarantees between the invocations are handled automatically, i.e. no volatile or
other concurrency primitives are needed for managing the state.
Supported error handling strategies for when processing an Envelope fails can be
defined in configuration or using the withRecoveryStrategy method of a Projection
implementation.
The process method is invoked for each Envelope.
One envelope is processed at a time. The returned CompletionStage is to be completed when the processing
of the envelope has finished. It will not be invoked with the next envelope until after the returned
CompletionStage has been completed.
The process method is invoked for each Envelope.
One envelope is processed at a time. The returned CompletionStage is to be completed when the processing
of the envelope has finished. It will not be invoked with the next envelope until after the returned
CompletionStage has been completed.
Invoked when the projection is starting, before first envelope is processed.
Can be overridden to implement initialization. It is also called when the Projection
is restarted after a failure.
Invoked when the projection is starting, before first envelope is processed.
Can be overridden to implement initialization. It is also called when the Projection
is restarted after a failure.
Invoked when the projection has been stopped. Can be overridden to implement resource
cleanup. It is also called when the Projection is restarted after a failure.
Invoked when the projection has been stopped. Can be overridden to implement resource
cleanup. It is also called when the Projection is restarted after a failure.