Skip to content

Commit

Permalink
Supplement container-props.adoc ContainerProperties properties
Browse files Browse the repository at this point in the history
  • Loading branch information
Wzy19930507 committed Feb 18, 2024
1 parent 22764cb commit fe30984
Show file tree
Hide file tree
Showing 2 changed files with 32 additions and 15 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -425,7 +425,7 @@ To replace any `BatchErrorHandler` implementation, you should implement `handleB
You should also implement `handleOtherException()` - to handle exceptions that occur outside the scope of record processing (e.g. consumer errors).

[[after-rollback]]
== After-rollback Processor
== After Rollback Processor

When using transactions, if the listener throws an exception (and an error handler, if present, throws an exception), the transaction is rolled back.
By default, any unprocessed records (including the failed record) are re-fetched on the next poll.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,14 +30,18 @@
See the JavaDocs for `ContainerProperties.AssignmentCommitOption` for more information about the available options.

|[[asyncAcks]]<<asyncAcks,`asyncAcks`>>
|false
|`false`
|Enable out-of-order commits (see xref:kafka/receiving-messages/ooo-commits.adoc[Manually Committing Offsets]); the consumer is paused and commits are deferred until gaps are filled.

|[[authExceptionRetryInterval]]<<authExceptionRetryInterval,`authExceptionRetryInterval`>>
|`null`
|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.

|[[batchRecoverAfterRollback]]<<batchRecoverAfterRollback,`batchRecoverAfterRollback`>>
|`false`
|Set to `true` to enable batch recovery, See xref:kafka/annotation-error-handling.adoc#after-rollback[After Rollback Processor].

|[[clientId]]<<clientId,`clientId`>>
|(empty string)
|A prefix for the `client.id` consumer property.
Expand All @@ -57,10 +61,6 @@ Useful when the consumer code cannot determine that an `ErrorHandlingDeserialize
|`null`
|When present and `syncCommits` is `false` a callback invoked after the commit completes.

|[[offsetAndMetadataProvider]]<<offsetAndMetadataProvider,`offsetAndMetadataProvider`>>
|`null`
|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.

|[[commitLogLevel]]<<commitLogLevel,`commitLogLevel`>>
|DEBUG
|The logging level for logs pertaining to committing offsets.
Expand All @@ -69,15 +69,15 @@ Useful when the consumer code cannot determine that an `ErrorHandlingDeserialize
|`null`
|A rebalance listener; see xref:kafka/receiving-messages/rebalance-listeners.adoc[Rebalancing Listeners].

|[[consumerStartTimout]]<<consumerStartTimout,`consumerStartTimout`>>
|[[commitRetries]]<<commitRetries,`commitRetries`>>
|3
|Set the number of retries `RetriableCommitFailedException` when using `syncCommits` set to true.
Default 3 (4-attempt total).

|[[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.

|[[consumerTaskExecutor]]<<consumerTaskExecutor,`consumerTaskExecutor`>>
|`SimpleAsyncTaskExecutor`
|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 `-n` where n is incremented for each child container.

|[[deliveryAttemptHeader]]<<deliveryAttemptHeader,`deliveryAttemptHeader`>>
|`false`
|See xref:kafka/annotation-error-handling.adoc#delivery-header[Delivery Attempts Header].
Expand Down Expand Up @@ -123,9 +123,14 @@ Also see `idleBeforeDataMultiplier`.
|None
|Used to override any arbitrary consumer properties configured on the consumer factory.

|[[listenerTaskExecutor]]<<listenerTaskExecutor,`listenerTaskExecutor`>>
|`SimpleAsyncTaskExecutor`
|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 `-n` where n is incremented for each child container.

|[[logContainerConfig]]<<logContainerConfig,`logContainerConfig`>>
|`false`
|Set to true to log at INFO level all container properties.
|Set to `true` to log at INFO level all container properties.

|[[messageListener]]<<messageListener,`messageListener`>>
|`null`
Expand All @@ -145,7 +150,7 @@ Also see `idleBeforeDataMultiplier`.

|[[missingTopicsFatal]]<<missingTopicsFatal,`missingTopicsFatal`>>
|`false`
|When true prevents the container from starting if the confifgured topic(s) are not present on the broker.
|When true prevents the container from starting if the configured topic(s) are not present on the broker.

|[[monitorInterval]]<<monitorInterval,`monitorInterval`>>
|30s
Expand All @@ -157,9 +162,21 @@ See `noPollThreshold` and `pollTimeout`.
|Multiplied by `pollTimeOut` to determine whether to publish a `NonResponsiveConsumerEvent`.
See `monitorInterval`.

|[[observationConvention]]<<observationConvention,`observationConvention`>>
|`null`
|When set, add dynamic tags to the timers and traces, based on information in the consumer records.

|[[observationEnabled]]<<observationEnabled,`observationEnabled`>>
|`false`
|Set to `true` to enable observation via Micrometer.

|[[offsetAndMetadataProvider]]<<offsetAndMetadataProvider,`offsetAndMetadataProvider`>>
|`null`
|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.

|[[onlyLogRecordMetadata]]<<onlyLogRecordMetadata,`onlyLogRecordMetadata`>>
|`false`
|Set to false to log the complete consumer record (in error, debug logs etc) instead of just `topic-partition@offset`.
|Set to `false` to log the complete consumer record (in error, debug logs etc.) instead of just `topic-partition@offset`.

|[[pauseImmediate]]<<pauseImmediate,`pauseImmediate`>>
|`false`
Expand Down

0 comments on commit fe30984

Please sign in to comment.