I have zero knowledge on how threads/cores work, but the document was written pretty well so even I can setup saga configuration for parallel processing properly. Here’s what I did.
@Configuration
class SagaParallelConfiguration {
private val processingGroup = "cloud-creation"
private val cloudCreationThreadCount = 5
private val cloudCreationSegmentCount = 5
@Autowired
fun configureProcessor(configurer: Configurer) {
configurer.eventProcessing()
.registerTrackingEventProcessor(processingGroup, { config -> config.eventStore() }) {
TrackingEventProcessorConfiguration.forParallelProcessing(cloudCreationThreadCount)
.andInitialSegmentsCount(cloudCreationSegmentCount)
}
}
}
I have one more question how do I check maximum number of thread that can config to TrackingEventProcessorConfiguration. I deploy this project using kubernetes/docker on my linux server which has 16 cores/32 threads. Does that mean the maximum number of thread that can use is 32.