Possible to have non-publisher for RPC method parameter?
deepak-auto opened this issue · 2 comments
deepak-auto commented
Using the example in the README, can we have this method signature
ReactorGreeterGrpc.GreeterImplBase svc = new ReactorGreeterGrpc.GreeterImplBase() {
@Override
public Mono<HelloResponse> sayHello(HelloRequest request) {
return greet("Hello", request);
}
};
instead of
ReactorGreeterGrpc.GreeterImplBase svc = new ReactorGreeterGrpc.GreeterImplBase() {
@Override
public Mono<HelloResponse> sayHello(Mono<HelloRequest> request) {
return request.map(protoRequest -> greet("Hello", protoRequest));
}
};
?
This way, we can access the request
object from anywhere in the method. It will prevent us from writing an extra map
function as in the example above.