RockteMQ-AI commented on issue #762:
URL: 
https://github.com/apache/rocketmq-spring/issues/762#issuecomment-5364755786

   **Issue Evaluation**
   
   Category: `bug` | Status: **Confirmed**
   
   This is a valid resource management issue. Each `RocketMQMessageListener` 
creates a `ClientImpl` instance that initializes thread pools sized at `2 * CPU 
cores`. With N listeners on a machine with C cores, this creates `2 * C * N` 
threads — excessive and wasteful.
   
   **Root Cause:** The v5 client Spring Boot starter creates a separate 
`ClientImpl` per listener instead of sharing a common client instance across 
listeners.
   
   **Impact:** On a 12-core machine with 30 listeners: 720 threads just for 
client initialization. This wastes memory and creates unnecessary 
context-switching overhead.
   
   **Severity:** medium
   
   **Suggested fix:** Share a single `ClientImpl` instance across all listeners 
in the same application context, or use a connection pool pattern.
   
   ---
   *Automated evaluation by RockteMQ-AI*
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to