Skip to content

关于seata使用的协议能够支持的最大消息体问题咨询 #7296

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

Open
wxrqforever opened this issue Apr 14, 2025 · 0 comments
Open

Comments

@wxrqforever
Copy link
Contributor

一、背景介绍
您好,在使用tcc模式,在prepare方法里会使用@BusinessActionContextParameter传递业务方法参数如代码中的bizData,在我们的场景下这个bizData可能很大,这个参数信息会随着tcc 分支上报到服务端,所以想了解下seata 协议能够设计能够传输的上限

 public boolean prepare(BusinessActionContext actionContext,   @BusinessActionContextParameter(paramName = "bizData" Object bizData) ) {
       //省略
        return true;
    }

我看了一下相关的编码和解码类,在org.apache.seata.core.rpc.netty.v1.ProtocolV1Encoder中我发现Full length定义的长度是4个字节,所以理论全部长度是4GB,

Image

但是在解码器中org.apache.seata.core.rpc.netty.v1.ProtocolV1Decoder,却限制了整个桢的大小为8M,

Image

基于上面我想确认下,所以通过在tcc中传递的消息的长度理论上来说应该是小于8M对吗(不考虑头部长度)?如果是的话想了解下为啥编码和解码在长度上的设计不是统一的,是出于什么考虑的,这种限制有办法配置修改吗?

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