You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: src/reference/asciidoc/amqp.adoc
+5-3Lines changed: 5 additions & 3 deletions
Original file line number
Diff line number
Diff line change
@@ -3554,10 +3554,12 @@ When a `TaskExecutor` is specifically provided through the `taskExecutor` proper
3554
3554
It is recommended that you use a similar technique to name the threads created by a custom `TaskExecutor` bean definition, to aid with thread identification in log messages.
3555
3555
3556
3556
The `Executor` configured in the `CachingConnectionFactory` is passed into the `RabbitMQ Client` when creating the connection, and its threads are used to deliver new messages to the listener container.
3557
-
If this is not configured, the client uses an internal thread pool executor with a pool size of five.
3557
+
If this is not configured, the client uses an internal thread pool executor with (at the time of writing) a pool size of `Runtime.getRuntime().availableProcessors() * 2` for each connection.
3558
3558
3559
-
IMPORTANT: With the `DirectMessageListenerContainer`, you need to ensure that the connection factory is configured with a task executor that had sufficient threads to support your desired concurrency across all listener containers that use that factory.
3560
-
The default pool size is only five.
3559
+
If you have a large number of factories or are using `CacheMode.CONNECTION`, you may wish to consider using a shared `ThreadPoolTaskExecutor` with enough threads to satisfy your workload.
3560
+
3561
+
IMPORTANT: With the `DirectMessageListenerContainer`, you need to ensure that the connection factory is configured with a task executor that has sufficient threads to support your desired concurrency across all listener containers that use that factory.
3562
+
The default pool size (at the time of writing) is `Runtime.getRuntime().availableProcessors() * 2`.
3561
3563
3562
3564
The `RabbitMQ client` uses a `ThreadFactory` to create threads for low-level I/O (socket) operations.
3563
3565
To modify this factory, you need to configure the underlying RabbitMQ `ConnectionFactory`, as discussed in <<connection-factory>>.
0 commit comments