yuz10 opened a new issue #2988:
URL: https://github.com/apache/rocketmq/issues/2988
**BUG REPORT**
1. Please describe the issue you observed:
Fail to send trace of last message before shutdown producer
- What did you do (The steps to reproduce)?
send message and enable trace
```java
public static void main(String[] args) throws MQClientException,
InterruptedException, UnsupportedEncodingException, MQBrokerException,
RemotingException {
DefaultMQProducer producer = new
DefaultMQProducer("ProducerGroupName", true);
producer.setNamesrvAddr("localhost:9876");
producer.start();
Message msg = new Message("TopicTest", "TagA", "OrderID188",
"Hello world".getBytes(RemotingHelper.DEFAULT_CHARSET));
SendResult sendResult = producer.send(msg);
System.out.printf("%s%n", sendResult);
producer.shutdown();
}
```
- What did you expect to see?
trace is sent sucessfully
- What did you see instead?
trace sent fail:
Exception in thread
"MQ-AsyncTraceDispatcher-Thread-c2c2798a-6f33-449d-a62e-f3243429c979"
java.util.concurrent.RejectedExecutionException: Task
java.util.concurrent.FutureTask@15bafbba rejected from
java.util.concurrent.ThreadPoolExecutor@1b7d177d[Terminated, pool size = 0,
active threads = 0, queued tasks = 0, completed tasks = 0]
at
java.util.concurrent.ThreadPoolExecutor$AbortPolicy.rejectedExecution(ThreadPoolExecutor.java:2063)
at
java.util.concurrent.ThreadPoolExecutor.reject(ThreadPoolExecutor.java:830)
at
java.util.concurrent.ThreadPoolExecutor.execute(ThreadPoolExecutor.java:1379)
at
java.util.concurrent.AbstractExecutorService.submit(AbstractExecutorService.java:112)
at
org.apache.rocketmq.client.trace.AsyncTraceDispatcher$AsyncRunnable.run(AsyncTraceDispatcher.java:258)
at java.lang.Thread.run(Thread.java:748)
2. Please tell us about your environment:
3. Other information (e.g. detailed explanation, logs, related issues,
suggestions how to fix, etc):
--
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.
For queries about this service, please contact Infrastructure at:
[email protected]