Hi,
I am using the axon-spring-boot-starter 4.1.1 (without the axon-server-connector) and wonder if there is something like a graceful shutdown option for Axon.
Originally I assumed that something like the following would work:
`
final ConfigurableApplicationContext applicationContext = SpringApplication.run( MyApplication.class );
…
applicationContext.stop( );
`
It seems that this is not enough, as some non-daemon threads from the EmbeddedEventStore remain. Therefore I tried the following:
`
final ConfigurableApplicationContext applicationContext = SpringApplication.run( MyApplication.class );
…
applicationContext.stop( );
applicationContext.getBean( EmbeddedEventStore.class ).shutDown( );
`
This seems to work, but I am not sure whether this is a good way. Is this correct? Or is there another way to terminate Axon?
Thank you and best regards
Nils