You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@rocketmq.apache.org by GitBox <gi...@apache.org> on 2020/12/18 08:02:01 UTC

[GitHub] [rocketmq] djkdeveloper opened a new issue #2510: 事务消息的templte

djkdeveloper opened a new issue #2510:
URL: https://github.com/apache/rocketmq/issues/2510


   事务消息的RocketMQTemplate
   场景是这样的 我有订单模块 里面可能有多个事务消息 比如 下单会有一个事务消息  然后核销订单也会有一个事务消息 
   现在的问题是 发送事务消息RocketMQTemplate的选择 
   方案1:
   2个人发送事务消息的时候 都用各自的RocketMQTemplate  就是写自己的template 继承RocketMQTemplate 然后RocketMQTemplate
   优点:发送事务消息的时候 执行本地事务的时候 都是各自的本地事务listern 业务清晰 
   疑问:不知道生成多个RocketMQTemplate会不会有什么性能上的弊端


----------------------------------------------------------------
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:
users@infra.apache.org



[GitHub] [rocketmq] RongtongJin commented on issue #2510: 事务消息的templte

Posted by GitBox <gi...@apache.org>.
RongtongJin commented on issue #2510:
URL: https://github.com/apache/rocketmq/issues/2510#issuecomment-748418283


   如你所说,多个RocketMQTemplate会产生多个producer,性能上会有很轻微的损失,但不同事务消息的producer进行了隔离,代码逻辑更加清晰。具体使用哪一种方案,需要业务自己去权衡。


----------------------------------------------------------------
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:
users@infra.apache.org



[GitHub] [rocketmq] RongtongJin closed issue #2510: 事务消息的templte

Posted by GitBox <gi...@apache.org>.
RongtongJin closed issue #2510:
URL: https://github.com/apache/rocketmq/issues/2510


   


----------------------------------------------------------------
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:
users@infra.apache.org