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

   **Issue Evaluation**
   
   Category: `bug` / `enhancement` | Status: **Confirmed**
   
   **Analysis:** Each `RocketMQMessageListener` creates a `ClientImpl` that 
initializes a thread pool with `2 * CPU_cores` threads. With 30 listeners on a 
12-core CPU, this creates ~720 threads, which is excessive and can lead to:
   - High memory consumption
   - Context switching overhead
   - Potential thread exhaustion under load
   
   **Suggested fix:**
   - Share a common `ClientManager` or thread pool across multiple listeners
   - Make the thread pool size configurable per listener or globally
   - Consider lazy initialization of thread pools
   
   **Workaround:** Reduce the number of listeners or use a shared client 
instance.
   
   ---
   *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