Class EventProcessorControlService
java.lang.Object
org.axonframework.axonserver.connector.event.EventProcessorControlService
Service that listens to
PlatformOutboundInstructions to control
EventProcessors when requested by Axon Server.
Will delegate the calls to the AxonServerConnectionManager for further processing.
- Since:
- 4.0.0
- Author:
- Sara Pellegrini, Steven van Beelen
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionprotected static final record -
Constructor Summary
ConstructorsConstructorDescriptionEventProcessorControlService(Configuration configuration, AxonServerConnectionManager connectionManager, String context, Map<String, AxonServerConfiguration.Eventhandling.ProcessorSettings> processorConfig) Initialize anEventProcessorControlService. -
Method Summary
Modifier and TypeMethodDescriptionvoidstart()RegistersEventProcessorinstruction handlers to theControlChannelfor the configuredcontextand set the load balancing strategies through theAdminChannelfor the configuredcontext.
-
Constructor Details
-
EventProcessorControlService
public EventProcessorControlService(@Nonnull Configuration configuration, @Nonnull AxonServerConnectionManager connectionManager, @Nonnull String context, @Nonnull Map<String, AxonServerConfiguration.Eventhandling.ProcessorSettings> processorConfig) Initialize anEventProcessorControlService.This service adds processor instruction handlers to the
ControlChannelof the givencontext. Doing so ensures operation like thestartandshutdowncan be triggered through Axon Server. Furthermore, it sets the configured load balancing strategies through theAdminChannelof thecontext.- Parameters:
configuration- TheEventProcessorconfiguration of this application, used to retrieve the registered event processors from.connectionManager- AAxonServerConnectionManagerfrom which to retrieve theControlChannelandAdminChannel.context- The context of this application instance to retrieve theControlChannelandAdminChannelfor.processorConfig- The processor configuration from theAxonServerConfiguration, used to (for example) retrieve the load balancing strategies from.
-
-
Method Details
-
start
public void start()RegistersEventProcessorinstruction handlers to theControlChannelfor the configuredcontextand set the load balancing strategies through theAdminChannelfor the configuredcontext.The registration is performed in
Phase.INBOUND_EVENT_CONNECTORSphase, to ensure the event processors this service provides control over have been started.
-