-
Notifications
You must be signed in to change notification settings - Fork 8.8k
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
feature : RocketMQ transaction are supported #6230
Conversation
老pr #3974 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
1.branchtype=tcc
2.代理send 而不是半消息
3.独立producer,和独立的listener
4.回查看看能否使用queryxidrequest,直接查看xid对应事务的状态做二阶段半消息的提交/回滚
5.如果回查时xid不存在,代表这个事务已经回滚完成,直接回滚即可
6.回滚时如果没有半消息的msgid,直接代表分支已经回滚完成,因为消息会按照第五点进行自动回滚
7.多个producer对应多个rocketmq集群时,目前暂不支持.
# Conflicts: # all/pom.xml # rm/src/main/java/org/apache/seata/rm/DefaultResourceManager.java # seata-spring-autoconfigure/seata-spring-autoconfigure-client/src/main/java/org/apache/seata/spring/boot/autoconfigure/properties/client/RocketMQProperties.java # seata-spring-boot-starter/src/main/java/org/apache/seata/spring/boot/autoconfigure/SeataRocketMQAutoConfiguration.java
rocketmq/src/main/java/org/apache/seata/integration/rocketmq/SeataMQProducer.java
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Ⅰ. Describe what this PR did
集成rocketmq到seata。
关于总体解决思路:
本次集成的能力重点在全局事务的一阶段,我们会提供一个SeataMQProducer,在里面将以下两个方法自动加入到全局事务中。其他方法会调用到原生父类进行,不会加入到全局事务。
关于具体实现方案及时序:
程序流程:
测试相关
目前没有单测,在本地已经测试过了
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:
Test
There is no unittest currently, it has been tested locally
Ⅱ. Does this pull request fix one issue?
fixes #3752
Ⅲ. Why don't you add test cases (unit test/integration test)?
Ⅳ. Describe how to verify it
Ⅴ. Special notes for reviews