ekchom
ekchom

Reputation: 148

GRPC access response byte-buffer

In continuation of Protobuf serialization/deserialization fails (On protobuf issue) I have GRPC service where response could be deep-recursion (Nested).

syntax = "proto3";
service RecursionTest {
    rpc GetMeRecursiveProto(Req) returns (Response) {}
}
message Req {
    int64 level=1;
}
message msg {
    string name=1;
}
message final {
    msg first=1;
    int64 level=2;
    repeated final inner=3;
}
message Response {
    final resp = 1;
}

Client send, requested level for recursion, and server respond back with nested-pb. However for nest-ed message more than 100 level, grpc fails. Is there way to access byte-buffer of response and build the protobuf response from coded stream with answer given in Protobuf serialization/deserialization fails

    grpc::Status status = stub->GetMeRecursiveProto(&context, request, &response);

rpc failure error code and error string " 12, No message returned for unary request"

Upvotes: 0

Views: 202

Answers (1)

Terry
Terry

Reputation: 159

FYI - support for increasing the recursion limit in grpc-java was recently added in #10043. The change discussed in more detail in #9643.

The change was released in v1.56.0

Upvotes: 1

Related Questions