private TrackingEventProcessor trackingEventProcessor(Configuration conf, String name, EventHandlerInvoker eventHandlerInvoker, Function<Configuration, TrackingEventProcessorConfiguration> config, Function<Configuration, StreamableMessageSource<TrackedEventMessage<?>>> source) { return new TrackingEventProcessor(name, eventHandlerInvoker, source.apply(conf), tokenStore.getOrDefault( name, c -> c.getComponent(TokenStore.class, InMemoryTokenStore::new) ).apply(conf), getTransactionManager(conf, name), getMessageMonitor(conf, EventProcessor.class, name), getRollbackConfiguration(conf, name), getErrorHandler(conf, name), config.apply(conf)); }