Hi,
we are using Axon Framework 4.5.8 and Axon Server SE 4.5.10 and try to tune our event processing. Currently we’re running a single instance of our application and configure a TEP as follows:
TrackingEventProcessorConfiguration tepConfig =
TrackingEventProcessorConfiguration.forParallelProcessing(8)
.andInitialSegmentsCount(8)
.andBatchSize(2000)
.andInitialTrackingToken(StreamableMessageSource::createHeadToken);
configurer.registerTrackingEventProcessor("my-processor", c -> (StreamableMessageSource) c.eventBus(), s -> tepConfig);
respectively for testing purposes a PSEP as follows
Function<String, ScheduledExecutorService> coordinatorExecutorBuilder =
name -> Executors.newScheduledThreadPool(1, new AxonThreadFactory("Coordinator - " + name));
Function<String, ScheduledExecutorService> workerExecutorBuilder =
name -> Executors.newScheduledThreadPool(8, new AxonThreadFactory("Worker - " + name));
EventProcessingConfigurer.PooledStreamingProcessorConfiguration psepConfig =
(config, builder) -> builder.coordinatorExecutor(coordinatorExecutorBuilder)
.workerExecutor(workerExecutorBuilder)
.initialSegmentCount(8)
.batchSize(300)
.initialToken(StreamableMessageSource::createHeadToken);
configurer
.registerPooledStreamingEventProcessor(AclManagementEventHandler.PROCESSOR)
.registerPooledStreamingEventProcessorConfiguration(AclManagementEventHandler.PROCESSOR, psepConfig);
We are running our application against an axon server instance that is initialized with an existing dump of a control database and an existing dump of events/index files.
Regardles of the initialSegmentCount we set for the TEP or PSEP through the Axon framework configuration, Axon Server always uses 3 segments for the TEP and PSEP and we need to manually split segments through the axon server dashboard to get to the desired number of segments.
I’ve also checked our application properties and we do not override the number of segments anywhere, so I’m wondering
a) why Axon Server is not taking the number of initial segments configured for the processor on the framework side and
b) where the number of 3 segments comes from
Does Axon server somehow remember the number of segments used for a processor previously by it’s name somehow in the control database? That might explain it, because we are using an existing dump to initialize axon server as said before and the processor might previously be run with 3 segments. But still then i would question if that behaviour is desired, because I would expect the number of segments for the processor to be as configured through the framework.
Any inputs on this are appreciated,
Thanks and best Regards,
Jakob