Skip to content

@Blocking not working on grpc service methods if method contains reserved keyword or underscore #48358

@nconcetti

Description

@nconcetti

Describe the bug

Proto files with rpc definitions like rpc A_B(Request) returns (Reply) or rpc Assert(Request) returns (Reply) will compile into stubs with methods aB and assert_ respectively. This is due to an effort of grpc-java to honor the Java Bean Spec.

When annotating these methods with io.smallrye.common.annotation.Blocking, like:

@Blocking
public void aB(Request request, StreamObserver<Reply> responseObserver)

... the BlockingServerInterceptor will not work for these converted method names, ultimately leading to failure at runtime if blocking behaviour is detected.

Expected behavior

It should work just as it does for "normal" rpc methods.

Actual behavior

Fails at runtime if i/o, etc is used.

How to Reproduce?

No response

Output of uname -a or ver

No response

Output of java -version

No response

Quarkus version or git rev

No response

Build tool (ie. output of mvnw --version or gradlew --version)

No response

Additional information

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions