Class EventProcessorControlService

java.lang.Object
org.axonframework.axonserver.connector.event.EventProcessorControlService

@Internal public class EventProcessorControlService extends Object
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
  • Constructor Details

    • EventProcessorControlService

      public EventProcessorControlService(@Nonnull Configuration configuration, @Nonnull AxonServerConnectionManager connectionManager, @Nonnull String context, @Nonnull Map<String,AxonServerConfiguration.Eventhandling.ProcessorSettings> processorConfig)
      Initialize an 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.

      Parameters:
      configuration - The EventProcessor configuration of this application, used to retrieve the registered event processors from.
      connectionManager - A AxonServerConnectionManager from which to retrieve the ControlChannel and AdminChannel.
      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.
  • Method Details

    • start

      public 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.

      The registration is performed in Phase.INBOUND_EVENT_CONNECTORS phase, to ensure the event processors this service provides control over have been started.