You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by ja...@apache.org on 2023/02/13 09:33:45 UTC

[camel-quarkus] 02/02: Document gRPC extension limitations

This is an automated email from the ASF dual-hosted git repository.

jamesnetherton pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/camel-quarkus.git

commit 3143c7625885149b5fa099ce5240c67651c084e3
Author: James Netherton <ja...@gmail.com>
AuthorDate: Thu Feb 9 15:18:06 2023 +0000

    Document gRPC extension limitations
---
 .../ROOT/pages/reference/extensions/grpc.adoc      | 28 ++++++++++++++++++++++
 .../grpc/runtime/src/main/doc/limitations.adoc     | 21 ++++++++++++++++
 2 files changed, 49 insertions(+)

diff --git a/docs/modules/ROOT/pages/reference/extensions/grpc.adoc b/docs/modules/ROOT/pages/reference/extensions/grpc.adoc
index 7b1caf50cd..ab7f375929 100644
--- a/docs/modules/ROOT/pages/reference/extensions/grpc.adoc
+++ b/docs/modules/ROOT/pages/reference/extensions/grpc.adoc
@@ -44,3 +44,31 @@ Or add the coordinates to your existing project:
 ifeval::[{doc-show-user-guide-link} == true]
 Check the xref:user-guide/index.adoc[User guide] for more information about writing Camel Quarkus applications.
 endif::[]
+
+[id="extensions-grpc-camel-quarkus-limitations"]
+== Camel Quarkus limitations
+
+[id="extensions-grpc-limitations-integration-with-quarkus-grpc-is-not-supported"]
+=== Integration with Quarkus gRPC is not supported
+
+At present there is no support for integrating Camel Quarkus gRPC with Quarkus gRPC. If you have both the `camel-quarkus-grpc` and `quarkus-grpc` extension dependency on the classpath, you are likely to encounter problems at build time when compiling your application.
+
+[id="extensions-grpc-limitations-protobuf-generated-code"]
+=== Protobuf generated code
+
+You can https://github.com/grpc/grpc-java#generated-code[generate] gRPC service stubs with protobuf. A limitation of this is that generated code is annotated with the non Jakarta EE 10 friendly `@javax.annotation.Generated`.
+
+To avoid compilation issues, the `grpc-java` project recommendation is to add a `provided` scoped dependency like this:
+
+[source,xml]
+----
+<dependency>
+    <groupId>org.apache.tomcat</groupId>
+    <artifactId>annotations-api</artifactId>
+    <version>6.0.53</version>
+    <scope>provided</scope>
+</dependency>
+----
+
+Alternatively, you can use Maven or Gradle plugins to iterate over the generated code (found at `target/generated-sources` for Maven) and replace all instances of `@javax.annotation.Generated` with `@jakarta.annotation.Generated`.
+
diff --git a/extensions/grpc/runtime/src/main/doc/limitations.adoc b/extensions/grpc/runtime/src/main/doc/limitations.adoc
new file mode 100644
index 0000000000..f5ccb60881
--- /dev/null
+++ b/extensions/grpc/runtime/src/main/doc/limitations.adoc
@@ -0,0 +1,21 @@
+=== Integration with Quarkus gRPC is not supported
+
+At present there is no support for integrating Camel Quarkus gRPC with Quarkus gRPC. If you have both the `camel-quarkus-grpc` and `quarkus-grpc` extension dependency on the classpath, you are likely to encounter problems at build time when compiling your application.
+
+=== Protobuf generated code
+
+You can https://github.com/grpc/grpc-java#generated-code[generate] gRPC service stubs with protobuf. A limitation of this is that generated code is annotated with the non Jakarta EE 10 friendly `@javax.annotation.Generated`.
+
+To avoid compilation issues, the `grpc-java` project recommendation is to add a `provided` scoped dependency like this:
+
+[source,xml]
+----
+<dependency>
+    <groupId>org.apache.tomcat</groupId>
+    <artifactId>annotations-api</artifactId>
+    <version>6.0.53</version>
+    <scope>provided</scope>
+</dependency>
+----
+
+Alternatively, you can use Maven or Gradle plugins to iterate over the generated code (found at `target/generated-sources` for Maven) and replace all instances of `@javax.annotation.Generated` with `@jakarta.annotation.Generated`.