Class WorkflowProperties

java.lang.Object
io.axoniq.framework.springboot.WorkflowProperties

@ConfigurationProperties(prefix="axon.workflow") public class WorkflowProperties extends Object
The workflow properties exposed to Spring Boot applications under the axon.workflow prefix.

Every property mirrors a setting Axon's own EventProcessorProperties.ProcessorSettings exposes per named processor, without the per-processor-name split: these top-level properties apply to every workflow module's engine processor uniformly. Each defaults to the exact same value ProcessorSettings itself defaults to, so an application that sets none of them gets identical behavior to a plain PooledStreamingEventProcessor.

The history projector runs in its own, separate event processor - see getHistory() for the equivalent properties that apply to that processor instead.

Since:
5.4.0
Author:
Stefan Dragisic, Steven van Beelen
  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Class
    Description
    static class 
    The properties of the history projector's own, dedicated event processor.
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    int
    Returns the maximum number of events read from the event store per source poll.
    long
    Returns the duration, in milliseconds, after which the workflow event processor extends a segment claim.
    boolean
    Returns whether the workflow event processor's coordinator also extends segment claims.
    The properties of the history projector's own, dedicated event processor, under the axoniq.workflow.history prefix.
    int
    Returns the number of segments to initialize the workflow event processor with.
    int
    Returns the number of threads the workflow event processor uses to process events concurrently.
    long
    Returns the interval, in milliseconds, at which the workflow event processor's coordinator attempts to claim unclaimed segments.
    void
    setBatchSize(int batchSize)
    Sets the maximum number of events read from the event store per source poll.
    void
    setClaimExtensionThreshold(long claimExtensionThreshold)
    Sets the duration, in milliseconds, after which the workflow event processor extends a segment claim.
    void
    setCoordinatorClaimExtension(boolean coordinatorClaimExtension)
    Sets whether the workflow event processor's coordinator also extends segment claims.
    void
    setInitialSegmentCount(int initialSegmentCount)
    Sets the number of segments to initialize the workflow event processor with.
    void
    setThreadCount(int threadCount)
    Sets the number of threads the workflow event processor uses to process events concurrently.
    void
    setTokenClaimInterval(long tokenClaimInterval)
    Sets the interval, in milliseconds, at which the workflow event processor's coordinator attempts to claim unclaimed segments.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • WorkflowProperties

      public WorkflowProperties()
  • Method Details

    • getInitialSegmentCount

      public int getInitialSegmentCount()
      Returns the number of segments to initialize the workflow event processor with.
      Returns:
      the number of segments to initialize the workflow event processor with
    • setInitialSegmentCount

      public void setInitialSegmentCount(int initialSegmentCount)
      Sets the number of segments to initialize the workflow event processor with.
      Parameters:
      initialSegmentCount - the number of segments to initialize the workflow event processor with
    • getBatchSize

      public int getBatchSize()
      Returns the maximum number of events read from the event store per source poll.
      Returns:
      the maximum number of events read from the event store per source poll
    • setBatchSize

      public void setBatchSize(int batchSize)
      Sets the maximum number of events read from the event store per source poll.
      Parameters:
      batchSize - the maximum number of events read from the event store per source poll
    • getThreadCount

      public int getThreadCount()
      Returns the number of threads the workflow event processor uses to process events concurrently.
      Returns:
      the number of threads the workflow event processor uses to process events concurrently
    • setThreadCount

      public void setThreadCount(int threadCount)
      Sets the number of threads the workflow event processor uses to process events concurrently.
      Parameters:
      threadCount - the number of threads the workflow event processor uses to process events concurrently
    • getTokenClaimInterval

      public long getTokenClaimInterval()
      Returns the interval, in milliseconds, at which the workflow event processor's coordinator attempts to claim unclaimed segments.
      Returns:
      the segment-claim interval, in milliseconds
    • setTokenClaimInterval

      public void setTokenClaimInterval(long tokenClaimInterval)
      Sets the interval, in milliseconds, at which the workflow event processor's coordinator attempts to claim unclaimed segments.
      Parameters:
      tokenClaimInterval - the segment-claim interval, in milliseconds
    • getClaimExtensionThreshold

      public long getClaimExtensionThreshold()
      Returns the duration, in milliseconds, after which the workflow event processor extends a segment claim.
      Returns:
      the claim extension threshold, in milliseconds
    • setClaimExtensionThreshold

      public void setClaimExtensionThreshold(long claimExtensionThreshold)
      Sets the duration, in milliseconds, after which the workflow event processor extends a segment claim.
      Parameters:
      claimExtensionThreshold - the claim extension threshold, in milliseconds
    • getCoordinatorClaimExtension

      public boolean getCoordinatorClaimExtension()
      Returns whether the workflow event processor's coordinator also extends segment claims.
      Returns:
      whether the workflow event processor's coordinator also extends segment claims
    • setCoordinatorClaimExtension

      public void setCoordinatorClaimExtension(boolean coordinatorClaimExtension)
      Sets whether the workflow event processor's coordinator also extends segment claims.
      Parameters:
      coordinatorClaimExtension - whether the workflow event processor's coordinator also extends segment claims
    • getHistory

      The properties of the history projector's own, dedicated event processor, under the axoniq.workflow.history prefix.

      The history projector runs in a separate event processor from the workflow engine's own, so it can be given a different (e.g. durable) token store and tuned independently - for example to make history projections durable without also changing how the engine's own processor behaves.

      Returns:
      the history projector's own processor properties