dubbo icon indicating copy to clipboard operation
dubbo copied to clipboard

[Bug] Dubbo3 Triple protocol not support GRPC backpressure

Open tubingbing opened this issue 2 weeks ago • 2 comments

Pre-check

  • [x] I am sure that all the content I provide is in English.

Search before asking

  • [x] I had searched in the issues and found no similar issues.

Apache Dubbo Component

Java SDK (apache/dubbo)

Dubbo Version

dubbo version 3.3.6 and openjdk17

Steps to reproduce this issue

proto file:

syntax = "proto3";

package xxx.grpc.api;

option java_multiple_files = true;
option java_package = "xxx.grpc.api";
option java_outer_classname = "HelloWorldProto";

service MyService {
  rpc SayHello (HelloRequest) returns (HelloReply) {}
  rpc SayHelloServerStream (HelloRequest) returns (stream HelloReply) {}
  rpc SayHelloClientStream (stream HelloRequest) returns (HelloReply) {}
  rpc SayHelloBiStream (stream HelloRequest) returns (stream HelloReply) {}
}

message HelloRequest {
  string name = 1;
}

message HelloReply {
  string message = 1;
}

Compiling and packaging with grpc-java allows for the use of grpc's backpressure, while compiling with dubbo does not support the following code:

@GrpcService
public class MyServiceImpl extends MyServiceGrpc.MyServiceImplBase {
    @Override
    public StreamObserver<HelloRequest> sayHelloBiStream(StreamObserver<HelloReply> responseObserver) {
        **ServerCallStreamObserver<HelloReply> serverObs = (ServerCallStreamObserver)responseObserver;
        serverObs.disableAutoInboundFlowControl();**
        ........
    }
}

What you expected to happen

I want to know how to solve it

Anything else

No response

Are you willing to submit a pull request to fix on your own?

  • [x] Yes I am willing to submit a pull request on my own!

Code of Conduct

tubingbing avatar Dec 09 '25 09:12 tubingbing

cc @EarthChen

wangchengming666 avatar Dec 09 '25 09:12 wangchengming666

It seems that gRPC has iterated a new API, and Dubbo has not yet aligned with it temporarily. We will consider aligning the API in the future.

The existing API is org.apache.dubbo.rpc.protocol.tri.observer.CallStreamObserver#disableAutoFlowControl

EarthChen avatar Dec 10 '25 02:12 EarthChen