You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@camel.apache.org by kiranreddykasa <ki...@fss.co.in> on 2012/11/22 11:20:59 UTC

Camel netty response handler

Hi 

i am trying to create a tcp sample with camel and started using camel-netty
and it works great

 but i am not able to figure out how to handle responses .

consider the following route

client --->
from(netty:tcp://localhost:99999[?options]).process(someprocessor)to(netty:tcp://remotehost:99999[?options])

in this route how responses received from the remotehost can be handled by
'from' (localhost)endpoint ??
 



--
View this message in context: http://camel.465427.n5.nabble.com/Camel-netty-response-handler-tp5723104.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Re: Camel netty response handler

Posted by kiranreddykasa <ki...@fss.co.in>.
Thanks Claus
 
It worked .

BTW loved your camel in action book.



--
View this message in context: http://camel.465427.n5.nabble.com/Camel-netty-response-handler-tp5723104p5723114.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Re: Camel netty response handler

Posted by Claus Ibsen <cl...@gmail.com>.
On Thu, Nov 22, 2012 at 11:20 AM, kiranreddykasa <ki...@fss.co.in> wrote:
> Hi
>
> i am trying to create a tcp sample with camel and started using camel-netty
> and it works great
>
>  but i am not able to figure out how to handle responses .
>
> consider the following route
>
> client --->
> from(netty:tcp://localhost:99999[?options]).process(someprocessor)to(netty:tcp://remotehost:99999[?options])
>
> in this route how responses received from the remotehost can be handled by
> 'from' (localhost)endpoint ??
>

In the route above you have both netty acting as a server (the from),
and then you also call another remote server (to).

If you want to handle the response from the remote server, just add
another step afterwards
 from(netty:tcp://localhost:99999[?options]).process(someprocessor)
   .to(netty:tcp://remotehost:99999[?options]).process(someResponseProcessor)



>
>
>
> --
> View this message in context: http://camel.465427.n5.nabble.com/Camel-netty-response-handler-tp5723104.html
> Sent from the Camel - Users mailing list archive at Nabble.com.



-- 
Claus Ibsen
-----------------
Red Hat, Inc.
FuseSource is now part of Red Hat
Email: cibsen@redhat.com
Web: http://fusesource.com
Twitter: davsclaus
Blog: http://davsclaus.com
Author of Camel in Action: http://www.manning.com/ibsen