rocketmq icon indicating copy to clipboard operation
rocketmq copied to clipboard

[Bug] rocketmq-spring自定义sendMessageHook的sendMessageAfter被执行多次

Open dousp opened this issue 1 year ago • 3 comments

Before Creating the Bug Report

  • [X] I found a bug, not just asking a question, which should be created in GitHub Discussions.

  • [X] I have searched the GitHub Issues and GitHub Discussions of this repository and believe that this is not a duplicate.

  • [X] I have confirmed that this bug belongs to the current repository, not other repositories of RocketMQ.

Runtime platform environment

win & centos7

RocketMQ version

  • org.apache.rocketmq:rocketmq-spring-boot-starter:2.2.3

JDK Version

jdk8

Describe the Bug

发送异步数据时发现z自定义hook中的方法被调用多次,打印了多次日志

Steps to Reproduce

rocketMQTemplate.asyncSend(....)

What Did You Expect to See?

没有重复调用的日志

What Did You See Instead?

出现了重复调用打印的日志

Additional Context

讨论

dousp avatar Oct 31 '23 08:10 dousp

Maybe it is more appropriate to address this issue in rocketmq-spring repo.

drpmma avatar Nov 02 '23 02:11 drpmma

Maybe it is more appropriate to address this issue in rocketmq-spring repo.

MQClientAPIImpl and DefaultMQProducerImpl belong to rocketmq-client-x.x.x.jar

Do you think rocketmq-spring repo will care about this when it comes to integration???

I have time to read the source code carefully, it may not be so simple, anyway, if there is an official check here, I think it is worth it.

dousp avatar Nov 02 '23 09:11 dousp

see https://github.com/apache/rocketmq/discussions/7518

leizhiyuan avatar Feb 01 '24 06:02 leizhiyuan