public class EventProcessorControlService extends Object implements Lifecycle
PlatformOutboundInstructions to control EventProcessors when for example
requested by Axon Server. Will delegate the calls to the AxonServerConnectionManager for further processing.| Modifier and Type | Class and Description |
|---|---|
protected static class |
EventProcessorControlService.AxonProcessorInstructionHandler |
Lifecycle.LifecycleHandler, Lifecycle.LifecycleRegistry| Modifier and Type | Field and Description |
|---|---|
protected AxonServerConnectionManager |
axonServerConnectionManager |
protected String |
context |
protected EventProcessingConfiguration |
eventProcessingConfiguration |
protected Map<String,AxonServerConfiguration.Eventhandling.ProcessorSettings> |
processorConfig |
| Constructor and Description |
|---|
EventProcessorControlService(AxonServerConnectionManager axonServerConnectionManager,
EventProcessingConfiguration eventProcessingConfiguration,
AxonServerConfiguration axonServerConfiguration)
Initialize a
EventProcessorControlService. |
EventProcessorControlService(AxonServerConnectionManager axonServerConnectionManager,
EventProcessingConfiguration eventProcessingConfiguration,
String context)
Deprecated.
Please use
EventProcessorControlService(AxonServerConnectionManager, EventProcessingConfiguration, String, Map) to
ensure processor settings are provided. |
EventProcessorControlService(AxonServerConnectionManager axonServerConnectionManager,
EventProcessingConfiguration eventProcessingConfiguration,
String context,
Map<String,AxonServerConfiguration.Eventhandling.ProcessorSettings> processorConfig)
Initialize a
EventProcessorControlService. |
| Modifier and Type | Method and Description |
|---|---|
protected Supplier<io.axoniq.axonserver.grpc.control.EventProcessorInfo> |
infoSupplier(EventProcessor processor)
Constructs an
EventProcessorInfo for the given processor. |
void |
registerLifecycleHandlers(Lifecycle.LifecycleRegistry lifecycle)
Registers the activities to be executed in the various phases of an application's lifecycle.
|
void |
start()
Registers
EventProcessor instruction handlers to the ControlChannel for the configured
context and set the load balancing strategies through the AdminChannel for the configured
context. |
protected final AxonServerConnectionManager axonServerConnectionManager
protected final EventProcessingConfiguration eventProcessingConfiguration
protected final String context
protected final Map<String,AxonServerConfiguration.Eventhandling.ProcessorSettings> processorConfig
public EventProcessorControlService(AxonServerConnectionManager axonServerConnectionManager, EventProcessingConfiguration eventProcessingConfiguration, AxonServerConfiguration axonServerConfiguration)
EventProcessorControlService.
This service adds processor instruction handlers to the ControlChannel of the
default context. Doing so ensures operation like the
start and shutdown can be triggered through Axon
Server. Furthermore, it sets the configured load balancing strategies} through the AdminChannel of the
default context.
axonServerConnectionManager - A AxonServerConnectionManager from which to retrieve the
ControlChannel and AdminChannel.eventProcessingConfiguration - The EventProcessor configuration of this application, used to
retrieve the registered event processors from.axonServerConfiguration - The AxonServerConfiguration used to retrieve the
default context
from.@Deprecated public EventProcessorControlService(AxonServerConnectionManager axonServerConnectionManager, EventProcessingConfiguration eventProcessingConfiguration, String context)
EventProcessorControlService(AxonServerConnectionManager, EventProcessingConfiguration, String, Map) to
ensure processor settings are provided.EventProcessorControlService.
This service adds processor instruction handlers to the ControlChannel of the given context.
Doing so ensures operation like the start and
shutdown can be triggered through Axon Server. Furthermore, it sets the
configured load balancing strategies} through the AdminChannel of the context.
axonServerConnectionManager - A AxonServerConnectionManager from which to retrieve the
ControlChannel and AdminChannel.eventProcessingConfiguration - The EventProcessor configuration of this application, used to
retrieve the registered event processors from.context - The context of this application instance to retrieve the
ControlChannel and AdminChannel for.public EventProcessorControlService(AxonServerConnectionManager axonServerConnectionManager, EventProcessingConfiguration eventProcessingConfiguration, String context, Map<String,AxonServerConfiguration.Eventhandling.ProcessorSettings> processorConfig)
EventProcessorControlService.
This service adds processor instruction handlers to the ControlChannel of the given context.
Doing so ensures operation like the start and
shutdown can be triggered through Axon Server. Furthermore, it sets the
configured load balancing strategies through the AdminChannel of the context.
axonServerConnectionManager - A AxonServerConnectionManager from which to retrieve the
ControlChannel and AdminChannel.eventProcessingConfiguration - The EventProcessor configuration of this application, used to
retrieve the registered event processors from.context - The context of this application instance to retrieve the
ControlChannel and AdminChannel for.processorConfig - The processor configuration from the AxonServerConfiguration, used to
(for example) retrieve the load balancing strategies from.public void registerLifecycleHandlers(@Nonnull Lifecycle.LifecycleRegistry lifecycle)
LifecycleregisterLifecycleHandlers in interface Lifecyclelifecycle - the lifecycle instance to register the handlers withLifecycle.LifecycleRegistry.onShutdown(int, Runnable),
LifecycleRegistry#onShutdown(int, LifecycleHandler),
Lifecycle.LifecycleRegistry.onStart(int, Runnable),
LifecycleRegistry#onStart(int, LifecycleHandler)public void start()
EventProcessor instruction handlers to the ControlChannel for the configured
context and set the load balancing strategies through the AdminChannel for the configured
context.
The registration is performed in Phase.INBOUND_EVENT_CONNECTORS phase, to ensure the event processors
this service provides control over have been started.
protected Supplier<io.axoniq.axonserver.grpc.control.EventProcessorInfo> infoSupplier(EventProcessor processor)
EventProcessorInfo for the given processor. Typically results in a
StreamingEventProcessor or SubscribingEventProcessor specific instance.processor - The EventProcessor to construct a EventProcessorInfo for.Supplier of EventProcessorInfo, based on the given processor.Copyright © 2010–2025. All rights reserved.