Package org.axonframework.springboot
Class EventProcessorProperties.ProcessorSettings
java.lang.Object
org.axonframework.springboot.EventProcessorProperties.ProcessorSettings
- Enclosing class:
EventProcessorProperties
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionintReturns the maximum size of a processing batch.getDlq()Retrieves the AutoConfiguration settings for the sequenced dead letter queue settings.Returns the number of initial segments that should be created, if no segments are already present.getMode()Returns the type of processor to configure.Returns the name of the bean that defines theSequencingPolicyfor this processor.Returns the name of the bean that should be used as source for Event Messages.intReturns the number of threads to use to process Events, when using aStreamingEventProcessorimplementation.longReturns the interval between attempts to claim tokens by aStreamingEventProcessor.Returns the time unit used to define tokens claim interval.voidsetBatchSize(int batchSize) Sets the maximum size of a processing batch.voidDefines the AutoConfiguration settings for the sequenced dead letter queue.voidsetInitialSegmentCount(Integer initialSegmentCount) Sets the number of initial segments that should be created, if no segments are already present.voidSets the type of processor that should be configured.voidsetSequencingPolicy(String sequencingPolicy) Sets the name of the bean that defines theSequencingPolicyfor this processor.voidSets the name of the bean that should be used as source for Event Messages.voidsetThreadCount(int threadCount) Sets the number of threads to use to process Events, when using aStreamingEventProcessorimplementation.voidsetTokenClaimInterval(long tokenClaimInterval) Sets the time to wait after a failed attempt to claim any token, before making another attempt.voidsetTokenClaimIntervalTimeUnit(TimeUnit tokenClaimIntervalTimeUnit) Sets the time unit used to defined tokens claim interval.
-
Constructor Details
-
ProcessorSettings
public ProcessorSettings()
-
-
Method Details
-
getSource
Returns the name of the bean that should be used as source for Event Messages. If not provided, theEventBusis used as source.- Returns:
- the name of the bean that should be used as source for Event Messages.
-
setSource
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 toEventProcessorProperties.Mode.TRACKING.- Returns:
- the type of processor to configure.
-
setMode
Sets the type of processor that should be configured. Defaults toEventProcessorProperties.Mode.TRACKING.- Parameters:
mode- the type of processor that should be configured.
-
getInitialSegmentCount
Returns the number of initial segments that should be created, if no segments are already present. Defaults to 1 for aTrackingEventProcessorand 16 for aPooledStreamingEventProcessor.If the
threadCountis not further specified, the initial segment count will be used for this too.- Returns:
- the number of initial segments that should be created.
-
setInitialSegmentCount
Sets the number of initial segments that should be created, if no segments are already present. Defaults to 1 for aTrackingEventProcessorand 16 for aPooledStreamingEventProcessor.If the
threadCountis 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 aStreamingEventProcessor. 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 aTrackingEventProcessor.
-
getTokenClaimIntervalTimeUnit
Returns the time unit used to define tokens claim interval. Defaults toTimeUnit.MILLISECONDS.- Returns:
- the time unit used to defined tokens claim interval.
-
setTokenClaimIntervalTimeUnit
Sets the time unit used to defined tokens claim interval. It must be a valid value ofTimeUnit. Defaults toTimeUnit.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 aStreamingEventProcessorimplementation. Defaults to the configured number of initial segments. If this field is not configured, the thread count defaults to 1 for aTrackingEventProcessorand 4 for aPooledStreamingEventProcessor.- 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 aStreamingEventProcessorimplementation. Defaults to the configured number of initial segments. If this field is not configured, the thread count defaults to 1 for aTrackingEventProcessorand 4 for aPooledStreamingEventProcessor.A provided
threadCountinvalid input: '<' 0 will result in a number of threads equal to the configured number ofsetInitialSegmentCount(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
Returns the name of the bean that defines theSequencingPolicyfor this processor.- Returns:
- the name of the bean that defines the
SequencingPolicyfor this processor.
-
setSequencingPolicy
Sets the name of the bean that defines theSequencingPolicyfor this processor. TheSequencingPolicydescribes which Events must be handled sequentially, and which can be handled concurrently. Defaults to aSequentialPerAggregatePolicy.- Parameters:
sequencingPolicy- the name of the bean that defines theSequencingPolicyfor 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
Defines the AutoConfiguration settings for the sequenced dead letter queue.- Parameters:
dlq- the sequenced dead letter queue settings for the sequenced dead letter queue.
-