Listener Container Properties
Property | Default | Description |
---|---|---|
1 |
The number of records before committing pending offsets when the |
|
|
A chain of |
|
BATCH |
Controls how often offsets are committed - see Committing Offsets. |
|
5000 |
The time in milliseconds after which pending offsets are committed when the |
|
[id="assignmentCommitOption"]<<`assignmentCommitOption`,assignmentCommitOption>> |
LATEST_ONLY _NO_TX |
Whether or not to commit the initial position on assignment; by default, the initial offset will only be committed if the |
|
Enable out-of-order commits (see Manually Committing Offsets); the consumer is paused and commits are deferred until gaps are filled. |
|
[id="authExceptionRetryInterval"]<<`authExceptionRetryInterval`,authExceptionRetryInterval>> |
|
When not null, a |
[id="batchRecoverAfterRollback"]<<`batchRecoverAfterRollback`,batchRecoverAfterRollback>> |
|
Set to |
(empty string) |
A prefix for the |
|
[id="checkDeserExWhenKeyNull"]<<`checkDeserExWhenKeyNull`,checkDeserExWhenKeyNull>> |
false |
Set to |
[id="checkDeserExWhenValueNull"]<<`checkDeserExWhenValueNull`,checkDeserExWhenValueNull>> |
false |
Set to |
|
When present and |
|
DEBUG |
The logging level for logs pertaining to committing offsets. |
|
[id="consumerRebalanceListener"]<<`consumerRebalanceListener`,consumerRebalanceListener>> |
|
A rebalance listener; see Rebalancing Listeners. |
3 |
Set the number of retries |
|
[id="consumerStartTimeout"]<<`consumerStartTimeout`,consumerStartTimeout>> |
30s |
The time to wait for the consumer to start before logging an error; this might happen if, say, you use a task executor with insufficient threads. |
[id="deliveryAttemptHeader"]<<`deliveryAttemptHeader`,deliveryAttemptHeader>> |
|
|
|
Exactly Once Semantics mode; see Exactly Once Semantics. |
|
|
When consuming records produced by a transactional producer, and the consumer is positioned at the end of a partition, the lag can incorrectly be reported as greater than zero, due to the pseudo record used to indicate transaction commit/rollback and, possibly, the presence of rolled-back records.
This does not functionally affect the consumer but some users have expressed concern that the "lag" is non-zero.
Set this property to |
|
|
Overrides the consumer |
|
[id="idleBeforeDataMultiplier"]<<`idleBeforeDataMultiplier`,idleBeforeDataMultiplier>> |
5.0 |
Multiplier for |
[id="idleBetweenPolls"]<<`idleBetweenPolls`,idleBetweenPolls>> |
0 |
Used to slow down deliveries by sleeping the thread between polls.
The time to process a batch of records plus this value must be less than the |
[id="idleEventInterval"]<<`idleEventInterval`,idleEventInterval>> |
|
When set, enables publication of |
[id="idlePartitionEventInterval"]<<`idlePartitionEventInterval`,idlePartitionEventInterval>> |
|
When set, enables publication of `ListenerContainerIdlePartitionEvent`s, see Application Events and Detecting Idle and Non-Responsive Consumers. |
[id="kafkaConsumerProperties"]<<`kafkaConsumerProperties`,kafkaConsumerProperties>> |
None |
Used to override any arbitrary consumer properties configured on the consumer factory. |
[id="kafkaAwareTransactionManager"]<<`kafkaAwareTransactionManager`,kafkaAwareTransactionManager>> |
|
See Transactions. |
[id="listenerTaskExecutor"]<<`listenerTaskExecutor`,listenerTaskExecutor>> |
|
A task executor to run the consumer threads.
The default executor creates threads named |
[id="logContainerConfig"]<<`logContainerConfig`,logContainerConfig>> |
|
Set to |
|
The message listener. |
|
[id="micrometerEnabled"]<<`micrometerEnabled`,micrometerEnabled>> |
|
Whether or not to maintain Micrometer timers for the consumer threads. |
empty |
A map of static tags to be added to micrometer metrics. |
|
[id="micrometerTagsProvider"]<<`micrometerTagsProvider`,micrometerTagsProvider>> |
|
A function that provides dynamic tags, based on the consumer record. |
[id="missingTopicsFatal"]<<`missingTopicsFatal`,missingTopicsFatal>> |
|
When true prevents the container from starting if the configured topic(s) are not present on the broker. |
30s |
How often to check the state of the consumer threads for |
|
3.0 |
Multiplied by |
|
[id="observationConvention"]<<`observationConvention`,observationConvention>> |
|
When set, add dynamic tags to the timers and traces, based on information in the consumer records. |
[id="observationEnabled"]<<`observationEnabled`,observationEnabled>> |
|
Set to |
[id="offsetAndMetadataProvider"]<<`offsetAndMetadataProvider`,offsetAndMetadataProvider>> |
|
A provider for |
[id="onlyLogRecordMetadata"]<<`onlyLogRecordMetadata`,onlyLogRecordMetadata>> |
|
Set to |
|
When the container is paused, stop processing after the current record instead of after processing all the records from the previous poll; the remaining records are retained in memory and will be passed to the listener when the container is resumed. |
|
5000 |
The timeout passed into |
|
[id="pollTimeoutWhilePaused"]<<`pollTimeoutWhilePaused`,pollTimeoutWhilePaused>> |
100 |
The timeout passed into |
[id="restartAfterAuthExceptions"]<<`restartAfterAuthExceptions`,restartAfterAuthExceptions>> |
false |
True to restart the container if it is stopped due to authorization/authentication exceptions. |
|
A scheduler on which to run the consumer monitor task. |
|
10000 |
The maximum time in ms to block the |
|
[id="stopContainerWhenFenced"]<<`stopContainerWhenFenced`,stopContainerWhenFenced>> |
|
Stop the listener container if a |
|
When the container is stopped, stop processing after the current record instead of after processing all the records from the previous poll. |
|
[id="subBatchPerPartition"]<<`subBatchPerPartition`,subBatchPerPartition>> |
See desc. |
When using a batch listener, if this is |
[id="syncCommitTimeout"]<<`syncCommitTimeout`,syncCommitTimeout>> |
|
The timeout to use when |
|
Whether to use sync or async commits for offsets; see |
|
[id="topics"]<<`topics` |
n/a |
The configured topics, topic pattern or explicitly assigned topics/partitions.
Mutually exclusive; at least one must be provided; enforced by |
[id="transactionManager"]<<`transactionManager`,transactionManager>> |
|
Deprecated since 3.2, see [kafkaAwareTransactionManager], Other transaction managers. |
Property | Default | Description |
---|---|---|
[id="afterRollbackProcessor"]<<`afterRollbackProcessor`,afterRollbackProcessor>> |
|
An |
[id="applicationEventPublisher"]<<`applicationEventPublisher`,applicationEventPublisher>> |
application context |
The event publisher. |
[id="batchErrorHandler"]<<`batchErrorHandler`,batchErrorHandler>> |
See desc. |
Deprecated - see |
[id="batchInterceptor"]<<`batchInterceptor`,batchInterceptor>> |
|
Set a |
bean name |
The bean name of the container; suffixed with |
|
[id="commonErrorHandler"]<<`commonErrorHandler`,commonErrorHandler>> |
See desc. |
|
[id="containerProperties"]<<`containerProperties`,containerProperties>> |
|
The container properties instance. |
See desc. |
The |
|
[id="interceptBeforeTx"]<<`interceptBeforeTx`,interceptBeforeTx>> |
|
Determines whether the |
See desc. |
The bean name for user-configured containers or the |
|
null |
A value to populate in the |
|
(read only) |
True if a consumer pause has been requested. |
|
[id="recordInterceptor"]<<`recordInterceptor`,recordInterceptor>> |
|
Set a |
[id="topicCheckTimeout"]<<`topicCheckTimeout`,topicCheckTimeout>> |
30s |
When the |