[ 
https://issues.apache.org/jira/browse/CAMEL-16046?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Josh West updated CAMEL-16046:
------------------------------
    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 
consumer 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? 
  
  

  was:
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 DEBUG logging messages "[cHttpClient-3-1] 
o.a.camel.component.ahc.ws.WsEndpoint : Received message --> ..." without the 
data on the exchange.
 
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? 
 
 


> camel-ahc-ws client serving as both a producer and consumer
> -----------------------------------------------------------
>
>                 Key: CAMEL-16046
>                 URL: https://issues.apache.org/jira/browse/CAMEL-16046
>             Project: Camel
>          Issue Type: Improvement
>          Components: camel-ahc-ws
>    Affects Versions: 2.23.4
>         Environment: N/A 
>            Reporter: Josh West
>            Priority: Minor
>             Fix For: Future
>
>
> 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 
> consumer 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? 
>   
>   



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to