@Override public EventProcessingConfigurer registerTrackingEventProcessor(String name, Function<Configuration, StreamableMessageSource<TrackedEventMessage<?>>> source, Function<Configuration, TrackingEventProcessorConfiguration> processorConfiguration) { registerEventProcessor(name, (n, c, ehi) -> trackingEventProcessor(n, ehi, processorConfiguration.apply(c), source.apply(c))); return this; }
@SuppressWarnings("unchecked") private EventProcessor defaultEventProcessor(String name, Configuration conf, EventHandlerInvoker eventHandlerInvoker) { if (conf.eventBus() instanceof StreamableMessageSource) { return trackingEventProcessor(name, eventHandlerInvoker, conf.getComponent( TrackingEventProcessorConfiguration.class, TrackingEventProcessorConfiguration::forSingleThreadedProcessing), (StreamableMessageSource) conf.eventBus()); } else { return subscribingEventProcessor(name, conf, eventHandlerInvoker, Configuration::eventBus); } }
@Override public EventProcessingConfigurer registerTrackingEventProcessor(String name, Function<Configuration, StreamableMessageSource<TrackedEventMessage<?>>> source, Function<Configuration, TrackingEventProcessorConfiguration> processorConfiguration) { registerEventProcessor(name, (n, c, ehi) -> trackingEventProcessor(n, ehi, processorConfiguration.apply(c), source.apply(c))); return this; }
@SuppressWarnings("unchecked") private EventProcessor defaultEventProcessor(String name, Configuration conf, EventHandlerInvoker eventHandlerInvoker) { if (conf.eventBus() instanceof StreamableMessageSource) { return trackingEventProcessor(name, eventHandlerInvoker, conf.getComponent( TrackingEventProcessorConfiguration.class, TrackingEventProcessorConfiguration::forSingleThreadedProcessing), (StreamableMessageSource) conf.eventBus()); } else { return subscribingEventProcessor(name, conf, eventHandlerInvoker, Configuration::eventBus); } }