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:38:26 UTC

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

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