Class PooledStreamingEventProcessorModule
- All Implemented Interfaces:
Module,ModuleBuilder<PooledStreamingEventProcessorModule>,EventProcessorModule,EventProcessorModule.CustomizationPhase<PooledStreamingEventProcessorModule,,PooledStreamingEventProcessorConfiguration> EventProcessorModule.EventHandlingPhase<PooledStreamingEventProcessorModule,PooledStreamingEventProcessorConfiguration>
PooledStreamingEventProcessor component.
The main capabilities provided by this module include:
- Automatic thread pool configuration for coordinator and worker executors
- Event handling component decoration with tracing, monitoring, and interception
- Integration with shared configuration customizations from parent modules
- Lifecycle management for the created processor and its executors
This module is typically not instantiated directly but created through
EventProcessorModule.pooledStreaming(String) or registered via
PooledStreamingEventProcessorsConfigurer.defaultProcessor(java.lang.String, java.util.function.Function<org.axonframework.messaging.eventhandling.configuration.EventHandlingComponentsConfigurer.RequiredComponentPhase, org.axonframework.messaging.eventhandling.configuration.EventHandlingComponentsConfigurer.CompletePhase>) methods.
The module applies shared defaults from PooledStreamingEventProcessorsConfigurer and
EventProcessingConfigurer before applying
processor-specific customizations.
- Since:
- 5.0.0
- Author:
- Mateusz Nowak
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic interfaceAllows customizing thePooledStreamingEventProcessorConfiguration.Nested classes/interfaces inherited from interface org.axonframework.messaging.eventhandling.configuration.EventProcessorModule
EventProcessorModule.CustomizationPhase<P extends EventProcessorModule,C extends EventProcessorConfiguration>, EventProcessorModule.EventHandlingPhase<P extends EventProcessorModule, C extends EventProcessorConfiguration> -
Field Summary
Fields inherited from class org.axonframework.common.configuration.BaseModule
name -
Constructor Summary
ConstructorsConstructorDescriptionPooledStreamingEventProcessorModule(String processorName) Constructs a module with the given processor name. -
Method Summary
Modifier and TypeMethodDescriptionbuild()Builds aModuleof typeM.customized(BiFunction<Configuration, PooledStreamingEventProcessorConfiguration, PooledStreamingEventProcessorConfiguration> instanceCustomization) Customizes the processor configuration by applying modifications to the default configuration.EventProcessorModule.CustomizationPhase<PooledStreamingEventProcessorModule, PooledStreamingEventProcessorConfiguration> eventHandlingComponents(Function<EventHandlingComponentsConfigurer.RequiredComponentPhase, EventHandlingComponentsConfigurer.CompletePhase> configurerTask) Configures event handling components using a configurer function.Builds the processor module with the current configuration.Methods inherited from class org.axonframework.common.configuration.BaseModule
build, componentRegistry, name, postProcessConfiguration
-
Constructor Details
-
PooledStreamingEventProcessorModule
Constructs a module with the given processor name.The processor name will be used as the module name and as the unique identifier for the
PooledStreamingEventProcessorcomponent created by this module.- Parameters:
processorName- The unique name for the pooled streaming event processor.
-
-
Method Details
-
build
Description copied from interface:ModuleBuilderBuilds aModuleof typeM.- Specified by:
buildin interfaceModuleBuilder<PooledStreamingEventProcessorModule>- Returns:
- A
Moduleof typeM.
-
customized
public PooledStreamingEventProcessorModule customized(@Nonnull BiFunction<Configuration, PooledStreamingEventProcessorConfiguration, PooledStreamingEventProcessorConfiguration> instanceCustomization) Description copied from interface:EventProcessorModule.CustomizationPhaseCustomizes the processor configuration by applying modifications to the default configuration.This method applies processor-specific customizations on top of shared defaults from parent modules, providing the recommended approach for most configuration scenarios.
- Specified by:
customizedin interfaceEventProcessorModule.CustomizationPhase<PooledStreamingEventProcessorModule,PooledStreamingEventProcessorConfiguration> - Parameters:
instanceCustomization- A function that receives the configuration and default processor config, returning the customized processor configuration.- Returns:
- The configured processor module.
-
notCustomized
Description copied from interface:EventProcessorModule.CustomizationPhaseBuilds the processor module with the current configuration.- Specified by:
notCustomizedin interfaceEventProcessorModule.CustomizationPhase<PooledStreamingEventProcessorModule,PooledStreamingEventProcessorConfiguration> - Returns:
- The configured processor module.
-
eventHandlingComponents
public EventProcessorModule.CustomizationPhase<PooledStreamingEventProcessorModule,PooledStreamingEventProcessorConfiguration> eventHandlingComponents(@Nonnull Function<EventHandlingComponentsConfigurer.RequiredComponentPhase, EventHandlingComponentsConfigurer.CompletePhase> configurerTask) Description copied from interface:EventProcessorModule.EventHandlingPhaseConfigures event handling components using a configurer function.- Specified by:
eventHandlingComponentsin interfaceEventProcessorModule.EventHandlingPhase<PooledStreamingEventProcessorModule,PooledStreamingEventProcessorConfiguration> - Parameters:
configurerTask- The configurer function.- Returns:
- The customization phase for further configuration.
-