[
https://issues.apache.org/jira/browse/CAMEL-14893?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
son, kyoungduk updated CAMEL-14893:
-----------------------------------
Description:
If the processor associated with the grpc endpoint throws an exception, the
caller will not receive an exception response.
When an exception is thrown by the processor, the exception message is
returned to the caller using onError.
was:
If the processor associated with the grpc endpoint throws an exception, the
caller will not receive an exception response.
When an exception is thrown by the processor, the exception message is
returned to the caller using onError.
this is my sample.
ㅇ GrpcRoute.java
package io.nextree.grpc;import org.apache.camel.builder.RouteBuilder;import
org.springframework.stereotype.Component;@Componentpublic class GrpcRoute
extends RouteBuilder { // @Override public void configure() throws
Exception { //
from("grpc://0.0.0.0:50055/io.nextree.greet.Greeter?method=sayHello&producerStrategy=STREAMING")
.bean(GreeterLogic.class, "sayHello")
.log("responsed ${body}"); }}
ㅇ GreeterLogic.java
package io.nextree.grpc;import io.nextree.greet.HelloReply;import
io.nextree.greet.HelloRequest;import
org.springframework.stereotype.Component;@Componentpublic class GreeterLogic {
// public HelloReply sayHello(HelloRequest request) { //
return HelloReply.newBuilder().setMessage("Hello, " +
request.getName()).build(); }}
ㅇ greet.proto
syntax = "proto3";option java_multiple_files = true;option java_outer_classname
= "GreetProto";option java_package = "io.nextree.greet";package
io.nextree.greet;message HelloRequest { // string name = 1;}message
HelloReply { // string message = 1;}service Greeter { // rpc
SayHello (HelloRequest) returns (HelloReply) {}}
> Handling onError
> ----------------
>
> Key: CAMEL-14893
> URL: https://issues.apache.org/jira/browse/CAMEL-14893
> Project: Camel
> Issue Type: Improvement
> Components: camel-grpc
> Affects Versions: 3.2.0
> Environment: * java 8
> * spring boot 2.2.4.RELEASE
> * camel-grpc 3.3.0-SNAPSHOT
> Reporter: son, kyoungduk
> Assignee: Dmitry Volodin
> Priority: Minor
> Fix For: 3.3.0
>
> Attachments: handling-onerror.txt
>
>
> If the processor associated with the grpc endpoint throws an exception, the
> caller will not receive an exception response.
> When an exception is thrown by the processor, the exception message is
> returned to the caller using onError.
--
This message was sent by Atlassian Jira
(v8.3.4#803005)