Interface EventProcessor

All Superinterfaces:
DescribableComponent
All Known Subinterfaces:
StreamingEventProcessor
All Known Implementing Classes:
PooledStreamingEventProcessor, SubscribingEventProcessor

public interface EventProcessor extends DescribableComponent
An Event Processor processes event messages from an event queue or event bus.

Typically, an Event Processor is in charge of publishing the events to a group of registered handlers. This allows attributes and behavior (e.g. transaction management, asynchronous processing, distribution) to be applied over a whole group at once.

Since:
1.2.0
Author:
Allard Buijze
  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
    Indicates whether the processor has been shut down due to an error.
    boolean
    Indicates whether this processor is currently running (i.e. consuming events from its message source).
    Returns the name of this event processor.
    Initiates a shutdown, providing a CompletableFuture that completes when the shutdown process is finished.
    Initiates a start, providing a CompletableFuture that completes when the start process is finished.

    Methods inherited from interface org.axonframework.common.infra.DescribableComponent

    describeTo
  • Method Details

    • name

      String name()
      Returns the name of this event processor. This name is used to detect distributed instances of the same event processor. Multiple instances referring to the same logical event processor (on different JVM's) must have the same name.
      Returns:
      the name of this event processor
    • start

      Initiates a start, providing a CompletableFuture that completes when the start process is finished.
      Returns:
      a CompletableFuture that completes when the start process is finished.
    • isRunning

      boolean isRunning()
      Indicates whether this processor is currently running (i.e. consuming events from its message source).
      Returns:
      true when running, otherwise false
    • isError

      boolean isError()
      Indicates whether the processor has been shut down due to an error. In such case, the processor has forcefully shut down, as it wasn't able to automatically recover.

      Note that this method returns false when the processor was stopped using shutdown().

      Returns:
      true when paused due to an error, otherwise false
    • shutdown

      CompletableFuture<Void> shutdown()
      Initiates a shutdown, providing a CompletableFuture that completes when the shutdown process is finished.
      Returns:
      a CompletableFuture that completes when the shutdown process is finished.