[
https://issues.apache.org/jira/browse/CAMEL-26515?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18137291#comment-18137291
]
Claus Ibsen commented on CAMEL-26515:
-------------------------------------
PR: https://github.com/apache/camel/pull/29112
The consumer now sets the response message type of the method as the
grpcResponseType exchange property (unary, server streaming, DELEGATION). The
toRouteControlledStreamObserver producer converts each onNext reply (each
element of a List) to it. When a reply does not convert, the call ends with an
INTERNAL error and the exchange fails.
_Claude Code on behalf of Claus Ibsen (davsclaus)_
> camel-grpc - a route-controlled reply is sent to the client without checking
> it is the response type of the method
> ------------------------------------------------------------------------------------------------------------------
>
> Key: CAMEL-26515
> URL: https://issues.apache.org/jira/browse/CAMEL-26515
> Project: Camel
> Issue Type: Bug
> Components: camel-grpc
> Reporter: Claus Ibsen
> Assignee: Claus Ibsen
> Priority: Minor
> Fix For: 4.24.0
>
>
> Found while fixing CAMEL-26187. The consumer now converts the reply body to
> the response type of the gRPC method and fails the call with INTERNAL when it
> does not convert. The route-controlled path
> ({{routeControlledStreamObserver}}, the DELEGATION forwarding,
> {{GrpcProducerToRouteControlledStreamObserver.java}} around line 36) still
> calls {{onNext(body)}} with the body as is, because the response type is not
> known there.
> Carry the response type to that path (e.g. as an exchange property set by the
> consumer) and apply the same conversion and error there.
> _Claude Code on behalf of Claus Ibsen (davsclaus)_
--
This message was sent by Atlassian Jira
(v10.3.26#10030026)