/** * Register a TrackingProcessor using default configuration for the given {@code name}. Unlike * {@link #usingTrackingProcessors()}, this method will not default all processors to tracking, but instead only * use tracking for event handler that have been assigned to the processor with given {@code name}. * <p> * Events will be read from the EventBus (or EventStore) registered with the main configuration * * @param name The name of the processor * @return this EventHandlingConfiguration instance for further configuration * @deprecated use {@link EventProcessingConfiguration#registerTrackingEventProcessor(String)} instead */ @SuppressWarnings("UnusedReturnValue") @Deprecated public EventHandlingConfiguration registerTrackingProcessor(String name) { return registerTrackingProcessor(name, Configuration::eventBus); }
/** * Registers a TrackingProcessor with the given {@code name}, reading from the Event Bus (or Store) from the main * configuration and using the given {@code processorConfiguration}. The given {@code sequencingPolicy} defines * the policy for events that need to be executed sequentially. * * @param name The name of the Tracking Processor * @param processorConfiguration The configuration for the processor * @param sequencingPolicy The sequencing policy to apply when processing events in parallel * @return this EventHandlingConfiguration instance for further configuration * @deprecated use {@link EventProcessingConfiguration#registerTrackingEventProcessor(String, Function)} instead */ @Deprecated public EventHandlingConfiguration registerTrackingProcessor(String name, Function<Configuration, TrackingEventProcessorConfiguration> processorConfiguration, Function<Configuration, SequencingPolicy<? super EventMessage<?>>> sequencingPolicy) { return registerTrackingProcessor(name, Configuration::eventBus, processorConfiguration, sequencingPolicy); }
/** * Registers a TrackingProcessor using the given {@code source} to read messages from. * * @param name The name of the TrackingProcessor * @param source The source of messages for this processor * @return this EventHandlingConfiguration instance for further configuration * @deprecated use {@link EventProcessingConfiguration#registerTrackingEventProcessorUsingSource(String, Function)} instead */ @SuppressWarnings("unchecked") @Deprecated public EventHandlingConfiguration registerTrackingProcessor(String name, Function<Configuration, StreamableMessageSource<TrackedEventMessage<?>>> source) { return registerTrackingProcessor( name, source, c -> c.getComponent(TrackingEventProcessorConfiguration.class, TrackingEventProcessorConfiguration::forSingleThreadedProcessing), c -> c.getComponent(SequencingPolicy.class, SequentialPerAggregatePolicy::instance) ); }