Skip to content
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

希望 MSG 方式在 gRPC调用分支事务时增加类 header 功能 #417

Open
wuyazi opened this issue May 17, 2023 · 0 comments
Open

Comments

@wuyazi
Copy link

wuyazi commented May 17, 2023

原始语句

Add(busiServer+"/trans.TransSvc/TransOut", &busi.BusiReq{Amount: 30, UserId: 1})

希望的语句类似

Add(busiServer+"/trans.TransSvc/TransOut", &busi.BusiReq{Amount: 30, UserId: 1}, headers=xxxxxx)

我找到了底层调用函数 getGrpcResult,里面的调用是

conn.Invoke(ctx, method, branchPayload, &[]byte{})

有没有可能扩展下,增加 headers 参数,或 Extra 参数


目前的需求场景是用 MSG 模式做数据最终一直性
主事务会操作多个实体,每个实体会有多个从服务同步数据,但是每个实体的额外参数不一样,不能用事务级别的拦截器,所以希望在分支事务级别增加额外参数

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant