gRPC does not discover `@Blocking` correctly
See original GitHub issueDescribe the bug
io.quarkus.grpc.deployment.GrpcServerProcessor#gatherBlockingMethods
only discovers @Blocking
on classes that directly extend the gRPC *ImplBase
classes, but not on subclasses.
@Blocking
discovery works in these cases:
@Blocking
@GrpcService
class MyService extends MyServiceImplBase {
// ...
}
and
// in another artifact
@GrpcService
class MyServiceSuper extends MyServiceImplBase {
// ...
}
class MyService extends MyServiceSuper {
// @Blocking must be applied to all methods - aka must override all methods here
@Blocking
@Override
void methodFromMyServiceImplBase() {
// ...
}
}
@Blocking
discovery does not work in this case:
// in another artifact
class MyServiceSuper extends MyServiceImplBase {
// ...
}
@Blocking // doesn't work, not detected by GrpcServerProcessor#gatherBlockingMethods
@GrpcService
class MyService extends MyServiceSuper {
// ...
}
Expected behavior
Allow @Blocking
on classes that indirectly extend *ImplBase
Actual behavior
@Blocking
is not detected for class MyService extends BaseService extends MyServiceImplBase
(not proper Java…)
How to Reproduce?
No response
Output of uname -a
or ver
No response
Output of java -version
No response
GraalVM version (if different from Java)
No response
Quarkus version or git rev
2.7.2
Build tool (ie. output of mvnw --version
or gradlew --version
)
No response
Additional information
No response
Issue Analytics
- State:
- Created 2 years ago
- Comments:7 (6 by maintainers)
Top Results From Across the Web
Trouble-Shooting | grpc-spring-boot-starter - GitHub Pages
The server/client does not start because some class or method is missing. This is usually the case if the grpc-libraries use slightly different...
Read more >How can I manage blocking code inside gRPC-java server ...
The easiest way is to do this is pass the responseObserver to the long running task: @Override public void getData(RequestValue requestValue ...
Read more >So You Want to Optimize gRPC - Part 1
Unlike the client code, the service handler is non-blocking, meaning it doesn't return a value like a function call would.
Read more >Akka gRPC
Akka gRPC - Support for building streaming gRPC servers and clients on top of Akka Streams.
Read more >Troubleshoot proxyless gRPC deployments | Traffic Director
For information about how to use the Client Status Discovery Service (CSDS) API to ... Do not use an HTTP, HTTPS, or HTTP/2...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Oops, yea. Updated the description.
I’ll try to prepare a PR to fix this one.