Uploaded image for project: 'Camel'
  1. Camel
  2. CAMEL-15751

camel-grpc - Provide access to stream observer in the camel Exchange

    XMLWordPrintableJSON

Details

    • New Feature
    • Status: Resolved
    • Minor
    • Resolution: Fixed
    • None
    • 3.7.0
    • camel-grpc
    • None
    • Unknown
    • Important

    Description

      Current camel-grpc module provides both the consumer and producer abilities. But, does not allow the camel route to have control over when the responses are sent back to the client.

       

      <route>
          <from uri="grpc://remotehost:1101/org.apache.camel.component.grpc.PingPong?consumerStrategy=PROPAGATION"/>
          <process ref="myCustomProcessor" />
       </route>
      

       

      Consider the above route as an example for grpc consumer (server streaming call).

      In the above, myCustomProcessor can modify the Exchange and set a Message, but if it needs to respond to the client multiple times with a time gap - based on business requirement, using responseObserver.onNext() method calls, then it can't. There is a possibility to collect all the responses in a list and send the list items one after the other. But, if the processor needs to wait for certain amount of time to compute the next response, and then invoke the onNext, it is not possible.

      I think it is a limitation of the camel-grpc component and propose to enhance it by setting the responseObserver as a property in the Exchange object.

       

       

      Attachments

        Activity

          People

            dmvolod Dmitry Volodin
            rajasekharb Rajasekhar Bhupasamudram
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: