Annotation Interface Saga
Component is a saga instance.
Requires the axon-legacy module on the classpath, which carries the Saga itself. The Saga is registered on
an event processor named after the Saga type, <SagaName>Processor, unless a
@Namespace on the Saga or an explicit
EventProcessorDefinition says otherwise. That processor is configured through the regular
axon.eventhandling.processors.<SagaName>Processor properties. Sagas take part in the same processor
assignment pass as ordinary event handlers, so a Saga and an ordinary handler resolving to the same processor name
share that processor, as they did under one @ProcessingGroup in Axon Framework 4.
The stereotype only lets Spring discover the type; Axon owns the lifecycle of Saga instances. Spring
collaborators are resolved as parameters of a @SagaEventHandler method, not injected into
Saga fields. A Saga type must therefore be public and expose an accessible no-argument constructor.
Sagas carry the Axon Framework 4 API, to ease migration of projects that cannot move off it in one go. This annotation keeps its Axon Framework 4 package for that reason, so migrating Saga classes component-scan unchanged.
- Since:
- 3.0
- Author:
- Allard Buijze
-
Optional Element Summary
Optional Elements