For the latest stable version, please use Spring for Apache Kafka 3.3.0! |
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 |
|
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. |
|
|
When not null, a |
|
|
Set to |
|
(empty string) |
A prefix for the |
|
false |
Set to |
|
false |
Set to |
|
|
When present and |
|
DEBUG |
The logging level for logs pertaining to committing offsets. |
|
|
A rebalance listener; see Rebalancing Listeners. |
|
3 |
Set the number of retries |
|
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. |
|
|
||
|
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 |
|
5.0 |
Multiplier for |
|
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 |
|
|
When set, enables publication of |
|
|
When set, enables publication of |
|
None |
Used to override any arbitrary consumer properties configured on the consumer factory. |
|
|
See Transactions. |
|
|
A task executor to run the consumer threads.
The default executor creates threads named |
|
|
Set to |
|
|
The message listener. |
|
|
Whether or not to maintain Micrometer timers for the consumer threads. |
|
empty |
A map of static tags to be added to micrometer metrics. |
|
|
A function that provides dynamic tags, based on the consumer record. |
|
|
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 |
|
|
When set, add dynamic tags to the timers and traces, based on information in the consumer records. |
|
|
Set to |
|
|
A provider for |
|
|
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 |
|
100 |
The timeout passed into |
|
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 |
|
|
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. |
|
See desc. |
When using a batch listener, if this is |
|
|
The timeout to use when |
|
|
Whether to use sync or async commits for offsets; see |
|
n/a |
The configured topics, topic pattern or explicitly assigned topics/partitions.
Mutually exclusive; at least one must be provided; enforced by |
|
|
Deprecated since 3.2, see [kafkaAwareTransactionManager], Other transaction managers. |
Property | Default | Description |
---|---|---|
|
An |
|
application context |
The event publisher. |
|
See desc. |
Deprecated - see |
|
|
Set a |
|
bean name |
The bean name of the container; suffixed with |
|
See desc. |
|
|
|
The container properties instance. |
|
See desc. |
The |
|
|
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. |
|
|
Set a |
|
30s |
When the |
Property | Default | Description |
---|---|---|
(read only) |
The partitions currently assigned to this container (explicitly or not). |
|
(read only) |
The partitions currently assigned to this container (explicitly or not). |
|
|
Used by the concurrent container to give each child container’s consumer a unique |
|
n/a |
True if pause has been requested and the consumer has actually paused. |
Property | Default | Description |
---|---|---|
|
Set to false to suppress adding a suffix to the |
|
(read only) |
The aggregate of partitions currently assigned to this container’s child |
|
(read only) |
The partitions currently assigned to this container’s child |
|
1 |
The number of child |
|
n/a |
True if pause has been requested and all child containers' consumer has actually paused. |
|
n/a |
A reference to all child |