-
Notifications
You must be signed in to change notification settings - Fork 893
New issue
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
It is not appropriate for the DefaultRocketMQListenerContainer to only process the messageExt without additional processing of the message #346
Comments
if (Objects.equals(messageType, MessageExt.class) || Objects.equals(messageType, Message.class)) { |
当然如果用instanceof 可以忽略子类的判断。不过性能上不知道是否有区别。 |
在Wiki最佳实践第7条中推荐使用的是messageExt,这可以包含所有原生的RocketMQ Message的信息。 不过增加对RocketMQ Message的额外处理确实能帮助到那些误用Message的用户,你能提交一个PR来改善这个问题吗? |
好的!您稍等。 |
关于对 message这部分信息没有补上去,我们这就是在对rocketmq全链路补全的部分,发现一部分研发再使用Message的全链路没有拿到,所以才发现的这个问题,觉得可能加上会好一些,所以才提的这个issue。 |
已经合并。RocketMQ有一个externals的仓库存放了一些未孵化的项目,是否合适放入该仓库? 这里的全链路指的是做了指标的监控和暴露吗? |
指标的监控与暴露与spring-boot的zipkin那套已经有了。只不过由于rocketmq没有补全,导致全链路断开了。 把http替换为mq其实是类似的。kafka是支持这个功能的,这部分是需要社区来补充的。rocketmq 我这边作为一个基于此使用的,直接内部fix社区代码,然后内部使用,不太方便跟着社区后续的更新,所以初步采用的是切面方式做的补充,等于是打补丁了。其实spring-boot-rocketmq-starter项目直接支持全链路肯定是更好地。 感谢您的回复。还有@async标签这个功能,我与公司内部的技术老大与法规部沟通下,争取上传到 rocketmq的https://github.com/apache/rocketmq-externals 上。 我一开始以为是rocketmq的直接扩展,然后我这边大部分都要围绕着spring-boot与rocketmq结合与以后的玩法,嘿嘿想多了。 |
https://github.com/apache/rocketmq-spring/blob/master/rocketmq-spring-boot/src/main/java/org/apache/rocketmq/spring/support/DefaultRocketMQListenerContainer.java#L459
大家使用@RocketmqListiner标签常用的对象是 String Message MessageExt
如果仅对MessageExt 处理 会导致部分使用 Message 的用户 无法收到 properties topic等信息 与 String 一样。
希望 截图部分 增加对Message的额外处理。MessageExt 转换为Message即可 。
The text was updated successfully, but these errors were encountered: