ackCount spring-doc.cn
|
1spring-doc.cn |
The number of records before committing pending offsets when the ackMode is COUNT or COUNT_TIME .spring-doc.cn |
adviceChain spring-doc.cn
|
null spring-doc.cn
|
A chain of Advice objects (e.g. MethodInterceptor around advice) wrapping the message listener, invoked in order.spring-doc.cn |
ackMode spring-doc.cn
|
BATCHspring-doc.cn |
Controls how often offsets are committed - see Committing Offsets.spring-doc.cn |
ackTime spring-doc.cn
|
5000spring-doc.cn |
The time in milliseconds after which pending offsets are committed when the ackMode is TIME or COUNT_TIME .spring-doc.cn |
assignmentCommitOption spring-doc.cn
|
LATEST_ONLY _NO_TXspring-doc.cn |
Whether or not to commit the initial position on assignment; by default, the initial offset will only be committed if the ConsumerConfig.AUTO_OFFSET_RESET_CONFIG is latest and it won’t run in a transaction even if there is a transaction manager present.
See the JavaDocs for ContainerProperties.AssignmentCommitOption for more information about the available options.spring-doc.cn |
asyncAcks spring-doc.cn
|
false spring-doc.cn
|
Enable out-of-order commits (see Manually Committing Offsets); the consumer is paused and commits are deferred until gaps are filled.spring-doc.cn |
authExceptionRetryInterval spring-doc.cn
|
null spring-doc.cn
|
When not null, a Duration to sleep between polls when an AuthenticationException or AuthorizationException is thrown by the Kafka client.
When null, such exceptions are considered fatal and the container will stop.spring-doc.cn |
batchRecoverAfterRollback spring-doc.cn
|
false spring-doc.cn
|
Set to true to enable batch recovery, See After Rollback Processor.spring-doc.cn |
clientId spring-doc.cn
|
(empty string)spring-doc.cn |
A prefix for the client.id consumer property.
Overrides the consumer factory client.id property; in a concurrent container, -n is added as a suffix for each consumer instance.spring-doc.cn |
checkDeserExWhenKeyNull spring-doc.cn
|
falsespring-doc.cn |
Set to true to always check for a DeserializationException header when a null key is received.
Useful when the consumer code cannot determine that an ErrorHandlingDeserializer has been configured, such as when using a delegating deserializer.spring-doc.cn |
checkDeserExWhenValueNull spring-doc.cn
|
falsespring-doc.cn |
Set to true to always check for a DeserializationException header when a null value is received.
Useful when the consumer code cannot determine that an ErrorHandlingDeserializer has been configured, such as when using a delegating deserializer.spring-doc.cn |
commitCallback spring-doc.cn
|
null spring-doc.cn
|
When present and syncCommits is false a callback invoked after the commit completes.spring-doc.cn |
commitLogLevel spring-doc.cn
|
DEBUGspring-doc.cn |
The logging level for logs pertaining to committing offsets.spring-doc.cn |
consumerRebalanceListener spring-doc.cn
|
null spring-doc.cn
|
A rebalance listener; see Rebalancing Listeners.spring-doc.cn |
commitRetries spring-doc.cn
|
3spring-doc.cn |
Set the number of retries RetriableCommitFailedException when using syncCommits set to true.
Default 3 (4-attempt total).spring-doc.cn |
consumerStartTimeout spring-doc.cn
|
30sspring-doc.cn |
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.spring-doc.cn |
deliveryAttemptHeader spring-doc.cn
|
false spring-doc.cn
|
See Delivery Attempts Header.spring-doc.cn |
eosMode spring-doc.cn
|
V2 spring-doc.cn
|
Exactly Once Semantics mode; see Exactly Once Semantics.spring-doc.cn |
fixTxOffsets spring-doc.cn
|
false spring-doc.cn
|
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 true and the container will correct such mis-reported offsets.
The check is performed before the next poll to avoid adding significant complexity to the commit processing.
At the time of writing, the lag will only be corrected if the consumer is configured with isolation.level=read_committed and max.poll.records is greater than 1.
See KAFKA-10683 for more information.spring-doc.cn |
groupId spring-doc.cn
|
null spring-doc.cn
|
Overrides the consumer group.id property; automatically set by the @KafkaListener id or groupId property.spring-doc.cn |
idleBeforeDataMultiplier spring-doc.cn
|
5.0spring-doc.cn |
Multiplier for idleEventInterval that is applied before any records are received.
After a record is received, the multiplier is no longer applied.
Available since version 2.8.spring-doc.cn |
idleBetweenPolls spring-doc.cn
|
0spring-doc.cn |
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 max.poll.interval.ms consumer property.spring-doc.cn |
idleEventInterval spring-doc.cn
|
null spring-doc.cn
|
When set, enables publication of ListenerContainerIdleEvent s, see Application Events and Detecting Idle and Non-Responsive Consumers.
Also see idleBeforeDataMultiplier .spring-doc.cn |
idlePartitionEventInterval spring-doc.cn
|
null spring-doc.cn
|
When set, enables publication of ListenerContainerIdlePartitionEvent s, see Application Events and Detecting Idle and Non-Responsive Consumers.spring-doc.cn |
kafkaConsumerProperties spring-doc.cn
|
Nonespring-doc.cn |
Used to override any arbitrary consumer properties configured on the consumer factory.spring-doc.cn |
kafkaAwareTransactionManager spring-doc.cn
|
null spring-doc.cn
|
See Transactions.spring-doc.cn |
listenerTaskExecutor spring-doc.cn
|
SimpleAsyncTaskExecutor spring-doc.cn
|
A task executor to run the consumer threads.
The default executor creates threads named <name>-C-n ; with the KafkaMessageListenerContainer , the name is the bean name; with the ConcurrentMessageListenerContainer the name is the bean name suffixed with -m where m is incremented for each child container. See Container Thread Naming.spring-doc.cn |
logContainerConfig spring-doc.cn
|
false spring-doc.cn
|
Set to true to log at INFO level all container properties.spring-doc.cn |
messageListener spring-doc.cn
|
null spring-doc.cn
|
The message listener.spring-doc.cn |
micrometerEnabled spring-doc.cn
|
true spring-doc.cn
|
Whether or not to maintain Micrometer timers for the consumer threads.spring-doc.cn |
micrometerTags spring-doc.cn
|
emptyspring-doc.cn |
A map of static tags to be added to micrometer metrics.spring-doc.cn |
micrometerTagsProvider spring-doc.cn
|
null spring-doc.cn
|
A function that provides dynamic tags, based on the consumer record.spring-doc.cn |
missingTopicsFatal spring-doc.cn
|
false spring-doc.cn
|
When true prevents the container from starting if the configured topic(s) are not present on the broker.spring-doc.cn |
monitorInterval spring-doc.cn
|
30sspring-doc.cn |
How often to check the state of the consumer threads for NonResponsiveConsumerEvent s.
See noPollThreshold and pollTimeout .spring-doc.cn |
noPollThreshold spring-doc.cn
|
3.0spring-doc.cn |
Multiplied by pollTimeOut to determine whether to publish a NonResponsiveConsumerEvent .
See monitorInterval .spring-doc.cn |
observationConvention spring-doc.cn
|
null spring-doc.cn
|
When set, add dynamic tags to the timers and traces, based on information in the consumer records.spring-doc.cn |
observationEnabled spring-doc.cn
|
false spring-doc.cn
|
Set to true to enable observation via Micrometer.spring-doc.cn |
offsetAndMetadataProvider spring-doc.cn
|
null spring-doc.cn
|
A provider for OffsetAndMetadata ; by default, the provider creates an offset and metadata with empty metadata. The provider gives a way to customize the metadata.spring-doc.cn |
onlyLogRecordMetadata spring-doc.cn
|
false spring-doc.cn
|
Set to false to log the complete consumer record (in error, debug logs etc.) instead of just topic-partition@offset .spring-doc.cn |
pauseImmediate spring-doc.cn
|
false spring-doc.cn
|
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.spring-doc.cn |
pollTimeout spring-doc.cn
|
5000spring-doc.cn |
The timeout passed into Consumer.poll() in milliseconds.spring-doc.cn |
pollTimeoutWhilePaused spring-doc.cn
|
100spring-doc.cn |
The timeout passed into Consumer.poll() (in milliseconds) when the container is in a paused state.spring-doc.cn |
restartAfterAuthExceptions spring-doc.cn
|
falsespring-doc.cn |
True to restart the container if it is stopped due to authorization/authentication exceptions.spring-doc.cn |
scheduler spring-doc.cn
|
ThreadPoolTaskScheduler spring-doc.cn
|
A scheduler on which to run the consumer monitor task.spring-doc.cn |
shutdownTimeout spring-doc.cn
|
10000spring-doc.cn |
The maximum time in ms to block the stop() method until all consumers stop and before publishing the container stopped event.spring-doc.cn |
stopContainerWhenFenced spring-doc.cn
|
false spring-doc.cn
|
Stop the listener container if a ProducerFencedException is thrown.
See After-rollback Processor for more information.spring-doc.cn |
stopImmediate spring-doc.cn
|
false spring-doc.cn
|
When the container is stopped, stop processing after the current record instead of after processing all the records from the previous poll.spring-doc.cn |
subBatchPerPartition spring-doc.cn
|
See desc.spring-doc.cn |
When using a batch listener, if this is true , the listener is called with the results of the poll split into sub batches, one per partition.
Default false .spring-doc.cn |
syncCommitTimeout spring-doc.cn
|
null spring-doc.cn
|
The timeout to use when syncCommits is true .
When not set, the container will attempt to determine the default.api.timeout.ms consumer property and use that; otherwise it will use 60 seconds.spring-doc.cn |
syncCommits spring-doc.cn
|
true spring-doc.cn
|
Whether to use sync or async commits for offsets; see commitCallback .spring-doc.cn |
topics topicPattern topicPartitions spring-doc.cn
|
n/aspring-doc.cn |
The configured topics, topic pattern or explicitly assigned topics/partitions.
Mutually exclusive; at least one must be provided; enforced by ContainerProperties constructors.spring-doc.cn |
transactionManager spring-doc.cn
|
null spring-doc.cn
|
Deprecated since 3.2, see [kafkaAwareTransactionManager], Other transaction managers.spring-doc.cn |