private EventProcessor buildTrackingEventProcessor(Configuration conf, String name, List<?> handlers, Function<Configuration, TrackingEventProcessorConfiguration> config, Function<Configuration, StreamableMessageSource<TrackedEventMessage<?>>> source, Function<Configuration, SequencingPolicy<? super EventMessage<?>>> sequencingPolicy) { return new TrackingEventProcessor(name, new SimpleEventHandlerInvoker(handlers, conf.parameterResolverFactory(), getListenerInvocationErrorHandler(conf, name), sequencingPolicy.apply(conf)), source.apply(conf), tokenStore.getOrDefault( name, c -> c.getComponent(TokenStore.class, InMemoryTokenStore::new) ).apply(conf), conf.getComponent(TransactionManager.class, NoTransactionManager::instance), getMessageMonitor(conf, EventProcessor.class, name), RollbackConfigurationType.ANY_THROWABLE, getErrorHandler(conf, name), config.apply(conf)); }