// The `Configuration` was returned through the `Configurer` or is available as a bean in the Spring Application Context
public TrackingEventProcessor retrieveTrackingProcessor(org.axonframework.config.Configuration axonConfig,
return axonConfig.eventProcessingConfiguration()
.eventProcessor(processorName) // This call returns an Optional
.filter(eventProcessor -> eventProcessor instanceof TrackingEventProcessor)
.map(eventProcessor -> (TrackingEventProcessor) eventProcessor)
.orElseThrow(() -> new IllegalStateException(
"No Tracking Event Processor found with name " + processorName