AnnotatedSagaManager javaconfig in multimodule project

Hi there,
While using axon + spring in multimodule project I wold like to setup some sagas (each saga has its own module).
For this I need to setup AnnotatedSagaManager.

@Bean
AnnotatedSagaManager accessorRelationSagaManager(SagaRepository sagaRepository, EventBus eventBus, SagaFactory sagaFactory) {
    AnnotatedSagaManager annotatedSagaManager = new AnnotatedSagaManager(sagaRepository, sagaFactory, AccessorRelationSaga.class);
    eventBus.subscribe(annotatedSagaManager);
    return annotatedSagaManager;
}

Is it ok to have new sagamanager for each saga?
As I can see there isn’t simple way how to register one sagamanager for all of my sagas (the way could be with classpath scan of sagas).

Regards

Hi Lukas,

it’s perfectly fine to have a SagaManager for each Saga type. It does mean, however, that when you use the AsyncSagaManager, that each instance will se a different set of threads.That may be a good thing, or not, depending on your wishes.

Cheers,

Allard