Saga configuration using Spring

Hi,

I’m studying the docs about how to use and setup Sagas and i have some questions related with the configuration:

  1. To setup Sagas in a very basic way we only need to define a SagaStore in the config? i mean something like this:

`


@Bean
public SagaStore mySagaStore() {
    return new MongoSagaStore(...); // default is JpaSagaStore
}

`

Do we need to configure something related with AnnotatedSagaManager or AnnotatedSagaRepository ? or this beans are automatically created by Axon?

  1. I have seen that we can configure individuals saga to use Tracking Processor as follow:

`


@Bean
public SagaConfiguration<Saga> mySagaConfiguration() {
    return SagaConfiguration.trackingSagaManager(Saga.class);
}

`

There exist any way to setup all the Sagas to default use Tracking processor as we can do with event handlers?

  1. To setup “deadlines” in the saga, do we need to configure some bean as a SimpleEventScheduler ? or is already provided by Axon? there exist any example about this?

Thanks!!!

Best Regards.

Hi,

  1. if you use the Spring Boot Starter for Axon or the Configuration API, the SagaManager and Repository are created automatically. Annotating your bean with @Saga should be enough.

  2. Not yet. We are improving on the configuration api for the next release.

  3. I beleive you do have to set up an Event Scheduler or Deadline Manager expliticly. Deadline Manager is new in 3.3 and is recommended for most cases, actually. It publishes events just to the Saga that scheduled them, instead to the event bus.

Cheers,

Allard