Saga configuration using Spring

265 views
Skip to first unread message

jorge.oliv...@santander.co.uk

unread,
Sep 5, 2018, 4:04:55 AM9/5/18
to Axon Framework Users
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? 


2) 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?

3) 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.

Allard Buijze

unread,
Sep 15, 2018, 2:26:13 PM9/15/18
to axonfr...@googlegroups.com
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
--
You received this message because you are subscribed to the Google Groups "Axon Framework Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to axonframewor...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
--
Allard Buijze
CTO

E: allard...@axoniq.io
T: +31 6 34 73 99 89
Reply all
Reply to author
Forward
0 new messages