liuzongliang0202 opened a new issue, #4587:
URL: https://github.com/apache/rocketmq/issues/4587

   In BrokerController#initialize(), it will create many business thread pools. 
can we add "bottom-up" scheme to catch exceptions for business thread pools?
   
   for example, class 'org.apache.rocketmq.common.ThreadFactoryImpl'
   
   
       @Override
       public Thread newThread(Runnable r) {
           Thread thread = new Thread(r, threadNamePrefix + 
this.threadIndex.incrementAndGet());
           thread.setDaemon(daemon);
           thread.setUncaughtExceptionHandler(new 
Thread.UncaughtExceptionHandler() {
               @Override
               public void uncaughtException(Thread t, Throwable e) {
                   log.error("Uncaught exception in thread '" + t.getName() + 
"':", e);
               }
           });
           return thread;
       }


-- 
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