Class SagaProcessorDefinition.Selector
- Enclosing class:
SagaProcessorDefinition
-
Method Summary
Modifier and TypeMethodDescriptioncustomized(UnaryOperator<EventProcessorConfiguration> customization) Completes the definition with acustomizationapplied whatever mode the selected processor runs in, covering the settings both modes share: the error handler, the unit of work factory, and extensions.Completes the definition with acustomizationapplied only when the selected processor runs in pooled streaming mode, which is the default for a Saga.whenSubscribing(UnaryOperator<SubscribingEventProcessorConfiguration> customization) Completes the definition with acustomizationapplied only when the selected processor runs in subscribing mode.
-
Method Details
-
whenPooledStreaming
public SagaProcessorDefinition whenPooledStreaming(UnaryOperator<PooledStreamingEventProcessorConfiguration> customization) Completes the definition with acustomizationapplied only when the selected processor runs in pooled streaming mode, which is the default for a Saga.Naming the mode does not select it. The processor's mode comes from
axon.eventhandling.processors.<name>.modeor a matchingEventProcessorDefinition; this only says which configuration the customization was written against. Usecustomized(UnaryOperator)for settings both modes share.- Parameters:
customization- the customization to apply- Returns:
- the completed definition, to be declared as a Spring bean
-
whenSubscribing
public SagaProcessorDefinition whenSubscribing(UnaryOperator<SubscribingEventProcessorConfiguration> customization) Completes the definition with acustomizationapplied only when the selected processor runs in subscribing mode.Naming the mode does not select it. Switch a Saga to a subscribing processor with
axon.eventhandling.processors.<name>.mode=subscribing; this only says which configuration the customization was written against. Usecustomized(UnaryOperator)for settings both modes share.- Parameters:
customization- the customization to apply- Returns:
- the completed definition, to be declared as a Spring bean
-
customized
Completes the definition with acustomizationapplied whatever mode the selected processor runs in, covering the settings both modes share: the error handler, the unit of work factory, and extensions.The
customizationmust return the configuration it was given. These configuration objects are mutable builders whose setters returnthis, so returning anything else replaces a pooled streaming or subscribing configuration with a plain one and is rejected.- Parameters:
customization- the customization to apply- Returns:
- the completed definition, to be declared as a Spring bean
-