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
I create a new Google Pub/Sub project for Quarkus following exactly the tutorial available on https://docs.quarkiverse.io/quarkus-google-cloud-services/main/pubsub.html using 3.2.0 Final as quarkus version. The only small difference was in the subscription name, because I already had one and therefore, I just used it like ProjectSubscriptionName subscriptionName = ProjectSubscriptionName.of(projectId, pubSubSubscription);
Running the project on quarkus works like a charm, the subscriber works and messages are sent/received to/from the Pub/Sub subscription.
My problem comes when I try to build a native executable. I downloaded and installed Oracle GraalVM 20.0.2+9.1 and tried to build a native image. mvnw --no-transfer-progress -f pom.xml -Pnative clean package -DskipTest
Due to following bug in GraalVM oracle/graal#5868, I had to implement following workaround apache/camel-quarkus#5006 (comment)
Probably precisely because of that GraalVM bug, Google Pub/Sub rejects the subscriber request with invalid argument error.
Is this really just a bug of GraalVM and I have to wait for the fix? Is there any different method/framework else I can use in order to make a PubSub subscriber working under Quarkus with a native build?
Expected behavior
--/ __ / / / / _ | / _ / /// / / / __/
-/ // / // / __ |/ , / ,< / // /\ \
--___// |//|//||_//
2023-09-07 15:56:42,364 INFO [io.quarkus] (Quarkus Main Thread) pubsub-quickstart 1.0.0-SNAPSHOT on JVM (powered by Quarkus 3.2.0.Final) started in 2.860s. Listening on: http://localhost:8080
2023-09-07 15:56:42,367 INFO [io.quarkus] (Quarkus Main Thread) Profile dev activated. Live Coding activated.
2023-09-07 15:56:42,367 INFO [io.quarkus] (Quarkus Main Thread) Installed features: [cdi, google-cloud-pubsub, resteasy-reactive, resteasy-reactive-jackson, smallrye-context-propagation, vertx]
2023-09-07 15:59:36,450 INFO [org.acm.PubSubResource] (executor-thread-1) Created subscriber
2023-09-07 15:59:36,704 INFO [org.acm.PubSubResource] (executor-thread-1) Subscriber running
@gpaolopedrazza could you open an issue in this repo https://github.com/quarkiverse/quarkus-google-cloud-services with a reproducer ? There is an issue with Apache Arrow which will be fixed in 1.3 (not yet released last time I checked) and an issue with GraalVM (which will be fixed soon), and an issue with Google GAX (which will be fixed soon) so it's very complex to track all these stuff right now.
So the best is to add you reproducer to the other issue and close this one so I can synchronize all the issues and check when the fix will be integrated that they cover all the use cases.
Describe the bug
I create a new Google Pub/Sub project for Quarkus following exactly the tutorial available on https://docs.quarkiverse.io/quarkus-google-cloud-services/main/pubsub.html using 3.2.0 Final as quarkus version. The only small difference was in the subscription name, because I already had one and therefore, I just used it like
ProjectSubscriptionName subscriptionName = ProjectSubscriptionName.of(projectId, pubSubSubscription);
Running the project on quarkus works like a charm, the subscriber works and messages are sent/received to/from the Pub/Sub subscription.
My problem comes when I try to build a native executable. I downloaded and installed Oracle GraalVM 20.0.2+9.1 and tried to build a native image.
mvnw --no-transfer-progress -f pom.xml -Pnative clean package -DskipTest
Due to following bug in GraalVM oracle/graal#5868, I had to implement following workaround apache/camel-quarkus#5006 (comment)
Probably precisely because of that GraalVM bug, Google Pub/Sub rejects the subscriber request with invalid argument error.
Is this really just a bug of GraalVM and I have to wait for the fix? Is there any different method/framework else I can use in order to make a PubSub subscriber working under Quarkus with a native build?
Expected behavior
--/ __ / / / / _ | / _ / /// / / / __/
-/ // / // / __ |/ , / ,< / // /\ \
--___// |//|//||_//
2023-09-07 15:56:42,364 INFO [io.quarkus] (Quarkus Main Thread) pubsub-quickstart 1.0.0-SNAPSHOT on JVM (powered by Quarkus 3.2.0.Final) started in 2.860s. Listening on: http://localhost:8080
2023-09-07 15:56:42,367 INFO [io.quarkus] (Quarkus Main Thread) Profile dev activated. Live Coding activated.
2023-09-07 15:56:42,367 INFO [io.quarkus] (Quarkus Main Thread) Installed features: [cdi, google-cloud-pubsub, resteasy-reactive, resteasy-reactive-jackson, smallrye-context-propagation, vertx]
2023-09-07 15:59:36,450 INFO [org.acm.PubSubResource] (executor-thread-1) Created subscriber
2023-09-07 15:59:36,704 INFO [org.acm.PubSubResource] (executor-thread-1) Subscriber running
Actual behavior
C:\source\pubsub-quickstart\target>pubsub-quickstart-1.0.0-SNAPSHOT-runner.exe
--/ __ / / / / _ | / _ / /// / / / __/
-/ // / // / __ |/ , / ,< / // /\
--___// |//|//||_//
2023-09-07 15:40:38,096 INFO [io.quarkus] (main) pubsub-quickstart 1.0.0-SNAPSHOT native (powered by Quarkus 3.2.0.Final) started in 0.086s. Listening on: http://0.0.0.0:8080
2023-09-07 15:40:38,099 INFO [io.quarkus] (main) Installed features: [cdi, google-cloud-pubsub, resteasy-reactive, resteasy-reactive-jackson, smallrye-context-propagation, vertx]
2023-09-07 15:46:19,031 INFO [org.acm.PubSubResource] (executor-thread-1) Created subscriber
2023-09-07 15:46:19,051 INFO [org.acm.PubSubResource] (executor-thread-1) Subscriber running
2023-09-07 15:46:19,591 SEVERE [com.goo.clo.pub.v1.StreamingSubscriberConnection] (Subscriber-SE-1-0) terminated streaming with exception: com.google.api.gax.rpc.InvalidArgumentException: com.google.api.gax.rpc.InvalidArgumentException: io.grpc.StatusRuntimeException: INVALID_ARGUMENT: Request contains an invalid argument.
at com.google.api.gax.rpc.ApiExceptionFactory.createException(ApiExceptionFactory.java:92)
at com.google.api.gax.rpc.ApiExceptionFactory.createException(ApiExceptionFactory.java:41)
at com.google.cloud.pubsub.v1.StreamingSubscriberConnection$1.onFailure(StreamingSubscriberConnection.java:340)
How to Reproduce?
Output of
uname -a
orver
No response
Output of
java -version
java 20.0.1 2023-04-18
GraalVM version (if different from Java)
20.0.2+9.1
Quarkus version or git rev
3.2.1
Build tool (ie. output of
mvnw --version
orgradlew --version
)mvnw --no-transfer-progress -f pom.xml -Pnative clean package -DskipTest
Additional information
No response
The text was updated successfully, but these errors were encountered: