You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@camel.apache.org by "changzhiwin (Jira)" <ji...@apache.org> on 2021/11/09 13:08:00 UTC

[jira] [Created] (CAMEL-17182) why response observer is not exist in consumer of camel-grpc componet?

changzhiwin created CAMEL-17182:
-----------------------------------

             Summary: why response observer is not exist in consumer of camel-grpc componet?
                 Key: CAMEL-17182
                 URL: https://issues.apache.org/jira/browse/CAMEL-17182
             Project: Camel
          Issue Type: Bug
          Components: camel-grpc
    Affects Versions: 3.11.1
         Environment: <?xml version="1.0" encoding="UTF-8"?>
<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/maven-v4_0_0.xsd">

  <modelVersion>4.0.0</modelVersion>

  <groupId>com.example.demo</groupId>
  <artifactId>grpc-test</artifactId>
  <packaging>jar</packaging>
  <version>1.0-SNAPSHOT</version>

  <name>A Camel Spring Boot Route</name>

  <properties>
    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
    <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
    <surefire.plugin.version>3.0.0-M4</surefire.plugin.version>

    <!--
    <google-guava-version>31.0.1-jre</google-guava-version>
    <spring.boot-version>${spring-boot-version}</spring.boot-version>
    <protoc.version>3.17.2</protoc.version>
    -->

    <grpc.version>1.29.0</grpc.version>
    <protobuf.version>3.11.0</protobuf.version>
    <spring.boot-version>2.5.3</spring.boot-version>

  </properties>

  <dependencyManagement>
    <dependencies>
      <!-- Spring Boot BOM -->
      <dependency>
        <groupId>org.springframework.boot</groupId>
        <artifactId>spring-boot-dependencies</artifactId>
        <version>${spring.boot-version}</version>
        <type>pom</type>
        <scope>import</scope>
      </dependency>
      <!-- Camel BOM -->
      <dependency>
        <groupId>org.apache.camel.springboot</groupId>
        <artifactId>camel-spring-boot-dependencies</artifactId>
        <version>3.11.1</version>
        <type>pom</type>
        <scope>import</scope>
      </dependency>
    </dependencies>
  </dependencyManagement>

  <dependencies>
    <!-- Spring Boot -->
    <dependency>
      <groupId>org.springframework.boot</groupId>
      <artifactId>spring-boot-starter-web</artifactId>
    </dependency>

    <!-- Camel -->
    <dependency>
      <groupId>org.apache.camel.springboot</groupId>
      <artifactId>camel-spring-boot-starter</artifactId>
    </dependency>
    <dependency>
      <groupId>org.apache.camel.springboot</groupId>
      <artifactId>camel-grpc-starter</artifactId>
    </dependency>

    <!-- gRPC requires strong own of the Google Guava version -->
    <dependency>
      <groupId>com.google.guava</groupId>
      <artifactId>guava</artifactId>
      <version>31.0.1-jre</version>
    </dependency>

    <!-- Test -->
    <dependency>
      <groupId>org.springframework.boot</groupId>
      <artifactId>spring-boot-starter-test</artifactId>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>org.apache.camel</groupId>
      <artifactId>camel-test-spring-junit5</artifactId>
      <scope>test</scope>
    </dependency>
  </dependencies>

  <build>
    <extensions>
      <extension>
        <groupId>kr.motd.maven</groupId>
        <artifactId>os-maven-plugin</artifactId>
        <version>1.6.2</version>
      </extension>
    </extensions>
    <plugins>
      <plugin>
        <groupId>org.xolstice.maven.plugins</groupId>
        <artifactId>protobuf-maven-plugin</artifactId>
        <version>0.6.1</version>
        <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>
        </configuration>
        <executions>
          <execution>
            <goals>
              <goal>compile</goal>
              <goal>compile-custom</goal>
            </goals>
          </execution>
        </executions>
      </plugin>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-compiler-plugin</artifactId>
        <version>3.8.1</version>
        <configuration>
          <source>1.8</source>
          <target>1.8</target>
          <encoding>UTF-8</encoding>
        </configuration>
      </plugin>
      <plugin>
        <groupId>org.springframework.boot</groupId>
        <artifactId>spring-boot-maven-plugin</artifactId>
        <version>${spring.boot-version}</version>
        <executions>
          <execution>
            <goals>
              <goal>repackage</goal>
            </goals>
          </execution>
        </executions>
      </plugin>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-surefire-plugin</artifactId>
        <version>${surefire.plugin.version}</version>
      </plugin>
    </plugins>
  </build>

</project>
            Reporter: changzhiwin


I write some Camel demo, about proxy of grpc. 
When use query parameter of routeControlledStreamObserver (official website), some special manners tack place. 
When using stream mode, the response observer  is null, and I don't know why? there is the full project at github(https://github.com/changzhiwin/grpc-test).

And I use this client to test camel project.

$ git clone -b v1.41.0 https://github.com/grpc/grpc-java.git

And I asked at https://stackoverflow.com/questions/69765267/why-response-observer-is-not-exist-in-consumer-of-camel-grpc-componet.




--
This message was sent by Atlassian Jira
(v8.20.1#820001)