You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by pp...@apache.org on 2020/03/25 14:41:36 UTC

[camel-quarkus] branch master updated (f14ce9b -> cfec419)

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

ppalaga pushed a change to branch master
in repository https://gitbox.apache.org/repos/asf/camel-quarkus.git.


    from f14ce9b  Clean up poms: introduce test BOM, manage only where necessary
     new dcb610a  Fix #964 Protobuf dataformat support (JVM only)
     new cfec419  Fix #965 gRPC support (JVM only)

The 2 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 .../pages/list-of-camel-quarkus-extensions.adoc    | 11 ++-
 extensions-jvm/{kudu => grpc}/deployment/pom.xml   |  8 +--
 .../component/grpc/deployment/GrpcProcessor.java}  |  8 +--
 .../grpc/integration-test}/pom.xml                 | 84 +++++++++++-----------
 .../quarkus/component/grpc/it/GrpcResource.java    | 28 +++++---
 .../camel/quarkus/component/grpc/it/GrpcRoute.java | 20 +++---
 .../quarkus/component/grpc/it/PingPongImpl.java    | 38 ++++++++++
 .../integration-test/src/main/proto/pingpong.proto | 50 +++++++++++++
 .../component/grpc/it/GrpcServerTestResource.java  | 41 +++++------
 .../camel/quarkus/component/grpc/it/GrpcTest.java  | 77 ++++++++++++++++++++
 extensions-jvm/{avro => grpc}/pom.xml              |  4 +-
 extensions-jvm/{aws2-cw => grpc}/runtime/pom.xml   | 10 +--
 .../main/resources/META-INF/quarkus-extension.yaml |  9 ++-
 extensions-jvm/pom.xml                             |  2 +
 .../{aws2-mq => protobuf}/deployment/pom.xml       |  8 +--
 .../protobuf/deployment/ProtobufProcessor.java}    |  9 ++-
 .../protobuf/integration-test}/pom.xml             | 75 +++++++++----------
 .../component/protobuf/it/ProtobufResource.java    | 43 +++++------
 .../component/protobuf/it/ProtobufRoute.java       | 18 ++---
 .../src/main/proto/addressbook.proto               | 38 ++++++++++
 .../component/protobuf/it/ProtobufTest.java        | 67 +++++++++++++++++
 extensions-jvm/{avro => protobuf}/pom.xml          |  4 +-
 .../{aws2-cw => protobuf}/runtime/pom.xml          | 10 +--
 .../main/resources/META-INF/quarkus-extension.yaml |  8 +--
 pom.xml                                            |  5 ++
 poms/bom-deployment/pom.xml                        | 10 +++
 poms/bom/pom.xml                                   | 20 ++++++
 poms/build-parent/pom.xml                          | 11 ++-
 28 files changed, 519 insertions(+), 197 deletions(-)
 copy extensions-jvm/{kudu => grpc}/deployment/pom.xml (92%)
 copy extensions-jvm/{avro/deployment/src/main/java/org/apache/camel/quarkus/component/avro/deployment/AvroProcessor.java => grpc/deployment/src/main/java/org/apache/camel/quarkus/component/grpc/deployment/GrpcProcessor.java} (89%)
 copy {integration-tests/hystrix => extensions-jvm/grpc/integration-test}/pom.xml (63%)
 copy integration-tests/stream/src/main/java/org/apache/camel/quarkus/component/stream/it/StreamResource.java => extensions-jvm/grpc/integration-test/src/main/java/org/apache/camel/quarkus/component/grpc/it/GrpcResource.java (58%)
 copy integration-tests/websocket-jsr356/src/main/java/org/apache/camel/quarkus/component/websocket/jsr356/it/WebSocketRoutes.java => extensions-jvm/grpc/integration-test/src/main/java/org/apache/camel/quarkus/component/grpc/it/GrpcRoute.java (57%)
 create mode 100644 extensions-jvm/grpc/integration-test/src/main/java/org/apache/camel/quarkus/component/grpc/it/PingPongImpl.java
 create mode 100644 extensions-jvm/grpc/integration-test/src/main/proto/pingpong.proto
 copy integration-tests/mongodb/src/test/java/org/apache/camel/quarkus/component/mongodb/it/MongoDbTestResource.java => extensions-jvm/grpc/integration-test/src/test/java/org/apache/camel/quarkus/component/grpc/it/GrpcServerTestResource.java (52%)
 create mode 100644 extensions-jvm/grpc/integration-test/src/test/java/org/apache/camel/quarkus/component/grpc/it/GrpcTest.java
 copy extensions-jvm/{avro => grpc}/pom.xml (94%)
 copy extensions-jvm/{aws2-cw => grpc}/runtime/pom.xml (89%)
 copy extensions-jvm/{avro => grpc}/runtime/src/main/resources/META-INF/quarkus-extension.yaml (81%)
 copy extensions-jvm/{aws2-mq => protobuf}/deployment/pom.xml (91%)
 copy extensions-jvm/{influxdb/deployment/src/main/java/org/apache/camel/quarkus/component/influxdb/deployment/InfluxdbProcessor.java => protobuf/deployment/src/main/java/org/apache/camel/quarkus/component/protobuf/deployment/ProtobufProcessor.java} (88%)
 copy {integration-tests/qute => extensions-jvm/protobuf/integration-test}/pom.xml (67%)
 copy integration-tests/base64/src/main/java/org/apache/camel/quarkus/component/base64/it/Base64Resource.java => extensions-jvm/protobuf/integration-test/src/main/java/org/apache/camel/quarkus/component/protobuf/it/ProtobufResource.java (56%)
 copy integration-tests/quartz/src/main/java/org/apache/camel/quarkus/component/quartz/it/QuartzRoutes.java => extensions-jvm/protobuf/integration-test/src/main/java/org/apache/camel/quarkus/component/protobuf/it/ProtobufRoute.java (68%)
 create mode 100644 extensions-jvm/protobuf/integration-test/src/main/proto/addressbook.proto
 create mode 100644 extensions-jvm/protobuf/integration-test/src/test/java/org/apache/camel/quarkus/component/protobuf/it/ProtobufTest.java
 copy extensions-jvm/{avro => protobuf}/pom.xml (93%)
 copy extensions-jvm/{aws2-cw => protobuf}/runtime/pom.xml (89%)
 copy extensions-jvm/{avro => protobuf}/runtime/src/main/resources/META-INF/quarkus-extension.yaml (79%)


[camel-quarkus] 02/02: Fix #965 gRPC support (JVM only)

Posted by pp...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

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

commit cfec419cc2abc19e740e0581bb38291cffb8e97b
Author: Peter Palaga <pp...@redhat.com>
AuthorDate: Wed Mar 25 14:19:35 2020 +0100

    Fix #965 gRPC support (JVM only)
---
 .../pages/list-of-camel-quarkus-extensions.adoc    |   6 +-
 extensions-jvm/grpc/deployment/pom.xml             |  75 ++++++++++++
 .../component/grpc/deployment/GrpcProcessor.java   |  46 +++++++
 extensions-jvm/grpc/integration-test/pom.xml       | 134 +++++++++++++++++++++
 .../quarkus/component/grpc/it/GrpcResource.java    |  54 +++++++++
 .../camel/quarkus/component/grpc/it/GrpcRoute.java |  37 ++++++
 .../quarkus/component/grpc/it/PingPongImpl.java    |  38 ++++++
 .../integration-test/src/main/proto/pingpong.proto |  50 ++++++++
 .../component/grpc/it/GrpcServerTestResource.java  |  57 +++++++++
 .../camel/quarkus/component/grpc/it/GrpcTest.java  |  77 ++++++++++++
 extensions-jvm/grpc/pom.xml                        |  40 ++++++
 extensions-jvm/grpc/runtime/pom.xml                |  83 +++++++++++++
 .../main/resources/META-INF/quarkus-extension.yaml |  28 +++++
 extensions-jvm/pom.xml                             |   1 +
 pom.xml                                            |   1 +
 poms/bom-deployment/pom.xml                        |   5 +
 poms/bom/pom.xml                                   |  10 ++
 17 files changed, 741 insertions(+), 1 deletion(-)

diff --git a/docs/modules/ROOT/pages/list-of-camel-quarkus-extensions.adoc b/docs/modules/ROOT/pages/list-of-camel-quarkus-extensions.adoc
index 5314620..b2c2c00 100644
--- a/docs/modules/ROOT/pages/list-of-camel-quarkus-extensions.adoc
+++ b/docs/modules/ROOT/pages/list-of-camel-quarkus-extensions.adoc
@@ -18,7 +18,7 @@ In case you are missing some Camel feature in the list:
 == Camel Components
 
 // components: START
-Number of Camel components: 143 in 108 JAR artifacts (0 deprecated)
+Number of Camel components: 144 in 109 JAR artifacts (0 deprecated)
 
 [width="100%",cols="4,1,1,5",options="header"]
 |===
@@ -305,6 +305,10 @@ Level | Since | Description
 `graphql:httpUri` | Native +
  Stable | 1.0.0-M5 | A Camel GraphQL Component
 
+| link:https://camel.apache.org/components/latest/grpc-component.html[gRPC] (camel-quarkus-grpc) +
+`grpc:host:port/service` | JVM +
+ Preview | 1.0.0-M6 | The gRPC component allows to call and expose remote procedures via HTTP/2 with protobuf dataformat
+
 | xref:extensions/http.adoc[HTTP] (camel-quarkus-http) +
 `http:httpUri` | Native +
  Stable | 1.0.0-M3 | For calling out to external HTTP servers using Apache HTTP Client 4.x.
diff --git a/extensions-jvm/grpc/deployment/pom.xml b/extensions-jvm/grpc/deployment/pom.xml
new file mode 100644
index 0000000..9a465dc
--- /dev/null
+++ b/extensions-jvm/grpc/deployment/pom.xml
@@ -0,0 +1,75 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+    Licensed to the Apache Software Foundation (ASF) under one or more
+    contributor license agreements.  See the NOTICE file distributed with
+    this work for additional information regarding copyright ownership.
+    The ASF licenses this file to You under the Apache License, Version 2.0
+    (the "License"); you may not use this file except in compliance with
+    the License.  You may obtain a copy of the License at
+
+         http://www.apache.org/licenses/LICENSE-2.0
+
+    Unless required by applicable law or agreed to in writing, software
+    distributed under the License is distributed on an "AS IS" BASIS,
+    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+    See the License for the specific language governing permissions and
+    limitations under the License.
+
+-->
+<project xmlns="http://maven.apache.org/POM/4.0.0"
+         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+    <modelVersion>4.0.0</modelVersion>
+    <parent>
+        <groupId>org.apache.camel.quarkus</groupId>
+        <artifactId>camel-quarkus-grpc-parent</artifactId>
+        <version>1.1.0-SNAPSHOT</version>
+        <relativePath>../pom.xml</relativePath>
+    </parent>
+
+    <artifactId>camel-quarkus-grpc-deployment</artifactId>
+    <name>Camel Quarkus :: gRPC :: Deployment</name>
+
+    <dependencyManagement>
+        <dependencies>
+            <dependency>
+                <groupId>org.apache.camel.quarkus</groupId>
+                <artifactId>camel-quarkus-bom-deployment</artifactId>
+                <version>${project.version}</version>
+                <type>pom</type>
+                <scope>import</scope>
+            </dependency>
+        </dependencies>
+    </dependencyManagement>
+
+    <dependencies>
+        <dependency>
+            <groupId>org.apache.camel.quarkus</groupId>
+            <artifactId>camel-quarkus-core-deployment</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.camel.quarkus</groupId>
+            <artifactId>camel-quarkus-grpc</artifactId>
+        </dependency>
+    </dependencies>
+
+    <build>
+        <plugins>
+            <plugin>
+                <groupId>org.apache.maven.plugins</groupId>
+                <artifactId>maven-compiler-plugin</artifactId>
+                <configuration>
+                    <annotationProcessorPaths>
+                        <path>
+                            <groupId>io.quarkus</groupId>
+                            <artifactId>quarkus-extension-processor</artifactId>
+                            <version>${quarkus.version}</version>
+                        </path>
+                    </annotationProcessorPaths>
+                </configuration>
+            </plugin>
+        </plugins>
+    </build>
+
+</project>
diff --git a/extensions-jvm/grpc/deployment/src/main/java/org/apache/camel/quarkus/component/grpc/deployment/GrpcProcessor.java b/extensions-jvm/grpc/deployment/src/main/java/org/apache/camel/quarkus/component/grpc/deployment/GrpcProcessor.java
new file mode 100644
index 0000000..0e1b125
--- /dev/null
+++ b/extensions-jvm/grpc/deployment/src/main/java/org/apache/camel/quarkus/component/grpc/deployment/GrpcProcessor.java
@@ -0,0 +1,46 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.camel.quarkus.component.grpc.deployment;
+
+import io.quarkus.deployment.annotations.BuildStep;
+import io.quarkus.deployment.annotations.ExecutionTime;
+import io.quarkus.deployment.annotations.Record;
+import io.quarkus.deployment.builditem.FeatureBuildItem;
+import io.quarkus.deployment.pkg.steps.NativeBuild;
+import org.apache.camel.quarkus.core.JvmOnlyRecorder;
+import org.jboss.logging.Logger;
+
+class GrpcProcessor {
+
+    private static final Logger LOG = Logger.getLogger(GrpcProcessor.class);
+    private static final String FEATURE = "camel-grpc";
+
+    @BuildStep
+    FeatureBuildItem feature() {
+        return new FeatureBuildItem(FEATURE);
+    }
+
+    /**
+     * Remove this once this extension starts supporting the native mode.
+     */
+    @BuildStep(onlyIf = NativeBuild.class)
+    @Record(value = ExecutionTime.RUNTIME_INIT)
+    void warnJvmInNative(JvmOnlyRecorder recorder) {
+        JvmOnlyRecorder.warnJvmInNative(LOG, FEATURE); // warn at build time
+        recorder.warnJvmInNative(FEATURE); // warn at runtime
+    }
+}
diff --git a/extensions-jvm/grpc/integration-test/pom.xml b/extensions-jvm/grpc/integration-test/pom.xml
new file mode 100644
index 0000000..36a9398
--- /dev/null
+++ b/extensions-jvm/grpc/integration-test/pom.xml
@@ -0,0 +1,134 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+    Licensed to the Apache Software Foundation (ASF) under one or more
+    contributor license agreements.  See the NOTICE file distributed with
+    this work for additional information regarding copyright ownership.
+    The ASF licenses this file to You under the Apache License, Version 2.0
+    (the "License"); you may not use this file except in compliance with
+    the License.  You may obtain a copy of the License at
+
+         http://www.apache.org/licenses/LICENSE-2.0
+
+    Unless required by applicable law or agreed to in writing, software
+    distributed under the License is distributed on an "AS IS" BASIS,
+    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+    See the License for the specific language governing permissions and
+    limitations under the License.
+
+-->
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+    xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+    <modelVersion>4.0.0</modelVersion>
+    <parent>
+        <groupId>org.apache.camel.quarkus</groupId>
+        <artifactId>camel-quarkus-grpc-parent</artifactId>
+        <version>1.1.0-SNAPSHOT</version>
+    </parent>
+
+    <artifactId>camel-quarkus-grpc-integration-test</artifactId>
+    <name>Camel Quarkus :: gRPC :: Integration Test</name>
+    <description>Integration tests for Camel Quarkus gRPC extension</description>
+
+    <properties>
+        <!-- mvnd, a.k.a. Maven Daemon: https://github.com/gnodet/mvnd -->
+        <!-- The following rule tells mvnd to build the listed deployment modules before this module. -->
+        <!-- This is important because mvnd builds modules in parallel by default. The deployment modules are not -->
+        <!-- explicit dependencies of this module in the Maven sense, although they are required by the Quarkus Maven plugin. -->
+        <!-- Please update rule whenever you change the dependencies of this module by running -->
+        <!--     mvn process-resources -Pformat    from the root directory -->
+        <mvnd.builder.rule>camel-quarkus-grpc-deployment,camel-quarkus-support-policy-deployment</mvnd.builder.rule>
+    </properties>
+
+    <dependencyManagement>
+        <dependencies>
+            <dependency>
+                <groupId>org.apache.camel.quarkus</groupId>
+                <artifactId>camel-quarkus-bom-test</artifactId>
+                <version>${project.version}</version>
+                <type>pom</type>
+                <scope>import</scope>
+            </dependency>
+        </dependencies>
+    </dependencyManagement>
+
+    <dependencies>
+        <dependency>
+            <groupId>org.apache.camel.quarkus</groupId>
+            <artifactId>camel-quarkus-grpc</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.camel.quarkus</groupId>
+            <artifactId>camel-quarkus-direct</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>io.quarkus</groupId>
+            <artifactId>quarkus-resteasy</artifactId>
+        </dependency>
+
+        <!-- test dependencies -->
+        <dependency>
+            <groupId>io.quarkus</groupId>
+            <artifactId>quarkus-junit5</artifactId>
+            <scope>test</scope>
+        </dependency>
+        <dependency>
+            <groupId>io.rest-assured</groupId>
+            <artifactId>rest-assured</artifactId>
+            <scope>test</scope>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.camel.quarkus</groupId>
+            <artifactId>camel-quarkus-integration-test-support</artifactId>
+            <scope>test</scope>
+        </dependency>
+    </dependencies>
+
+    <build>
+        <plugins>
+            <plugin>
+                <groupId>kr.motd.maven</groupId>
+                <artifactId>os-maven-plugin</artifactId>
+                <executions>
+                    <execution>
+                        <phase>initialize</phase>
+                        <goals>
+                            <goal>detect</goal>
+                        </goals>
+                    </execution>
+                </executions>
+            </plugin>
+            <plugin>
+                <groupId>org.xolstice.maven.plugins</groupId>
+                <artifactId>protobuf-maven-plugin</artifactId>
+                <extensions>true</extensions>
+                <executions>
+                    <execution>
+                        <goals>
+                            <goal>compile</goal>
+                            <goal>compile-custom</goal>
+                        </goals>
+                        <phase>generate-sources</phase>
+                        <configuration>
+                            <protocArtifact>com.google.protobuf:protoc:${protobuf.version}:exe:${os.detected.classifier}</protocArtifact>
+                            <pluginId>grpc-java</pluginId>
+                            <pluginArtifact>io.grpc:protoc-gen-grpc-java:${grpc.version}:exe:${os.detected.classifier}</pluginArtifact>
+                            <checkStaleness>true</checkStaleness>
+                        </configuration>
+                    </execution>
+                </executions>
+            </plugin>
+            <plugin>
+                <groupId>io.quarkus</groupId>
+                <artifactId>quarkus-maven-plugin</artifactId>
+                <executions>
+                    <execution>
+                        <goals>
+                            <goal>build</goal>
+                        </goals>
+                    </execution>
+                </executions>
+            </plugin>
+        </plugins>
+    </build>
+</project>
diff --git a/extensions-jvm/grpc/integration-test/src/main/java/org/apache/camel/quarkus/component/grpc/it/GrpcResource.java b/extensions-jvm/grpc/integration-test/src/main/java/org/apache/camel/quarkus/component/grpc/it/GrpcResource.java
new file mode 100644
index 0000000..38a4baa
--- /dev/null
+++ b/extensions-jvm/grpc/integration-test/src/main/java/org/apache/camel/quarkus/component/grpc/it/GrpcResource.java
@@ -0,0 +1,54 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.camel.quarkus.component.grpc.it;
+
+import javax.enterprise.context.ApplicationScoped;
+import javax.inject.Inject;
+import javax.ws.rs.Consumes;
+import javax.ws.rs.POST;
+import javax.ws.rs.Path;
+import javax.ws.rs.Produces;
+import javax.ws.rs.QueryParam;
+import javax.ws.rs.core.MediaType;
+
+import org.apache.camel.ProducerTemplate;
+import org.apache.camel.quarkus.component.grpc.it.model.PingRequest;
+import org.apache.camel.quarkus.component.grpc.it.model.PongResponse;
+
+@Path("/grpc")
+@ApplicationScoped
+public class GrpcResource {
+
+    @Inject
+    ProducerTemplate producerTemplate;
+
+    @Path("/producer")
+    @POST
+    @Consumes(MediaType.TEXT_PLAIN)
+    @Produces(MediaType.TEXT_PLAIN)
+    public String producer(String pingName, @QueryParam("pingId") int pingId) throws Exception {
+        final PingRequest pingRequest = PingRequest.newBuilder()
+                .setPingName(pingName)
+                .setPingId(pingId)
+                .build();
+        final PongResponse response = producerTemplate.requestBody(
+                "grpc://localhost:{{camel.grpc.test.server.port}}/org.apache.camel.quarkus.component.grpc.it.model.PingPong?method=pingSyncSync&synchronous=true",
+                pingRequest, PongResponse.class);
+        return response.getPongName();
+    }
+
+}
diff --git a/extensions-jvm/grpc/integration-test/src/main/java/org/apache/camel/quarkus/component/grpc/it/GrpcRoute.java b/extensions-jvm/grpc/integration-test/src/main/java/org/apache/camel/quarkus/component/grpc/it/GrpcRoute.java
new file mode 100644
index 0000000..fab0cb3
--- /dev/null
+++ b/extensions-jvm/grpc/integration-test/src/main/java/org/apache/camel/quarkus/component/grpc/it/GrpcRoute.java
@@ -0,0 +1,37 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.camel.quarkus.component.grpc.it;
+
+import org.apache.camel.Message;
+import org.apache.camel.builder.RouteBuilder;
+import org.apache.camel.quarkus.component.grpc.it.model.PingRequest;
+import org.apache.camel.quarkus.component.grpc.it.model.PongResponse;
+
+public class GrpcRoute extends RouteBuilder {
+
+    @Override
+    public void configure() throws Exception {
+        from("grpc://localhost:{{camel.grpc.consumer.port}}/org.apache.camel.quarkus.component.grpc.it.model.PingPong?synchronous=true")
+                .process(exchange -> {
+                    final Message message = exchange.getMessage();
+                    final PingRequest request = message.getBody(PingRequest.class);
+                    final PongResponse response = PongResponse.newBuilder().setPongName(request.getPingName() + " PONG")
+                            .setPongId(request.getPingId()).build();
+                    message.setBody(response);
+                });
+    }
+}
diff --git a/extensions-jvm/grpc/integration-test/src/main/java/org/apache/camel/quarkus/component/grpc/it/PingPongImpl.java b/extensions-jvm/grpc/integration-test/src/main/java/org/apache/camel/quarkus/component/grpc/it/PingPongImpl.java
new file mode 100644
index 0000000..db153ca
--- /dev/null
+++ b/extensions-jvm/grpc/integration-test/src/main/java/org/apache/camel/quarkus/component/grpc/it/PingPongImpl.java
@@ -0,0 +1,38 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.camel.quarkus.component.grpc.it;
+
+import io.grpc.stub.StreamObserver;
+import org.apache.camel.quarkus.component.grpc.it.model.PingRequest;
+import org.apache.camel.quarkus.component.grpc.it.model.PongResponse;
+import org.jboss.logging.Logger;
+
+public class PingPongImpl extends org.apache.camel.quarkus.component.grpc.it.model.PingPongGrpc.PingPongImplBase {
+    private static final Logger LOG = Logger.getLogger(PingPongImpl.class);
+    static final String GRPC_TEST_PONG_VALUE = "PONG";
+
+    @Override
+    public void pingSyncSync(PingRequest request, StreamObserver<PongResponse> responseObserver) {
+        LOG.infof("gRPC server received data from PingPong service PingId=%s PingName=%s", request.getPingId(),
+                request.getPingName());
+        PongResponse response = PongResponse.newBuilder().setPongName(request.getPingName() + GRPC_TEST_PONG_VALUE)
+                .setPongId(request.getPingId()).build();
+        responseObserver.onNext(response);
+        responseObserver.onCompleted();
+    }
+
+}
diff --git a/extensions-jvm/grpc/integration-test/src/main/proto/pingpong.proto b/extensions-jvm/grpc/integration-test/src/main/proto/pingpong.proto
new file mode 100644
index 0000000..459a3b3
--- /dev/null
+++ b/extensions-jvm/grpc/integration-test/src/main/proto/pingpong.proto
@@ -0,0 +1,50 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+syntax = "proto3";
+
+option java_multiple_files = true;
+option java_package = "org.apache.camel.quarkus.component.grpc.it.model";
+option java_outer_classname = "PingPongProto";
+
+package org.apache.camel.quarkus.component.grpc.it.model;
+
+// The PingPong service definition.
+service PingPong {
+  // Sending ping message and getting pong answer synchronously
+  rpc PingSyncSync (PingRequest) returns (PongResponse) {}
+
+  // Sending ping message synchronously and getting pong answer asynchronously in streaming mode (multiple response messages)
+  rpc PingSyncAsync (PingRequest) returns (stream PongResponse) {}
+
+  // Sending ping message asynchronously and getting pong answer synchronously
+  rpc PingAsyncSync (stream PingRequest) returns (PongResponse) {}
+
+  // Sending ping message asynchronously and getting pong answer asynchronously in streaming mode (multiple response messages)
+  rpc PingAsyncAsync (stream PingRequest) returns (stream PongResponse) {}
+}
+
+// The ping request message
+message PingRequest {
+  string ping_name = 1;
+  int32  ping_id   = 2;
+}
+
+// The pong response message
+message PongResponse {
+  string pong_name = 1;
+  int32  pong_id   = 2;
+}
\ No newline at end of file
diff --git a/extensions-jvm/grpc/integration-test/src/test/java/org/apache/camel/quarkus/component/grpc/it/GrpcServerTestResource.java b/extensions-jvm/grpc/integration-test/src/test/java/org/apache/camel/quarkus/component/grpc/it/GrpcServerTestResource.java
new file mode 100644
index 0000000..c647fd2
--- /dev/null
+++ b/extensions-jvm/grpc/integration-test/src/test/java/org/apache/camel/quarkus/component/grpc/it/GrpcServerTestResource.java
@@ -0,0 +1,57 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.camel.quarkus.component.grpc.it;
+
+import java.util.Map;
+
+import io.grpc.Server;
+import io.grpc.ServerBuilder;
+import io.quarkus.test.common.QuarkusTestResourceLifecycleManager;
+import org.apache.camel.quarkus.test.AvailablePortFinder;
+import org.apache.camel.util.CollectionHelper;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+public class GrpcServerTestResource implements QuarkusTestResourceLifecycleManager {
+    private static final Logger LOGGER = LoggerFactory.getLogger(GrpcServerTestResource.class);
+    private Server grpcServer;
+
+    @Override
+    public Map<String, String> start() {
+        try {
+            final int port = AvailablePortFinder.getNextAvailable();
+            grpcServer = ServerBuilder.forPort(port).addService(new PingPongImpl()).build().start();
+            return CollectionHelper.mapOf(
+                    "camel.grpc.test.server.port", String.valueOf(port),
+                    "camel.grpc.consumer.port", String.valueOf(AvailablePortFinder.getNextAvailable()));
+        } catch (Exception e) {
+            throw new RuntimeException("Could not start gRPC server", e);
+        }
+    }
+
+    @Override
+    public void stop() {
+        try {
+            if (grpcServer != null) {
+                grpcServer.shutdown();
+            }
+        } catch (Exception e) {
+            LOGGER.error("Could not stop gRPC server", e);
+        }
+    }
+}
diff --git a/extensions-jvm/grpc/integration-test/src/test/java/org/apache/camel/quarkus/component/grpc/it/GrpcTest.java b/extensions-jvm/grpc/integration-test/src/test/java/org/apache/camel/quarkus/component/grpc/it/GrpcTest.java
new file mode 100644
index 0000000..ab5b708
--- /dev/null
+++ b/extensions-jvm/grpc/integration-test/src/test/java/org/apache/camel/quarkus/component/grpc/it/GrpcTest.java
@@ -0,0 +1,77 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.camel.quarkus.component.grpc.it;
+
+import io.grpc.ManagedChannel;
+import io.grpc.ManagedChannelBuilder;
+import io.quarkus.test.common.QuarkusTestResource;
+import io.quarkus.test.junit.QuarkusTest;
+import io.restassured.RestAssured;
+import org.apache.camel.quarkus.component.grpc.it.model.PingPongGrpc;
+import org.apache.camel.quarkus.component.grpc.it.model.PingPongGrpc.PingPongBlockingStub;
+import org.apache.camel.quarkus.component.grpc.it.model.PingRequest;
+import org.apache.camel.quarkus.component.grpc.it.model.PongResponse;
+import org.eclipse.microprofile.config.inject.ConfigProperty;
+import org.junit.jupiter.api.Assertions;
+import org.junit.jupiter.api.Test;
+
+import static org.hamcrest.Matchers.equalTo;
+
+@QuarkusTest
+@QuarkusTestResource(GrpcServerTestResource.class)
+class GrpcTest {
+
+    @ConfigProperty(name = "camel.grpc.consumer.port")
+    int consumerPort;
+
+    @Test
+    public void consumer() {
+        ManagedChannel syncRequestChannel = null;
+        try {
+            syncRequestChannel = ManagedChannelBuilder.forAddress("localhost", consumerPort).usePlaintext().build();
+            final PingPongBlockingStub blockingStub = PingPongGrpc.newBlockingStub(syncRequestChannel);
+
+            final PingRequest pingRequest = PingRequest.newBuilder()
+                    .setPingName("foo")
+                    .setPingId(567)
+                    .build();
+            final PongResponse pongResponse = blockingStub.pingSyncSync(pingRequest);
+            Assertions.assertNotNull(pongResponse);
+            Assertions.assertEquals(567, pongResponse.getPongId());
+            Assertions.assertEquals("foo PONG", pongResponse.getPongName());
+        } finally {
+            if (syncRequestChannel != null) {
+                syncRequestChannel.shutdownNow();
+            }
+        }
+    }
+
+    @Test
+    public void producer() {
+        int id = 1234;
+        RestAssured.given()
+                .contentType("text/plain")
+                .queryParam("pingId", id)
+                .body("PING")
+                .post("/grpc/producer")
+                .then()
+                .statusCode(200)
+                .body(equalTo("PINGPONG"));
+
+    }
+
+}
diff --git a/extensions-jvm/grpc/pom.xml b/extensions-jvm/grpc/pom.xml
new file mode 100644
index 0000000..279c83d
--- /dev/null
+++ b/extensions-jvm/grpc/pom.xml
@@ -0,0 +1,40 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+    Licensed to the Apache Software Foundation (ASF) under one or more
+    contributor license agreements.  See the NOTICE file distributed with
+    this work for additional information regarding copyright ownership.
+    The ASF licenses this file to You under the Apache License, Version 2.0
+    (the "License"); you may not use this file except in compliance with
+    the License.  You may obtain a copy of the License at
+
+         http://www.apache.org/licenses/LICENSE-2.0
+
+    Unless required by applicable law or agreed to in writing, software
+    distributed under the License is distributed on an "AS IS" BASIS,
+    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+    See the License for the specific language governing permissions and
+    limitations under the License.
+
+-->
+<project xmlns="http://maven.apache.org/POM/4.0.0"
+         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+    <modelVersion>4.0.0</modelVersion>
+    <parent>
+        <groupId>org.apache.camel.quarkus</groupId>
+        <artifactId>camel-quarkus-build-parent</artifactId>
+        <version>1.1.0-SNAPSHOT</version>
+        <relativePath>../../poms/build-parent/pom.xml</relativePath>
+    </parent>
+
+    <artifactId>camel-quarkus-grpc-parent</artifactId>
+    <name>Camel Quarkus :: gRPC</name>
+    <packaging>pom</packaging>
+
+    <modules>
+        <module>deployment</module>
+        <module>runtime</module>
+        <module>integration-test</module>
+    </modules>
+</project>
diff --git a/extensions-jvm/grpc/runtime/pom.xml b/extensions-jvm/grpc/runtime/pom.xml
new file mode 100644
index 0000000..37f95c7
--- /dev/null
+++ b/extensions-jvm/grpc/runtime/pom.xml
@@ -0,0 +1,83 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+    Licensed to the Apache Software Foundation (ASF) under one or more
+    contributor license agreements.  See the NOTICE file distributed with
+    this work for additional information regarding copyright ownership.
+    The ASF licenses this file to You under the Apache License, Version 2.0
+    (the "License"); you may not use this file except in compliance with
+    the License.  You may obtain a copy of the License at
+
+         http://www.apache.org/licenses/LICENSE-2.0
+
+    Unless required by applicable law or agreed to in writing, software
+    distributed under the License is distributed on an "AS IS" BASIS,
+    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+    See the License for the specific language governing permissions and
+    limitations under the License.
+
+-->
+<project xmlns="http://maven.apache.org/POM/4.0.0"
+         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+    <modelVersion>4.0.0</modelVersion>
+    <parent>
+        <groupId>org.apache.camel.quarkus</groupId>
+        <artifactId>camel-quarkus-grpc-parent</artifactId>
+        <version>1.1.0-SNAPSHOT</version>
+        <relativePath>../pom.xml</relativePath>
+    </parent>
+
+    <artifactId>camel-quarkus-grpc</artifactId>
+    <name>Camel Quarkus :: gRPC :: Runtime</name>
+    <description>The gRPC component allows to call and expose remote procedures via HTTP/2 with protobuf dataformat</description>
+
+    <properties>
+        <firstVersion>1.0.0-M6</firstVersion>
+    </properties>
+
+    <dependencyManagement>
+        <dependencies>
+            <dependency>
+                <groupId>org.apache.camel.quarkus</groupId>
+                <artifactId>camel-quarkus-bom</artifactId>
+                <version>${project.version}</version>
+                <type>pom</type>
+                <scope>import</scope>
+            </dependency>
+        </dependencies>
+    </dependencyManagement>
+
+    <dependencies>
+        <dependency>
+            <groupId>org.apache.camel.quarkus</groupId>
+            <artifactId>camel-quarkus-core</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.camel</groupId>
+            <artifactId>camel-grpc</artifactId>
+        </dependency>
+    </dependencies>
+
+    <build>
+        <plugins>
+            <plugin>
+                <groupId>io.quarkus</groupId>
+                <artifactId>quarkus-bootstrap-maven-plugin</artifactId>
+            </plugin>
+            <plugin>
+                <groupId>org.apache.maven.plugins</groupId>
+                <artifactId>maven-compiler-plugin</artifactId>
+                <configuration>
+                    <annotationProcessorPaths>
+                        <path>
+                            <groupId>io.quarkus</groupId>
+                            <artifactId>quarkus-extension-processor</artifactId>
+                            <version>${quarkus.version}</version>
+                        </path>
+                    </annotationProcessorPaths>
+                </configuration>
+            </plugin>
+        </plugins>
+    </build>
+</project>
diff --git a/extensions-jvm/grpc/runtime/src/main/resources/META-INF/quarkus-extension.yaml b/extensions-jvm/grpc/runtime/src/main/resources/META-INF/quarkus-extension.yaml
new file mode 100644
index 0000000..b0a452b
--- /dev/null
+++ b/extensions-jvm/grpc/runtime/src/main/resources/META-INF/quarkus-extension.yaml
@@ -0,0 +1,28 @@
+#
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License.  You may obtain a copy of the License at
+#
+#      http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+
+---
+name: "gRPC"
+description: "The gRPC component allows to call and expose remote procedures via HTTP/2 with protobuf dataformat"
+metadata:
+  unlisted: true
+  keywords:
+  - "rpc"
+  guide: "https://camel.apache.org/components/latest/grpc-component.html"
+  categories:
+  - "integration"
+  status: "preview"
diff --git a/extensions-jvm/pom.xml b/extensions-jvm/pom.xml
index 212a060..f0c16ed 100644
--- a/extensions-jvm/pom.xml
+++ b/extensions-jvm/pom.xml
@@ -60,6 +60,7 @@
         <module>elasticsearch-rest</module>
         <module>google-bigquery</module>
         <module>groovy</module>
+        <module>grpc</module>
         <module>influxdb</module>
         <module>kubernetes</module>
         <module>kudu</module>
diff --git a/pom.xml b/pom.xml
index 86dd028..86b2a96 100644
--- a/pom.xml
+++ b/pom.xml
@@ -49,6 +49,7 @@
         <freemarker.version>2.3.30</freemarker.version>
         <google-http-client.version>1.22.0</google-http-client.version>
         <guava.version>26.0-jre</guava.version>
+        <grpc.version>1.27.0</grpc.version>
         <gson.version>2.8.5</gson.version>
         <hapi.version>4.1.0</hapi.version>
         <httpclient.cache.version>4.5.5</httpclient.cache.version>
diff --git a/poms/bom-deployment/pom.xml b/poms/bom-deployment/pom.xml
index a716239..86b4f43 100644
--- a/poms/bom-deployment/pom.xml
+++ b/poms/bom-deployment/pom.xml
@@ -424,6 +424,11 @@
             </dependency>
             <dependency>
                 <groupId>org.apache.camel.quarkus</groupId>
+                <artifactId>camel-quarkus-grpc-deployment</artifactId>
+                <version>${camel-quarkus.version}</version>
+            </dependency>
+            <dependency>
+                <groupId>org.apache.camel.quarkus</groupId>
                 <artifactId>camel-quarkus-gson-deployment</artifactId>
                 <version>${camel-quarkus.version}</version>
             </dependency>
diff --git a/poms/bom/pom.xml b/poms/bom/pom.xml
index a3dfaf5..68a49b7 100644
--- a/poms/bom/pom.xml
+++ b/poms/bom/pom.xml
@@ -489,6 +489,11 @@
             </dependency>
             <dependency>
                 <groupId>org.apache.camel</groupId>
+                <artifactId>camel-grpc</artifactId>
+                <version>${camel.version}</version>
+            </dependency>
+            <dependency>
+                <groupId>org.apache.camel</groupId>
                 <artifactId>camel-gson</artifactId>
                 <version>${camel.version}</version>
             </dependency>
@@ -1359,6 +1364,11 @@
             </dependency>
             <dependency>
                 <groupId>org.apache.camel.quarkus</groupId>
+                <artifactId>camel-quarkus-grpc</artifactId>
+                <version>${camel-quarkus.version}</version>
+            </dependency>
+            <dependency>
+                <groupId>org.apache.camel.quarkus</groupId>
                 <artifactId>camel-quarkus-gson</artifactId>
                 <version>${camel-quarkus.version}</version>
             </dependency>


[camel-quarkus] 01/02: Fix #964 Protobuf dataformat support (JVM only)

Posted by pp...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

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

commit dcb610a26e22fc9aed199cc264159238d1f6b812
Author: Peter Palaga <pp...@redhat.com>
AuthorDate: Tue Mar 24 12:15:10 2020 +0100

    Fix #964 Protobuf dataformat support (JVM only)
---
 .../pages/list-of-camel-quarkus-extensions.adoc    |   5 +-
 extensions-jvm/pom.xml                             |   1 +
 extensions-jvm/protobuf/deployment/pom.xml         |  75 ++++++++++++
 .../protobuf/deployment/ProtobufProcessor.java     |  46 ++++++++
 extensions-jvm/protobuf/integration-test/pom.xml   | 129 +++++++++++++++++++++
 .../component/protobuf/it/ProtobufResource.java    |  59 ++++++++++
 .../component/protobuf/it/ProtobufRoute.java       |  35 ++++++
 .../src/main/proto/addressbook.proto               |  38 ++++++
 .../component/protobuf/it/ProtobufTest.java        |  67 +++++++++++
 extensions-jvm/protobuf/pom.xml                    |  40 +++++++
 extensions-jvm/protobuf/runtime/pom.xml            |  83 +++++++++++++
 .../main/resources/META-INF/quarkus-extension.yaml |  29 +++++
 pom.xml                                            |   4 +
 poms/bom-deployment/pom.xml                        |   5 +
 poms/bom/pom.xml                                   |  10 ++
 poms/build-parent/pom.xml                          |  11 +-
 16 files changed, 635 insertions(+), 2 deletions(-)

diff --git a/docs/modules/ROOT/pages/list-of-camel-quarkus-extensions.adoc b/docs/modules/ROOT/pages/list-of-camel-quarkus-extensions.adoc
index 1967641..5314620 100644
--- a/docs/modules/ROOT/pages/list-of-camel-quarkus-extensions.adoc
+++ b/docs/modules/ROOT/pages/list-of-camel-quarkus-extensions.adoc
@@ -603,7 +603,7 @@ Level | Since | Description
 == Camel Data Formats
 
 // dataformats: START
-Number of Camel data formats: 25 in 20 JAR artifacts (0 deprecated)
+Number of Camel data formats: 26 in 21 JAR artifacts (0 deprecated)
 
 [width="100%",cols="4,1,1,5",options="header"]
 |===
@@ -664,6 +664,9 @@ Level | Since | Description
 | link:https://camel.apache.org/components/latest/mime-multipart-dataformat.html[MIME Multipart] (camel-quarkus-mail) | Native +
  Stable | 0.2.0 | The MIME Multipart data format is used for marshalling Camel messages with attachments into MIME-Multipart message, and vise-versa.
 
+| link:https://camel.apache.org/components/latest/protobuf-dataformat.html[Protobuf] (camel-quarkus-protobuf) | JVM +
+ Preview | 1.0.0-M6 | The Protobuf data format is used for serializing between Java objects and the Google Protobuf protocol.
+
 | link:https://camel.apache.org/components/latest/soapjaxb-dataformat.html[SOAP] (camel-quarkus-soap) | Native +
  Stable | 1.0.0-M5 | SOAP is a data format which uses JAXB2 and JAX-WS annotations to marshal and unmarshal SOAP payloads.
 
diff --git a/extensions-jvm/pom.xml b/extensions-jvm/pom.xml
index ded5ca0..212a060 100644
--- a/extensions-jvm/pom.xml
+++ b/extensions-jvm/pom.xml
@@ -67,6 +67,7 @@
         <module>nitrite</module>
         <module>ognl</module>
         <module>openstack</module>
+        <module>protobuf</module>
         <module>pubnub</module>
         <module>rabbitmq</module>
         <module>sap-netweaver</module>
diff --git a/extensions-jvm/protobuf/deployment/pom.xml b/extensions-jvm/protobuf/deployment/pom.xml
new file mode 100644
index 0000000..d4b0a6a
--- /dev/null
+++ b/extensions-jvm/protobuf/deployment/pom.xml
@@ -0,0 +1,75 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+    Licensed to the Apache Software Foundation (ASF) under one or more
+    contributor license agreements.  See the NOTICE file distributed with
+    this work for additional information regarding copyright ownership.
+    The ASF licenses this file to You under the Apache License, Version 2.0
+    (the "License"); you may not use this file except in compliance with
+    the License.  You may obtain a copy of the License at
+
+         http://www.apache.org/licenses/LICENSE-2.0
+
+    Unless required by applicable law or agreed to in writing, software
+    distributed under the License is distributed on an "AS IS" BASIS,
+    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+    See the License for the specific language governing permissions and
+    limitations under the License.
+
+-->
+<project xmlns="http://maven.apache.org/POM/4.0.0"
+         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+    <modelVersion>4.0.0</modelVersion>
+    <parent>
+        <groupId>org.apache.camel.quarkus</groupId>
+        <artifactId>camel-quarkus-protobuf-parent</artifactId>
+        <version>1.1.0-SNAPSHOT</version>
+        <relativePath>../pom.xml</relativePath>
+    </parent>
+
+    <artifactId>camel-quarkus-protobuf-deployment</artifactId>
+    <name>Camel Quarkus :: Protobuf :: Deployment</name>
+
+    <dependencyManagement>
+        <dependencies>
+            <dependency>
+                <groupId>org.apache.camel.quarkus</groupId>
+                <artifactId>camel-quarkus-bom-deployment</artifactId>
+                <version>${project.version}</version>
+                <type>pom</type>
+                <scope>import</scope>
+            </dependency>
+        </dependencies>
+    </dependencyManagement>
+
+    <dependencies>
+        <dependency>
+            <groupId>org.apache.camel.quarkus</groupId>
+            <artifactId>camel-quarkus-core-deployment</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.camel.quarkus</groupId>
+            <artifactId>camel-quarkus-protobuf</artifactId>
+        </dependency>
+    </dependencies>
+
+    <build>
+        <plugins>
+            <plugin>
+                <groupId>org.apache.maven.plugins</groupId>
+                <artifactId>maven-compiler-plugin</artifactId>
+                <configuration>
+                    <annotationProcessorPaths>
+                        <path>
+                            <groupId>io.quarkus</groupId>
+                            <artifactId>quarkus-extension-processor</artifactId>
+                            <version>${quarkus.version}</version>
+                        </path>
+                    </annotationProcessorPaths>
+                </configuration>
+            </plugin>
+        </plugins>
+    </build>
+
+</project>
diff --git a/extensions-jvm/protobuf/deployment/src/main/java/org/apache/camel/quarkus/component/protobuf/deployment/ProtobufProcessor.java b/extensions-jvm/protobuf/deployment/src/main/java/org/apache/camel/quarkus/component/protobuf/deployment/ProtobufProcessor.java
new file mode 100644
index 0000000..0d0e1ae
--- /dev/null
+++ b/extensions-jvm/protobuf/deployment/src/main/java/org/apache/camel/quarkus/component/protobuf/deployment/ProtobufProcessor.java
@@ -0,0 +1,46 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.camel.quarkus.component.protobuf.deployment;
+
+import io.quarkus.deployment.annotations.BuildStep;
+import io.quarkus.deployment.annotations.ExecutionTime;
+import io.quarkus.deployment.annotations.Record;
+import io.quarkus.deployment.builditem.FeatureBuildItem;
+import io.quarkus.deployment.pkg.steps.NativeBuild;
+import org.apache.camel.quarkus.core.JvmOnlyRecorder;
+import org.jboss.logging.Logger;
+
+class ProtobufProcessor {
+
+    private static final Logger LOG = Logger.getLogger(ProtobufProcessor.class);
+    private static final String FEATURE = "camel-protobuf";
+
+    @BuildStep
+    FeatureBuildItem feature() {
+        return new FeatureBuildItem(FEATURE);
+    }
+
+    /**
+     * Remove this once this extension starts supporting the native mode.
+     */
+    @BuildStep(onlyIf = NativeBuild.class)
+    @Record(value = ExecutionTime.RUNTIME_INIT)
+    void warnJvmInNative(JvmOnlyRecorder recorder) {
+        JvmOnlyRecorder.warnJvmInNative(LOG, FEATURE); // warn at build time
+        recorder.warnJvmInNative(FEATURE); // warn at runtime
+    }
+}
diff --git a/extensions-jvm/protobuf/integration-test/pom.xml b/extensions-jvm/protobuf/integration-test/pom.xml
new file mode 100644
index 0000000..eb303bd
--- /dev/null
+++ b/extensions-jvm/protobuf/integration-test/pom.xml
@@ -0,0 +1,129 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+    Licensed to the Apache Software Foundation (ASF) under one or more
+    contributor license agreements.  See the NOTICE file distributed with
+    this work for additional information regarding copyright ownership.
+    The ASF licenses this file to You under the Apache License, Version 2.0
+    (the "License"); you may not use this file except in compliance with
+    the License.  You may obtain a copy of the License at
+
+         http://www.apache.org/licenses/LICENSE-2.0
+
+    Unless required by applicable law or agreed to in writing, software
+    distributed under the License is distributed on an "AS IS" BASIS,
+    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+    See the License for the specific language governing permissions and
+    limitations under the License.
+
+-->
+<project xmlns="http://maven.apache.org/POM/4.0.0"
+         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+    <modelVersion>4.0.0</modelVersion>
+    <parent>
+        <groupId>org.apache.camel.quarkus</groupId>
+        <artifactId>camel-quarkus-protobuf-parent</artifactId>
+        <version>1.1.0-SNAPSHOT</version>
+    </parent>
+
+    <artifactId>camel-quarkus-protobuf-integration-test</artifactId>
+    <name>Camel Quarkus :: Protobuf :: Integration Test</name>
+    <description>Integration tests for Camel Quarkus Protobuf extension</description>
+
+    <properties>
+        <!-- mvnd, a.k.a. Maven Daemon: https://github.com/gnodet/mvnd -->
+        <!-- The following rule tells mvnd to build the listed deployment modules before this module. -->
+        <!-- This is important because mvnd builds modules in parallel by default. The deployment modules are not -->
+        <!-- explicit dependencies of this module in the Maven sense, although they are required by the Quarkus Maven plugin. -->
+        <!-- Please update rule whenever you change the dependencies of this module by running -->
+        <!--     mvn process-resources -Pformat    from the root directory -->
+        <mvnd.builder.rule>camel-quarkus-protobuf-deployment,camel-quarkus-support-policy-deployment</mvnd.builder.rule>
+    </properties>
+
+    <dependencyManagement>
+        <dependencies>
+            <dependency>
+                <groupId>org.apache.camel.quarkus</groupId>
+                <artifactId>camel-quarkus-bom-test</artifactId>
+                <version>${project.version}</version>
+                <type>pom</type>
+                <scope>import</scope>
+            </dependency>
+        </dependencies>
+    </dependencyManagement>
+
+    <dependencies>
+        <dependency>
+            <groupId>org.apache.camel.quarkus</groupId>
+            <artifactId>camel-quarkus-protobuf</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.camel.quarkus</groupId>
+            <artifactId>camel-quarkus-direct</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>io.quarkus</groupId>
+            <artifactId>quarkus-resteasy</artifactId>
+        </dependency>
+
+        <!-- test dependencies -->
+        <dependency>
+            <groupId>io.quarkus</groupId>
+            <artifactId>quarkus-junit5</artifactId>
+            <scope>test</scope>
+        </dependency>
+        <dependency>
+            <groupId>io.rest-assured</groupId>
+            <artifactId>rest-assured</artifactId>
+            <scope>test</scope>
+        </dependency>
+    </dependencies>
+
+    <build>
+        <plugins>
+            <plugin>
+                <groupId>kr.motd.maven</groupId>
+                <artifactId>os-maven-plugin</artifactId>
+                <executions>
+                    <execution>
+                        <phase>initialize</phase>
+                        <goals>
+                            <goal>detect</goal>
+                        </goals>
+                    </execution>
+                </executions>
+            </plugin>
+            <plugin>
+                <groupId>org.xolstice.maven.plugins</groupId>
+                <artifactId>protobuf-maven-plugin</artifactId>
+                <extensions>true</extensions>
+                <executions>
+                    <execution>
+                        <goals>
+                            <goal>compile</goal>
+                        </goals>
+                        <phase>generate-sources</phase>
+                        <configuration>
+                            <protocArtifact>
+                                com.google.protobuf:protoc:${protobuf.version}:exe:${os.detected.classifier}
+                            </protocArtifact>
+                            <checkStaleness>true</checkStaleness>
+                        </configuration>
+                    </execution>
+                </executions>
+            </plugin>
+            <plugin>
+                <groupId>io.quarkus</groupId>
+                <artifactId>quarkus-maven-plugin</artifactId>
+                <executions>
+                    <execution>
+                        <goals>
+                            <goal>build</goal>
+                        </goals>
+                    </execution>
+                </executions>
+            </plugin>
+        </plugins>
+    </build>
+</project>
diff --git a/extensions-jvm/protobuf/integration-test/src/main/java/org/apache/camel/quarkus/component/protobuf/it/ProtobufResource.java b/extensions-jvm/protobuf/integration-test/src/main/java/org/apache/camel/quarkus/component/protobuf/it/ProtobufResource.java
new file mode 100644
index 0000000..3cc02a5
--- /dev/null
+++ b/extensions-jvm/protobuf/integration-test/src/main/java/org/apache/camel/quarkus/component/protobuf/it/ProtobufResource.java
@@ -0,0 +1,59 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.camel.quarkus.component.protobuf.it;
+
+import javax.enterprise.context.ApplicationScoped;
+import javax.inject.Inject;
+import javax.ws.rs.Consumes;
+import javax.ws.rs.GET;
+import javax.ws.rs.POST;
+import javax.ws.rs.Path;
+import javax.ws.rs.Produces;
+import javax.ws.rs.QueryParam;
+import javax.ws.rs.core.MediaType;
+
+import org.apache.camel.ProducerTemplate;
+import org.apache.camel.quarkus.component.protobuf.it.model.AddressBookProtos.Person;
+
+@Path("/protobuf")
+@ApplicationScoped
+public class ProtobufResource {
+
+    @Inject
+    ProducerTemplate producerTemplate;
+
+    @Path("/marshal")
+    @GET
+    @Produces(MediaType.APPLICATION_OCTET_STREAM)
+    public byte[] xstreamXmlMarshal(@QueryParam("id") int id, @QueryParam("name") String name) {
+        final Person person = Person.newBuilder()
+                .setId(id)
+                .setName(name)
+                .build();
+        return producerTemplate.requestBody("direct:protobuf-marshal", person, byte[].class);
+    }
+
+    @Path("/unmarshal")
+    @POST
+    @Consumes(MediaType.APPLICATION_OCTET_STREAM)
+    @Produces(MediaType.APPLICATION_JSON)
+    public String unmarshal(byte[] body) {
+        final Person person = producerTemplate.requestBody("direct:protobuf-unmarshal", body, Person.class);
+        return "{\"name\": \"" + person.getName() + "\",\"id\": " + person.getId() + "}";
+    }
+
+}
diff --git a/extensions-jvm/protobuf/integration-test/src/main/java/org/apache/camel/quarkus/component/protobuf/it/ProtobufRoute.java b/extensions-jvm/protobuf/integration-test/src/main/java/org/apache/camel/quarkus/component/protobuf/it/ProtobufRoute.java
new file mode 100644
index 0000000..f74d60e
--- /dev/null
+++ b/extensions-jvm/protobuf/integration-test/src/main/java/org/apache/camel/quarkus/component/protobuf/it/ProtobufRoute.java
@@ -0,0 +1,35 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.camel.quarkus.component.protobuf.it;
+
+import org.apache.camel.builder.RouteBuilder;
+import org.apache.camel.quarkus.component.protobuf.it.model.AddressBookProtos.Person;
+
+public class ProtobufRoute extends RouteBuilder {
+
+    @Override
+    public void configure() throws Exception {
+        from("direct:protobuf-marshal")
+                .marshal()
+                .protobuf(Person.class.getName());
+
+        from("direct:protobuf-unmarshal")
+                .unmarshal()
+                .protobuf(Person.class.getName());
+
+    }
+}
diff --git a/extensions-jvm/protobuf/integration-test/src/main/proto/addressbook.proto b/extensions-jvm/protobuf/integration-test/src/main/proto/addressbook.proto
new file mode 100644
index 0000000..b753665
--- /dev/null
+++ b/extensions-jvm/protobuf/integration-test/src/main/proto/addressbook.proto
@@ -0,0 +1,38 @@
+syntax = "proto2";
+
+package org.apache.camel.quarkus.component.protobuf.it.model;
+
+option java_package = "org.apache.camel.quarkus.component.protobuf.it.model";
+option java_outer_classname = "AddressBookProtos";
+
+message Person {
+  required string name = 1;
+  required int32 id = 2;
+  optional string email = 3;
+
+  enum PhoneType {
+    MOBILE = 0;
+    HOME = 1;
+    WORK = 2;
+  }
+
+  message PhoneNumber {
+    required string number = 1;
+    required PhoneType type = 2 [default = HOME];
+  }
+
+  repeated PhoneNumber phone = 4;
+  repeated string nicknames = 5;
+
+  message Address {
+     optional string street = 1;
+     optional int32 street_number = 2;
+     optional bool is_valid = 3;
+  }
+
+  optional Address address = 6;
+}
+
+message AddressBook {
+  repeated Person person = 1;
+}
\ No newline at end of file
diff --git a/extensions-jvm/protobuf/integration-test/src/test/java/org/apache/camel/quarkus/component/protobuf/it/ProtobufTest.java b/extensions-jvm/protobuf/integration-test/src/test/java/org/apache/camel/quarkus/component/protobuf/it/ProtobufTest.java
new file mode 100644
index 0000000..8a019b6
--- /dev/null
+++ b/extensions-jvm/protobuf/integration-test/src/test/java/org/apache/camel/quarkus/component/protobuf/it/ProtobufTest.java
@@ -0,0 +1,67 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.camel.quarkus.component.protobuf.it;
+
+import io.quarkus.test.junit.QuarkusTest;
+import io.restassured.RestAssured;
+import org.apache.camel.quarkus.component.protobuf.it.model.AddressBookProtos.Person;
+import org.junit.jupiter.api.Assertions;
+import org.junit.jupiter.api.Test;
+
+import static org.hamcrest.Matchers.equalTo;
+
+@QuarkusTest
+class ProtobufTest {
+    final static int id = 2345;
+    final static String name = "Joe";
+    final static String json = "{\"name\": \"" + name + "\",\"id\": " + id + "}";
+    final static Person person = Person.newBuilder()
+            .setId(id)
+            .setName(name)
+            .build();
+    final static byte[] protobuf = person.toByteArray();
+
+    @Test
+    void marshal() {
+
+        final byte[] actual = RestAssured.given()
+                .contentType("application/json")
+                .queryParam("name", name)
+                .queryParam("id", id)
+                .get("/protobuf/marshal")
+                .then()
+                .statusCode(200)
+                .extract()
+                .body()
+                .asByteArray();
+
+        Assertions.assertArrayEquals(protobuf, actual);
+    }
+
+    @Test
+    void unmarshal() {
+
+        RestAssured.given()
+                .contentType("application/octet-stream")
+                .body(protobuf)
+                .post("/protobuf/unmarshal")
+                .then()
+                .statusCode(200)
+                .body(equalTo(json));
+
+    }
+}
diff --git a/extensions-jvm/protobuf/pom.xml b/extensions-jvm/protobuf/pom.xml
new file mode 100644
index 0000000..75df618
--- /dev/null
+++ b/extensions-jvm/protobuf/pom.xml
@@ -0,0 +1,40 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+    Licensed to the Apache Software Foundation (ASF) under one or more
+    contributor license agreements.  See the NOTICE file distributed with
+    this work for additional information regarding copyright ownership.
+    The ASF licenses this file to You under the Apache License, Version 2.0
+    (the "License"); you may not use this file except in compliance with
+    the License.  You may obtain a copy of the License at
+
+         http://www.apache.org/licenses/LICENSE-2.0
+
+    Unless required by applicable law or agreed to in writing, software
+    distributed under the License is distributed on an "AS IS" BASIS,
+    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+    See the License for the specific language governing permissions and
+    limitations under the License.
+
+-->
+<project xmlns="http://maven.apache.org/POM/4.0.0"
+         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+    <modelVersion>4.0.0</modelVersion>
+    <parent>
+        <groupId>org.apache.camel.quarkus</groupId>
+        <artifactId>camel-quarkus-build-parent</artifactId>
+        <version>1.1.0-SNAPSHOT</version>
+        <relativePath>../../poms/build-parent/pom.xml</relativePath>
+    </parent>
+
+    <artifactId>camel-quarkus-protobuf-parent</artifactId>
+    <name>Camel Quarkus :: Protobuf</name>
+    <packaging>pom</packaging>
+
+    <modules>
+        <module>deployment</module>
+        <module>runtime</module>
+        <module>integration-test</module>
+    </modules>
+</project>
diff --git a/extensions-jvm/protobuf/runtime/pom.xml b/extensions-jvm/protobuf/runtime/pom.xml
new file mode 100644
index 0000000..566790a
--- /dev/null
+++ b/extensions-jvm/protobuf/runtime/pom.xml
@@ -0,0 +1,83 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+    Licensed to the Apache Software Foundation (ASF) under one or more
+    contributor license agreements.  See the NOTICE file distributed with
+    this work for additional information regarding copyright ownership.
+    The ASF licenses this file to You under the Apache License, Version 2.0
+    (the "License"); you may not use this file except in compliance with
+    the License.  You may obtain a copy of the License at
+
+         http://www.apache.org/licenses/LICENSE-2.0
+
+    Unless required by applicable law or agreed to in writing, software
+    distributed under the License is distributed on an "AS IS" BASIS,
+    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+    See the License for the specific language governing permissions and
+    limitations under the License.
+
+-->
+<project xmlns="http://maven.apache.org/POM/4.0.0"
+         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+    <modelVersion>4.0.0</modelVersion>
+    <parent>
+        <groupId>org.apache.camel.quarkus</groupId>
+        <artifactId>camel-quarkus-protobuf-parent</artifactId>
+        <version>1.1.0-SNAPSHOT</version>
+        <relativePath>../pom.xml</relativePath>
+    </parent>
+
+    <artifactId>camel-quarkus-protobuf</artifactId>
+    <name>Camel Quarkus :: Protobuf :: Runtime</name>
+    <description>The Protobuf data format is used for serializing between Java objects and the Google Protobuf protocol.</description>
+
+    <properties>
+        <firstVersion>1.0.0-M6</firstVersion>
+    </properties>
+
+    <dependencyManagement>
+        <dependencies>
+            <dependency>
+                <groupId>org.apache.camel.quarkus</groupId>
+                <artifactId>camel-quarkus-bom</artifactId>
+                <version>${project.version}</version>
+                <type>pom</type>
+                <scope>import</scope>
+            </dependency>
+        </dependencies>
+    </dependencyManagement>
+
+    <dependencies>
+        <dependency>
+            <groupId>org.apache.camel.quarkus</groupId>
+            <artifactId>camel-quarkus-core</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.camel</groupId>
+            <artifactId>camel-protobuf</artifactId>
+        </dependency>
+    </dependencies>
+
+    <build>
+        <plugins>
+            <plugin>
+                <groupId>io.quarkus</groupId>
+                <artifactId>quarkus-bootstrap-maven-plugin</artifactId>
+            </plugin>
+            <plugin>
+                <groupId>org.apache.maven.plugins</groupId>
+                <artifactId>maven-compiler-plugin</artifactId>
+                <configuration>
+                    <annotationProcessorPaths>
+                        <path>
+                            <groupId>io.quarkus</groupId>
+                            <artifactId>quarkus-extension-processor</artifactId>
+                            <version>${quarkus.version}</version>
+                        </path>
+                    </annotationProcessorPaths>
+                </configuration>
+            </plugin>
+        </plugins>
+    </build>
+</project>
diff --git a/extensions-jvm/protobuf/runtime/src/main/resources/META-INF/quarkus-extension.yaml b/extensions-jvm/protobuf/runtime/src/main/resources/META-INF/quarkus-extension.yaml
new file mode 100644
index 0000000..d50e035
--- /dev/null
+++ b/extensions-jvm/protobuf/runtime/src/main/resources/META-INF/quarkus-extension.yaml
@@ -0,0 +1,29 @@
+#
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License.  You may obtain a copy of the License at
+#
+#      http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+
+---
+name: "Protobuf"
+description: "The Protobuf data format is used for serializing between Java objects and the Google Protobuf protocol."
+metadata:
+  unlisted: true
+  keywords:
+  - "dataformat"
+  - "transformation"
+  guide: "https://camel.apache.org/components/latest/protobuf-dataformat.html"
+  categories:
+  - "integration"
+  status: "preview"
diff --git a/pom.xml b/pom.xml
index 2ecbf3d..86dd028 100644
--- a/pom.xml
+++ b/pom.xml
@@ -60,6 +60,7 @@
         <kotlin.version>1.3.61</kotlin.version>
         <quarkus.version>1.3.0.Final</quarkus.version>
         <quarkus-qpid-jms.version>0.11.3</quarkus-qpid-jms.version>
+        <protobuf.version>3.11.1</protobuf.version>
         <retrofit.version>2.5.0</retrofit.version>
         <!-- Keep spring.version aligned with the version used by Camel -->
         <spring.version>5.2.3.RELEASE</spring.version>
@@ -92,7 +93,9 @@
         <groovy-maven-plugin.version>2.1.1</groovy-maven-plugin.version>
         <groovy.version>2.5.8</groovy.version>
         <jandex-maven-plugin.version>1.0.7</jandex-maven-plugin.version>
+        <os-maven-plugin.version>1.6.2</os-maven-plugin.version>
         <properties-maven-plugin.version>1.0.0</properties-maven-plugin.version>
+        <protobuf-maven-plugin.version>0.6.1</protobuf-maven-plugin.version>
         <mycila-license.version>3.0</mycila-license.version>
         <maven-gpg-plugin.version>1.6</maven-gpg-plugin.version>
         <maven-deploy-plugin.version>3.0.0-M1</maven-deploy-plugin.version>
@@ -288,6 +291,7 @@
                             <exclude>**/*.mvel</exclude>
                             <exclude>**/*.p12</exclude>
                             <exclude>**/*.pem</exclude>
+                            <exclude>**/*.proto</exclude>
                             <exclude>**/*.txt</exclude>
                             <exclude>**/.factorypath</exclude>
                             <exclude>**/LICENSE.txt</exclude>
diff --git a/poms/bom-deployment/pom.xml b/poms/bom-deployment/pom.xml
index a678b4c..a716239 100644
--- a/poms/bom-deployment/pom.xml
+++ b/poms/bom-deployment/pom.xml
@@ -604,6 +604,11 @@
             </dependency>
             <dependency>
                 <groupId>org.apache.camel.quarkus</groupId>
+                <artifactId>camel-quarkus-protobuf-deployment</artifactId>
+                <version>${camel-quarkus.version}</version>
+            </dependency>
+            <dependency>
+                <groupId>org.apache.camel.quarkus</groupId>
                 <artifactId>camel-quarkus-pubnub-deployment</artifactId>
                 <version>${camel-quarkus.version}</version>
             </dependency>
diff --git a/poms/bom/pom.xml b/poms/bom/pom.xml
index 41c2016..a3dfaf5 100644
--- a/poms/bom/pom.xml
+++ b/poms/bom/pom.xml
@@ -776,6 +776,11 @@
             </dependency>
             <dependency>
                 <groupId>org.apache.camel</groupId>
+                <artifactId>camel-protobuf</artifactId>
+                <version>${camel.version}</version>
+            </dependency>
+            <dependency>
+                <groupId>org.apache.camel</groupId>
                 <artifactId>camel-pubnub</artifactId>
                 <version>${camel.version}</version>
             </dependency>
@@ -1539,6 +1544,11 @@
             </dependency>
             <dependency>
                 <groupId>org.apache.camel.quarkus</groupId>
+                <artifactId>camel-quarkus-protobuf</artifactId>
+                <version>${camel-quarkus.version}</version>
+            </dependency>
+            <dependency>
+                <groupId>org.apache.camel.quarkus</groupId>
                 <artifactId>camel-quarkus-pubnub</artifactId>
                 <version>${camel-quarkus.version}</version>
             </dependency>
diff --git a/poms/build-parent/pom.xml b/poms/build-parent/pom.xml
index d2d0314..547dec7 100644
--- a/poms/build-parent/pom.xml
+++ b/poms/build-parent/pom.xml
@@ -76,7 +76,11 @@
                         </execution>
                     </executions>
                 </plugin>
-
+                <plugin>
+                    <groupId>kr.motd.maven</groupId>
+                    <artifactId>os-maven-plugin</artifactId>
+                    <version>${os-maven-plugin.version}</version>
+                </plugin>
                 <plugin>
                     <groupId>org.apache.maven.plugins</groupId>
                     <artifactId>maven-javadoc-plugin</artifactId>
@@ -105,6 +109,11 @@
                     <version>${jandex-maven-plugin.version}</version>
                 </plugin>
                 <plugin>
+                    <groupId>org.xolstice.maven.plugins</groupId>
+                    <artifactId>protobuf-maven-plugin</artifactId>
+                    <version>${protobuf-maven-plugin.version}</version>
+                </plugin>
+                <plugin>
                     <groupId>net.revelc.code.formatter</groupId>
                     <artifactId>formatter-maven-plugin</artifactId>
                     <version>${formatter-maven-plugin.version}</version>