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 2021/11/16 11:15:44 UTC

[GitHub] [rocketmq] SignUp-StealWheel opened a new issue #3495: 事务消息中,如何将本地事务的执行结果保存到消息体中推送到RocketMq?

SignUp-StealWheel opened a new issue #3495:
URL: https://github.com/apache/rocketmq/issues/3495


   RocketMq的逻辑是:
   1. 发送half消息
   2. 执行本地事务
   3. 发送确认消息
   
   我想实现的需求是:
   1. 执行本地事务
   2. **将本地事务执行的结果保存到消息中**
   
   有什么实现方法吗?


-- 
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.

To unsubscribe, e-mail: dev-unsubscribe@rocketmq.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [rocketmq] SignUp-StealWheel commented on issue #3495: 事务消息中,如何将本地事务的执行结果保存到消息体中推送到RocketMq?

Posted by GitBox <gi...@apache.org>.
SignUp-StealWheel commented on issue #3495:
URL: https://github.com/apache/rocketmq/issues/3495#issuecomment-970265943


   @xyz327 走轮询就不是rocketmq原生支持的2PC方式了,目前想的是如果只用rocketmq原生方式实现,不引入其他逻辑


-- 
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.

To unsubscribe, e-mail: dev-unsubscribe@rocketmq.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [rocketmq] xyz327 commented on issue #3495: 事务消息中,如何将本地事务的执行结果保存到消息体中推送到RocketMq?

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


   https://github.com/xyz327/transactional-rocketmq-spring-boot-starter   之前基于spring做的可靠消息发送
   基于spring的 TransactionSynchronization  
   1.  开启事务
   2. 执行本地事务
   3. 发送事务半消息
   4. 结束事务
   5. 事务完成回调处理半消息
   
   对于你这个 我觉得可以先写消息表。然后再定时任务异步发送就好
   > main-thread
   1. 开启事务
   2. 执行本地事务
   3. 写本地消息记录表
   4. 结束事务
   > send-msg-thread  
   1. 轮询本地消息记录表发出消息


-- 
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.

To unsubscribe, e-mail: dev-unsubscribe@rocketmq.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [rocketmq] xyz327 commented on issue #3495: 事务消息中,如何将本地事务的执行结果保存到消息体中推送到RocketMq?

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


   > @xyz327 走轮询就不是rocketmq原生支持的2PC方式了,目前想的是如果只用rocketmq原生方式实现,不引入其他逻辑
   
   考虑用rocketmq的事务消息只是做个触发器的功能?本地事务记录要发送的消息内容。然后由事务消息去触发这个消息是否需要发送
   
   rocketmq原生的2pc是先写消息。你现在的需求是要后写消息。完全不引入额外逻辑估计难以实现
   
   


-- 
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.

To unsubscribe, e-mail: dev-unsubscribe@rocketmq.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [rocketmq] odbozhou closed issue #3495: 事务消息中,如何将本地事务的执行结果保存到消息体中推送到RocketMq?

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


   


-- 
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.

To unsubscribe, e-mail: dev-unsubscribe@rocketmq.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [rocketmq] SignUp-StealWheel commented on issue #3495: 事务消息中,如何将本地事务的执行结果保存到消息体中推送到RocketMq?

Posted by GitBox <gi...@apache.org>.
SignUp-StealWheel commented on issue #3495:
URL: https://github.com/apache/rocketmq/issues/3495#issuecomment-971135515


   > > @xyz327 走轮询就不是rocketmq原生支持的2PC方式了,目前想的是如果只用rocketmq原生方式实现,不引入其他逻辑
   > 
   > 考虑用rocketmq的事务消息只是做个触发器的功能?本地事务记录要发送的消息内容。然后由事务消息去触发这个消息是否需要发送
   > 
   > rocketmq原生的2pc是先写消息。你现在的需求是要后写消息。完全不引入额外逻辑估计难以实现
   
   @xyz327 感谢回答!


-- 
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.

To unsubscribe, e-mail: dev-unsubscribe@rocketmq.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org