Bughue opened a new pull request, #6230: URL: https://github.com/apache/incubator-seata/pull/6230
<!-- Please make sure you have read and understood the contributing guidelines --> - [ ] I have registered the PR [changes](../changes). ### Ⅰ. Describe what this PR did 集成rocketmq到seata。 #### 关于总体解决思路: 本次集成的能力重点在全局事务的一阶段,我们会提供一个SeataMQProducer,在里面将以下两个方法自动加入到全局事务中。其他方法会调用到原生父类进行,不会加入到全局事务。 #### 关于具体实现方案及时序: 程序流程: 1. rocketmq按发送半消息(和rocketmq原有逻辑一样) 2. 执行本地事务executeLocalTransaction/executeLocalTransactionBranch(和rocketmq原有逻辑一样) 3. 如果state=成功,强行改回unknown,等待seata-TC调用rm决定二阶段。否则都将直接rollback这个消息(因为seata目前无法支持rm一阶段回查能力) #### 细节讨论(包括summer-code-pr原有的讨论) https://zhuanlan.zhihu.com/p/679591405? #### Overall Solution Approach: This integration focuses on the initial phase of global transactions. We will provide a SeataMQProducer, which will automatically incorporate the following two methods into the global transaction. Other methods will invoke the native superclass and will not be included in the global transaction. #### Specific Implementation Plan and Sequence: Use the existing InterfaceParser proxy mechanism to proxy the TransactionMQProducer type bean and override sendMessageInTransaction. Program flow: 1. RocketMQ sends a half message (as per RocketMQ's original logic). 2. Execute the local transaction executeLocalTransaction/executeLocalTransactionBranch (as per RocketMQ's original logic). 3. If state=success, forcibly change it back to unknown, and wait for Seata-TC to call RM to decide on the second phase. Otherwise, directly roll back this message (as Seata currently lacks the capability to support RM phase one re-check). #### Detailed Discussion (Including Discussions in the Original Summer-Code-PR): https://zhuanlan.zhihu.com/p/679591405? ### Ⅱ. Does this pull request fix one issue? <!-- If that, add "fixes #xxx" below in the next line, for example, fixes #97. --> fixes https://github.com/apache/incubator-seata/issues/3752 ### Ⅲ. Why don't you add test cases (unit test/integration test)? ### Ⅳ. Describe how to verify it ### Ⅴ. Special notes for reviews -- 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: [email protected] For queries about this service, please contact Infrastructure at: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
