Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
I found a bug, not just asking a question, which should be created in GitHub Discussions.
I have searched the GitHub Issues and GitHub Discussions of this repository and believe that this is not a duplicate.
I have confirmed that this bug belongs to the current repository, not other repositories of RocketMQ.
linux
5.1.4
1.8
使用rocketmq 5.1.4。
相同的问题链接:#2988 解决上面问题的fix:#2989
虽然上面给出了解决,但方案并不完善。
DefaultMQProducer.shutdown()中先将defaultMQProducermpl.shutdown(),然后再调用AsyncTraceDispatcher.shutdown(),这会导致AsyncTraceDispatcher.flush()方法无法发送轨迹消息(因为发消息依赖defaultMQProducermpl),从而导致生产者轨迹丢失。
另外AsyncTraceDispatcher.flush()也存在问题:当AsyncTraceDispatcher.run()执行到traceContextQueue.poll与taskQueueByTopic.put之间时(正在转换的任务),AsyncTraceDispatcher.flush()判断traceContextQueue为空就直接break了,导致正在转换的任务丢失,从而导致轨迹消息没发出去。
发完消息就关闭producer(消息管理端的发消息功能),会出现这个问题。
生产者轨迹不丢失
业务中延迟500ms调用DefaultMQProducer.shutdown()
No response
The text was updated successfully, but these errors were encountered:
AsyncTraceDispatcher内部有自己的producer实例,为什么会依赖defaultMQProducermpl呢
Before Creating the Bug Report
I found a bug, not just asking a question, which should be created in GitHub Discussions.
I have searched the GitHub Issues and GitHub Discussions of this repository and believe that this is not a duplicate.
I have confirmed that this bug belongs to the current repository, not other repositories of RocketMQ.
Runtime platform environment
linux
RocketMQ version
5.1.4
JDK Version
1.8
Describe the Bug
使用rocketmq 5.1.4。
相同的问题链接:#2988
解决上面问题的fix:#2989
虽然上面给出了解决,但方案并不完善。
DefaultMQProducer.shutdown()中先将defaultMQProducermpl.shutdown(),然后再调用AsyncTraceDispatcher.shutdown(),这会导致AsyncTraceDispatcher.flush()方法无法发送轨迹消息(因为发消息依赖defaultMQProducermpl),从而导致生产者轨迹丢失。
另外AsyncTraceDispatcher.flush()也存在问题:当AsyncTraceDispatcher.run()执行到traceContextQueue.poll与taskQueueByTopic.put之间时(正在转换的任务),AsyncTraceDispatcher.flush()判断traceContextQueue为空就直接break了,导致正在转换的任务丢失,从而导致轨迹消息没发出去。
![1651718961882_ pic](https://cdn.statically.io/img/private-user-images.githubusercontent.com/22510845/341716351-1baa16ac-f1e5-4799-8638-7b73d0e714c0.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjE5ODQ1OTYsIm5iZiI6MTcyMTk4NDI5NiwicGF0aCI6Ii8yMjUxMDg0NS8zNDE3MTYzNTEtMWJhYTE2YWMtZjFlNS00Nzk5LTg2MzgtN2I3M2QwZTcxNGMwLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNDA3MjYlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjQwNzI2VDA4NTgxNlomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTFiNjA2MTlhZjJjYWE1ZTM1MWZjYWRhZTFhYmVlODRjNzg5YzM5MmE3YTQyYzllMDJmODA2NzEyZjQxNGU0YmMmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JmFjdG9yX2lkPTAma2V5X2lkPTAmcmVwb19pZD0wIn0.1F2NJZaLhYTGDu2nat0G8_KFwWoBrWnALCH6J_dWXA4)
![1651718961883_ pic](https://cdn.statically.io/img/private-user-images.githubusercontent.com/22510845/341717794-c965eed3-1fcd-4ffe-986c-c8d8655a74a8.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjE5ODQ1OTYsIm5iZiI6MTcyMTk4NDI5NiwicGF0aCI6Ii8yMjUxMDg0NS8zNDE3MTc3OTQtYzk2NWVlZDMtMWZjZC00ZmZlLTk4NmMtYzhkODY1NWE3NGE4LnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNDA3MjYlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjQwNzI2VDA4NTgxNlomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPWNmZTkxNWQ1MTljOTdhMzBlYTliOWJlZmIxMTgwYTNkOTdiNjQwNThlNTkxZDMxNDBmYzAyMzQ2ZDY5ZjQ2NGEmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JmFjdG9yX2lkPTAma2V5X2lkPTAmcmVwb19pZD0wIn0.0e2DKH2mxCdsZghte6W7a9Tnk3ADjzweogKUKGeGajA)
Steps to Reproduce
发完消息就关闭producer(消息管理端的发消息功能),会出现这个问题。
What Did You Expect to See?
生产者轨迹不丢失
What Did You See Instead?
业务中延迟500ms调用DefaultMQProducer.shutdown()
Additional Context
No response
The text was updated successfully, but these errors were encountered: