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: [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]
