Class EventProcessorProperties.ProcessorSettings

java.lang.Object
org.axonframework.springboot.EventProcessorProperties.ProcessorSettings
Enclosing class:
EventProcessorProperties

public static class EventProcessorProperties.ProcessorSettings extends Object
  • Constructor Details

    • ProcessorSettings

      public ProcessorSettings()
  • Method Details

    • getSource

      public String getSource()
      Returns the name of the bean that should be used as source for Event Messages. If not provided, the EventBus is used as source.
      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.TRACKING.
      Returns:
      the type of processor to configure.
    • setMode

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

      public Integer getInitialSegmentCount()
      Returns the number of initial segments that should be created, if no segments are already present. Defaults to 1 for a TrackingEventProcessor and 16 for a PooledStreamingEventProcessor.

      If the threadCount is not further specified, the initial segment count will be used for this too.

      Returns:
      the number of initial segments that should be created.
    • setInitialSegmentCount

      public void setInitialSegmentCount(Integer initialSegmentCount)
      Sets the number of initial segments that should be created, if no segments are already present. Defaults to 1 for a TrackingEventProcessor and 16 for a PooledStreamingEventProcessor.

      If the threadCount is not further specified, the initial segment count will be used for this too.

      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 TrackingEventProcessor.
    • 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.
    • 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.
    • getThreadCount

      public int getThreadCount()
      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 1 for a TrackingEventProcessor and 4 for a PooledStreamingEventProcessor.
      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, when using a StreamingEventProcessor implementation. Defaults to the configured number of initial segments. If this field is not configured, the thread count defaults to 1 for a TrackingEventProcessor and 4 for a PooledStreamingEventProcessor.

      A provided threadCount invalid input: '<' 0 will result in a number of threads equal to the configured number of setInitialSegmentCount(Integer) initial segments.

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

      public int getBatchSize()
      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.
      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.
    • getSequencingPolicy

      public String getSequencingPolicy()
      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.