Class EventProcessorProperties.ProcessorSettings

java.lang.Object
org.axonframework.extension.springboot.EventProcessorProperties.ProcessorSettings
All Implemented Interfaces:
EventProcessorSettings, EventProcessorSettings.PooledEventProcessorSettings, EventProcessorSettings.SubscribingEventProcessorSettings
Enclosing class:
EventProcessorProperties

public static class EventProcessorProperties.ProcessorSettings extends Object implements EventProcessorSettings.PooledEventProcessorSettings, EventProcessorSettings.SubscribingEventProcessorSettings
Processor settings.
  • Constructor Details

    • ProcessorSettings

      public ProcessorSettings()
  • Method Details

    • source

      public String source()
      Returns the name of the bean that should be used as source for Event Messages. If not provided, the EventBus is used as source.
      Specified by:
      source in interface EventProcessorSettings
      Returns:
      the name of the bean that should be used as source for Event Messages.
    • setSource

      public void setSource(String source)
      Sets the name of the bean that should be used as source for Event Messages.
      Parameters:
      source - the name of the bean that should be used as source for Event Messages.
    • getMode

      Returns the type of processor to configure. Defaults to EventProcessorProperties.Mode.POOLED.
      Returns:
      the type of processor to configure.
    • processorMode

      @Nonnull public EventProcessorSettings.ProcessorMode processorMode()
      Retrieves the processor mode.
      Specified by:
      processorMode in interface EventProcessorSettings
      Specified by:
      processorMode in interface EventProcessorSettings.PooledEventProcessorSettings
      Specified by:
      processorMode in interface EventProcessorSettings.SubscribingEventProcessorSettings
      Returns:
      pooled-streaming or subscribed mode, falls back to pooled-streaming.
    • setMode

      public void setMode(EventProcessorProperties.Mode mode)
      Sets the type of processor that should be configured. Defaults to EventProcessorProperties.Mode.POOLED.
      Parameters:
      mode - the type of processor that should be configured.
    • initialSegmentCount

      public int initialSegmentCount()
      Returns the number of initial segments that should be created, if no segments are already present. Defaults to 16 for a PooledStreamingEventProcessor.
      Specified by:
      initialSegmentCount in interface EventProcessorSettings.PooledEventProcessorSettings
      Returns:
      the number of initial segments that should be created.
    • setInitialSegmentCount

      public void setInitialSegmentCount(int initialSegmentCount)
      Sets the number of initial segments that should be created, if no segments are already present. Defaults to 16 for a PooledStreamingEventProcessor.
      Parameters:
      initialSegmentCount - the number of initial segments that should be created.
    • getTokenClaimInterval

      public long getTokenClaimInterval()
      Returns the interval between attempts to claim tokens by a StreamingEventProcessor. Defaults to 5000 milliseconds.
      Returns:
      the interval between attempts to claim tokens by a StreamingEventProcessor.
    • setTokenClaimInterval

      public void setTokenClaimInterval(long tokenClaimInterval)
      Sets the time to wait after a failed attempt to claim any token, before making another attempt. Defaults to 5000 milliseconds.
      Parameters:
      tokenClaimInterval - the interval between attempts to claim tokens by a StreamingEventProcessor.
    • getTokenClaimIntervalTimeUnit

      public TimeUnit getTokenClaimIntervalTimeUnit()
      Returns the time unit used to define tokens claim interval. Defaults to TimeUnit.MILLISECONDS.
      Returns:
      the time unit used to defined tokens claim interval.
    • tokenClaimIntervalInMillis

      public long tokenClaimIntervalInMillis()
      Description copied from interface: EventProcessorSettings.PooledEventProcessorSettings
      Retrieves token claim interval.
      Specified by:
      tokenClaimIntervalInMillis in interface EventProcessorSettings.PooledEventProcessorSettings
      Returns:
      interval in milliseconds.
    • setTokenClaimIntervalTimeUnit

      public void setTokenClaimIntervalTimeUnit(TimeUnit tokenClaimIntervalTimeUnit)
      Sets the time unit used to defined tokens claim interval. It must be a valid value of TimeUnit. Defaults to TimeUnit.MILLISECONDS.
      Parameters:
      tokenClaimIntervalTimeUnit - the time unit used to defined tokens claim interval.
    • threadCount

      public int threadCount()
      Returns the number of threads to use to process Events, when using a StreamingEventProcessor implementation. Defaults to the configured number of initial segments. If this field is not configured, the thread count defaults to 4 for a PooledStreamingEventProcessor.
      Specified by:
      threadCount in interface EventProcessorSettings.PooledEventProcessorSettings
      Returns:
      the number of threads to use to process Events.
    • setThreadCount

      public void setThreadCount(int threadCount)
      Sets the number of threads to use to process Events. If this field is not configured, the thread count defaults to 4 for a PooledStreamingEventProcessor.

      Parameters:
      threadCount - the number of threads to use to process Events.
    • batchSize

      public int batchSize()
      Returns the maximum size of a processing batch. This is the number of events that a processor in "tracking" and "pooled" mode will attempt to read and process within a single Unit of Work / Transaction.
      Specified by:
      batchSize in interface EventProcessorSettings.PooledEventProcessorSettings
      Returns:
      the maximum size of a processing batch.
    • setBatchSize

      public void setBatchSize(int batchSize)
      Sets the maximum size of a processing batch. This is the number of events that a processor in "tracking" and "pooled" mode will attempt to read and process within a single Unit of Work / Transaction. Defaults to 1.
      Parameters:
      batchSize - the maximum size of a processing batch.
    • setTokenStore

      public void setTokenStore(@Nonnull String tokenStore)
      Sets the name of the TokenStore bean.
      Parameters:
      tokenStore - A name of the Spring Bean used for this processor.
    • tokenStore

      @Nonnull public String tokenStore()
      Retrieves the name of the TokenStore bean.
      Specified by:
      tokenStore in interface EventProcessorSettings.PooledEventProcessorSettings
      Returns:
      Name of the token store Spring Bean.
    • sequencingPolicy

      public String sequencingPolicy()
      Returns the name of the bean that defines the SequencingPolicy for this processor.
      Returns:
      the name of the bean that defines the SequencingPolicy for this processor.
    • setSequencingPolicy

      public void setSequencingPolicy(String sequencingPolicy)
      Sets the name of the bean that defines the SequencingPolicy for this processor. The SequencingPolicy describes which Events must be handled sequentially, and which can be handled concurrently. Defaults to a SequentialPerAggregatePolicy.
      Parameters:
      sequencingPolicy - the name of the bean that defines the SequencingPolicy for this processor.
    • getDlq

      Retrieves the AutoConfiguration settings for the sequenced dead letter queue settings.
      Returns:
      the AutoConfiguration settings for the sequenced dead letter queue settings.
    • setDlq

      public void setDlq(EventProcessorProperties.Dlq dlq)
      Defines the AutoConfiguration settings for the sequenced dead letter queue.
      Parameters:
      dlq - the sequenced dead letter queue settings for the sequenced dead letter queue.