Skip to content

Commit c10d824

Browse files
committed
Fix Consumer Thread Naming Documentation
The second task executor was removed in 1.3.x, but the documentation was not updated.
1 parent 9c8bbef commit c10d824

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

spring-kafka-docs/src/main/asciidoc/kafka.adoc

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1800,13 +1800,13 @@ Use the `KafkaUtils` mechanism in that case.
18001800

18011801
===== Container Thread Naming
18021802

1803-
Listener containers currently use two task executors, one to invoke the consumer and another that is used to invoke the listener when the kafka consumer property `enable.auto.commit` is `false`.
1804-
You can provide custom executors by setting the `consumerExecutor` and `listenerExecutor` properties of the container's `ContainerProperties`.
1803+
A `TaskExecutor` is used to invoke the consumer and the listener.
1804+
You can provide a custom executor by setting the `consumerExecutor` property of the container's `ContainerProperties`.
18051805
When using pooled executors, be sure that enough threads are available to handle the concurrency across all the containers in which they are used.
1806-
When using the `ConcurrentMessageListenerContainer`, a thread from each is used for each consumer (`concurrency`).
1806+
When using the `ConcurrentMessageListenerContainer`, a thread from the executor is used for each consumer (`concurrency`).
18071807

1808-
If you do not provide a consumer executor, a `SimpleAsyncTaskExecutor` is used.
1809-
This executor creates threads with names similar to `<beanName>-C-1` (consumer thread).
1808+
If you do not provide a consumer executor, a `SimpleAsyncTaskExecutor` is used for each container.
1809+
This executor creates threads with names similar to `<beanName>-C-<n>`.
18101810
For the `ConcurrentMessageListenerContainer`, the `<beanName>` part of the thread name becomes `<beanName>-m`, where `m` represents the consumer instance.
18111811
`n` increments each time the container is started.
18121812
So, with a bean name of `container`, threads in this container will be named `container-0-C-1`, `container-1-C-1` etc., after the container is started the first time; `container-0-C-2`, `container-1-C-2` etc., after a stop and subsequent start.

0 commit comments

Comments
 (0)