You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Expected behavior
I expect ClientInterceptor to be instantiated and registered with Channel. In io.quarkus.grpc.runtime.supports.Channels.createChannel I see code instantiating and adding interceptors. And similar approach works for ServerInterceptor when implementing gRPC server.
Actual behavior
ClientInterceptor is not instantiated.
Program prints: Interceptor instantiated: false
To Reproduce
Steps to reproduce the behavior:
Create empty Quarkus project with gRPC extension
Paste the ExampleApp class as shown above
Run it and see Interceptor instantiated: false
Configuration
# Add your application.properties here, if applicable.quarkus.grpc.clients.hello.host=localhost
quarkus.grpc.clients.hello.port=50051
Environment (please complete the following information):
Output of uname -a or ver: Linux laptop 5.4.48-gentoo #1 SMP Sat Jun 27 23:10:36 MSK 2020 x86_64 Intel(R) Core(TM) i7-8850H CPU @ 2.60GHz GenuineIntel GNU/Linux
Output of java -version:
openjdk version "11.0.6" 2020-01-14 LTS
OpenJDK Runtime Environment Zulu11.37+17-CA (build 11.0.6+10-LTS)
OpenJDK 64-Bit Server VM Zulu11.37+17-CA (build 11.0.6+10-LTS, mixed mode)
GraalVM version (if different from Java): not using GraalVM
Quarkus version or git rev: 1.5.2.Final
Build tool (ie. output of mvnw --version or gradlew --version): Apache Maven 3.6.2
The text was updated successfully, but these errors were encountered:
I tried various scope annotation combinations on the ExampleApp and the grpcInterceptor() method. Also tried extracting interceptor as a separate class:
package org.acme;
import io.grpc.*;
import javax.inject.Singleton;
@Singleton
public class MyInterceptor implements ClientInterceptor {
public MyInterceptor() {
ExampleApp.interceptorInstatiated = true;
}
@Override
public <ReqT, RespT> ClientCall<ReqT, RespT> interceptCall(MethodDescriptor<ReqT, RespT> method, CallOptions callOptions, Channel next) {
return next.newCall(method, callOptions);
}
}
But it did not help. Interceptor is still not instantiated.
Describe the bug
I have a problem adding an interceptor to gRPC Channel instantiated by Quarkus.
Here is a minimal reproducer.
Expected behavior
I expect ClientInterceptor to be instantiated and registered with Channel. In
io.quarkus.grpc.runtime.supports.Channels.createChannel
I see code instantiating and adding interceptors. And similar approach works for ServerInterceptor when implementing gRPC server.Actual behavior
ClientInterceptor is not instantiated.
Program prints:
Interceptor instantiated: false
To Reproduce
Steps to reproduce the behavior:
Interceptor instantiated: false
Configuration
Environment (please complete the following information):
uname -a
orver
:Linux laptop 5.4.48-gentoo #1 SMP Sat Jun 27 23:10:36 MSK 2020 x86_64 Intel(R) Core(TM) i7-8850H CPU @ 2.60GHz GenuineIntel GNU/Linux
java -version
:mvnw --version
orgradlew --version
): Apache Maven 3.6.2The text was updated successfully, but these errors were encountered: