Hello
I have a quick question regarding Axon 4.0. What is the proper way to define things like SequencingPolicy, batchSize, threadCount and initialSegmentCount in the code. Everything in combination with spring.
Previously we were able to define the configuration for tracking processors using the EventHandlingConfiguration and/or EventProcessingConfiguration through @Autowired.
I try to achieve the same in Axon 4.0 and came up with following:
Configure default SequencingPolicy:
Variation 1
@Bean fun sequencingPolicy() = SequentialPolicy()
Variation 2
@Autowired fun configure(config: EventProcessingModule) { config.registerDefaultSequencingPolicy { SequentialPolicy() } }
Configure threadCount, segmentSize and batchSize
The only solution that somehow worked for me
@Autowired fun config(configurer: Configurer) { configurer.registerComponent(TrackingEventProcessorConfiguration::class.java, { TrackingEventProcessorConfiguration. .forParallelProcessing(2) .andInitialSegmentCount(4) }) }
Is this the right way to do it or am I missing something? I couldn’t find anything regarding Axon 4.0 in the documentation.
Kind regards
José