If you are expecting acks returned from the external web socket
server, you will need to add the corresponding from-endpoint. Take a
look at the route configuration of this ahc-ws request/response test.
https://git-wip-us.apache.org/repos/asf?p=camel.git;a=blob;f=components/camel-ahc-ws/src/test/java/org/apache/camel/component/ahc/ws/WsProducerConsumerTest.java;h=54d8b0928e9a5a219855e776f2403a050837fe04

2014-12-23 6:56 GMT+09:00 SUNIL <[email protected]>:
> Hello,
>
> We are using Camel Websocket component and AHC-WS component to chain
> Multiple WebSockets to stream the messages. But we ran in to some issues
> with WsEndpoint class which is not forwarding the messages which it
> receiving from other websocket.
>
> Let me explain clearly what we are doing :
>
> We have iPad WebSocket client which sends the messages to my application
> which is developed using Camel WebSocket component.
>
> from("*websocket://myEndPoint*").choice().
>      when(body().contains("ACK from external websocket")).
>        to("direct:ipad")
>                 .otherwise().
>                    to("direct:otherWebSocket");
> Above route will act like producer and consumer.Also this endpoint will
> receive messages from iPad WebSocket as well as some other external
> Application WebSocket component which is developed using Netty.
>
> Below route will be used to  forward the iPad messages to some other
> external WebSocket component.
>
>         from("direct:*otherWebSocket*").log("Forwarding message to other
> external WebSocket").to("ahc-ws://xxxxxx:39000/externalWebSocket");
>
> Below will be used to send the ACK's back to iPad which it is receiving from
> external WebSocket.
>
>         from("*direct:ipad*").log("Sending ACK message to iPad
> ").to("websocket://myEndPoint?sendToAll=true");
>
> Above routes are working fine in one way that means iPad able to send the
> messages to //myEndPoint and //myEndPoint is able to forward the messages to
> external WebSocket component . *But external WebSocket Component sending the
> ACKs back to Camel Framework WsEndpoint class but not to //myEndPoint route
> .* Please help me why Camel Framework WsEndpoint class is not forwarding
> those messages to my route //myEndPoint .
>
> But same configuration is working fine if  external WebSocket also uses the
> Camel WebSocket component which is weird. *Does this mean camel websocket
> AHC-WS component only works if external Websockets developed using Camel
> Components*?
>
>
>
>
>
> --
> View this message in context: 
> http://camel.465427.n5.nabble.com/Camel-WebSocket-WsEndpoint-not-forwarding-messages-tp5760996.html
> Sent from the Camel - Users mailing list archive at Nabble.com.

Reply via email to