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
  • 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
    • getCheckpointInterval

      public long getCheckpointInterval()
      Returns the minimum time, in milliseconds, between two checkpoint requests of one segment of the workflow event processor.

      Defaults to 0, which requests a checkpoint after every event.

      Returns:
      the checkpoint interval, in milliseconds, where 0 requests a checkpoint after every event
    • setCheckpointInterval

      public void setCheckpointInterval(long checkpointInterval)
      Sets the minimum time, in milliseconds, between two checkpoint requests of one segment of the workflow event processor.

      Defaults to 0, which requests a checkpoint after every event.

      Parameters:
      checkpointInterval - the checkpoint interval, in milliseconds, where 0 requests a checkpoint after every event
    • 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
    • getSnapshots

      The snapshot properties of the workflow engine, under the axon.workflow.snapshots prefix.
      Returns:
      the snapshot properties of the workflow engine