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

camel-ahc-ws client serving as both a producer and consumer

    XMLWordPrintableJSON

Details

    • New Feature
    • Status: Resolved
    • Major
    • Resolution: Won't Fix
    • 2.23.4
    • 3.x
    • camel-vertx-websocket
    • None
    • N/A 

    • Unknown

    Description

      While subscribing to a websocket using camel-ahc-ws the connection and session is sometimes bidirectional.  A session may be initiated to subscribe to specific data points by sending a message over the same session as the producer (incoming) exchange. 
       
      from("ahc-wss://ws-feed.example.com").routeId("incoming")
         .log("received message: ${body}");
       
      from("timer:wssfeedInitaitor?delay=10&repeatCount=1").routeId("feed-initiator")
         .setBody().constant(WSS_SUBSCRIBE)
         .to("ahc-wss://ws-feed.example.com")
         .log("received message on initiator: ${body}");
       
      The current behavior is that the "incoming" route connects but doesn't receive any data. 
      The "feed-initiator" router successfully sends the subscribe message to the remote endpoint and starts receiving data. The websocket data received is only showing up in WsListener DEBUG logging messages "[cHttpClient-3-1] o.a.camel.component.ahc.ws.WsEndpoint : Received message --> ..." without the data on the exchange. The logging is coming from the "feed-initator" route, which is not logging messages using the route given the initiator is in wrong mode.
       
      Is there a way to share the same session? 
       
      Otherwise can the component be enhanced to serve as both a producer and consumer at the same time? 
       
       

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              shuawest Josh West
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: