Skip to content

Commit c2e17f4

Browse files
Use 2 * number of cores for ConsumerWorkService by default
Machines with 8 cores are fairly common today (e.g. MBP 2013+ has 8 hyperthreaded cores). This value is per connection factory, so 16 or even 64 isn't excessive.
1 parent 98245d1 commit c2e17f4

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/com/rabbitmq/client/impl/ConsumerWorkService.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525

2626
final public class ConsumerWorkService {
2727
private static final int MAX_RUNNABLE_BLOCK_SIZE = 16;
28-
private static final int DEFAULT_NUM_THREADS = 5;
28+
private static final int DEFAULT_NUM_THREADS = Runtime.getRuntime().availableProcessors() * 2;
2929
private final ExecutorService executor;
3030
private final boolean privateExecutor;
3131
private final WorkPool<Channel, Runnable> workPool;

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy