You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@seata.apache.org by "luky116 (via GitHub)" <gi...@apache.org> on 2025/01/18 12:38:33 UTC

[I] support rocketmq mode in tcc [incubator-seata-go]

luky116 opened a new issue, #765:
URL: https://github.com/apache/incubator-seata-go/issues/765

   <!-- Please only use this template for submitting enhancement requests -->
   
   **What would you like to be added**:
   
   **Why is this needed**:
   


-- 
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: notifications-unsubscribe@seata.apache.org.apache.org

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


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@seata.apache.org
For additional commands, e-mail: notifications-help@seata.apache.org


Re: [I] feat: support rocketmq mode in tcc [incubator-seata-go]

Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on issue #765:
URL: https://github.com/apache/incubator-seata-go/issues/765#issuecomment-4697290904

   > Bot detected the issue body's language is not English, translate it automatically.
   
   # Questions
   The endTransaction () of the Go client (rocketmq-client-go/v2) is private and cannot be called from outside.As a result, in the TCC RocketMQ mode, the Commit/Rollback phase cannot proactively notify the broker, and can only rely on the review mechanism of the broker after 60 seconds, with a high delay.
   # Plans
   The end_transaction request of the RocketMQ Remoting protocol (code = 37) is implemented by itself and sent directly to the broker through TCP.Because Go's internal packet restrictions cannot multiplex protocol encoding and network communication within the client, request header construction, binary frame encoding, NameServer routing queries, and TCP sending are re-implemented.
   # Effects
   Commit/Rollback priority walk protocol layer (effective on the millisecond level), failures automatically downgraded to lookback mode (60s delay)


-- 
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: notifications-unsubscribe@seata.apache.org

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


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@seata.apache.org
For additional commands, e-mail: notifications-help@seata.apache.org


Re: [I] feat: support rocketmq mode in tcc [incubator-seata-go]

Posted by "CAICAIIs (via GitHub)" <gi...@apache.org>.
CAICAIIs commented on issue #765:
URL: https://github.com/apache/incubator-seata-go/issues/765#issuecomment-3977120017

   please assign to me


-- 
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: notifications-unsubscribe@seata.apache.org

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


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@seata.apache.org
For additional commands, e-mail: notifications-help@seata.apache.org


Re: [I] feat: support rocketmq mode in tcc [incubator-seata-go]

Posted by "XiaoFeiASK (via GitHub)" <gi...@apache.org>.
XiaoFeiASK commented on issue #765:
URL: https://github.com/apache/incubator-seata-go/issues/765#issuecomment-4697290461

   # 问题
   Go 客户端(rocketmq-client-go/v2)的 endTransaction() 是私有方法,无法从外部调用。导致 TCC RocketMQ 模式下,Commit/Rollback 阶段无法主动通知 Broker,只能依赖 Broker 60 秒后的回查机制,延迟很高。
   # 方案
   自行实现 RocketMQ Remoting 协议的 END_TRANSACTION 请求(code=37),通过 TCP 直接发送给 Broker。因为 Go 的 internal 包限制无法复用客户端内部的协议编码和网络通信,所以重新实现了请求头构造、二进制帧编码、NameServer 路由查询和 TCP 发送。
   # 效果
   Commit/Rollback 优先走协议层(毫秒级生效),失败自动降级到回查模式(60s 延迟)


-- 
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: notifications-unsubscribe@seata.apache.org

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


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@seata.apache.org
For additional commands, e-mail: notifications-help@seata.apache.org


Re: [I] feat: support rocketmq mode in tcc [incubator-seata-go]

Posted by "xiao-fei6 (via GitHub)" <gi...@apache.org>.
xiao-fei6 commented on issue #765:
URL: https://github.com/apache/incubator-seata-go/issues/765#issuecomment-4638593793

   please assign to me


-- 
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: notifications-unsubscribe@seata.apache.org

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


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@seata.apache.org
For additional commands, e-mail: notifications-help@seata.apache.org


Re: [I] feat: support rocketmq mode in tcc [incubator-seata-go]

Posted by "FinnTew (via GitHub)" <gi...@apache.org>.
FinnTew commented on issue #765:
URL: https://github.com/apache/incubator-seata-go/issues/765#issuecomment-2660940750

   plz assign to me.


-- 
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: notifications-unsubscribe@seata.apache.org

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


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@seata.apache.org
For additional commands, e-mail: notifications-help@seata.apache.org


Re: [I] feat: support rocketmq mode in tcc [incubator-seata-go]

Posted by "Ethan-Xingyue (via GitHub)" <gi...@apache.org>.
Ethan-Xingyue closed issue #765: feat: support rocketmq mode in tcc
URL: https://github.com/apache/incubator-seata-go/issues/765


-- 
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: notifications-unsubscribe@seata.apache.org

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


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@seata.apache.org
For additional commands, e-mail: notifications-help@seata.apache.org


Re: [I] feat: support rocketmq mode in tcc [incubator-seata-go]

Posted by "luky116 (via GitHub)" <gi...@apache.org>.
luky116 commented on issue #765:
URL: https://github.com/apache/incubator-seata-go/issues/765#issuecomment-2660901877

   @guochun


-- 
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: notifications-unsubscribe@seata.apache.org

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


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@seata.apache.org
For additional commands, e-mail: notifications-help@seata.apache.org


Re: [I] feat: support rocketmq mode in tcc [incubator-seata-go]

Posted by "CAICAIIs (via GitHub)" <gi...@apache.org>.
CAICAIIs commented on issue #765:
URL: https://github.com/apache/incubator-seata-go/issues/765#issuecomment-3980707668

   ### 问题
   Java 端的 SeataMQProducer 在 Commit/Rollback 阶段直接调用 producer.endTransaction(sendResult, COMMIT/ROLLBACK),但 Go 客户端(apache/rocketmq-client-go/v2)的 endTransaction() 是私有方法,无法从外部调用。
   ### 方案
   既然无法调用客户端的私有方法,我们直接构造 RocketMQ Remoting 协议的 END_TRANSACTION 请求,通过 TCP 发送给 Broker。效果和 Java 端调用 endTransaction() 一样,Commit/Rollback 立即生效。
   实现上采用渐进式策略:
   1.  先实现纯回查模式作为保底(Commit/Rollback 不做操作,依赖 Broker 60s 后回查)
   2.  再实现协议层,优先使用,失败自动降级
   ### 实施计划
   PR1:基础框架
   - Prepare 发送 Half-Message,返回 UnknownState
   - Commit/Rollback 不做操作,依赖 Broker 回查
   - CheckLocalTransaction 查询 TC 全局状态
   - 功能完整,Commit 延迟约 60s
   
   PR-2:协议适配
   - 实现 END_TRANSACTION 请求(RequestCode=37)
   - Commit/Rollback 优先走协议,失败降级到回查
   - Commit 延迟降低到毫秒级
   
   PR-3:集成测试 + 文档


-- 
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: notifications-unsubscribe@seata.apache.org

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


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@seata.apache.org
For additional commands, e-mail: notifications-help@seata.apache.org