We’re in the process of transitioning from Axon 3 to 4 and aren’t quite sure how to configure our event processing strategy for Sagas. While most of the upgrade issues have been resolved through various forums, google foo, and source code trolling, finding the equivalent for the **SagaConfiguration**.
subscribingSagaManager with an EventProcessingStrategy is proving challenging.
`
public static SagaConfiguration subscribingSagaManager(
Class sagaType,
Function<Configuration, SubscribableMessageSource<EventMessage<?>>> messageSourceBuilder,
Function<Configuration, EventProcessingStrategy> eventProcessingStrategy);
`
We currently configure our saga(s) beans in the following manner in order
`
@Bean
public SagaConfiguration activityMonitorSagaConfiguration(
SpringAMQPMessageSource eventSource,
@Qualifier(…) Executor executor) {
return SagaConfiguration.subscribingSagaManager(
ActivityMonitorSaga.class, c -> eventSource,
c -> new AsynchronousEventProcessingStrategy(executor,
SequentialPerAggregatePolicy.instance()));
}
@Bean
public SagaConfiguration licenseMonitorSagaConfiguration(
SpringAMQPMessageSource eventSource,
````@Qualifier(…) Executor executor) {
return SagaConfiguration.subscribingSagaManager(
````LicenseMonitorSaga.class, c -> eventSource,
c -> new AsynchronousEventProcessingStrategy(executor,
SequentialPerAggregatePolicy.instance()));
}
…
@Saga(sagaStore = “cachingSagaStore”)
class ActivityMonitorSaga { … }
@Saga(sagaStore = "cachingSagaStore")
class LicenseMonitorSaga { ... }
`
What is the proper way to configure a Saga with an EventProcessingStrategy in Axon 4? Your help is much appreciated and many thank yous in advance.