You can use a dynamic to
http://camel.apache.org/how-to-use-a-dynamic-uri-in-to.html

On Wed, Sep 9, 2015 at 7:39 AM, John Smith <[email protected]> wrote:
> Hello,
>
> I'd like to "ping" a server on port 22 but I only have the server's IP at
> run time Is there a way to override the remote host address? e.g. something
> like there is in the http4 component with the Exchange.HTTP_URI header
>
> I tried the below but it doesn't seem to override the addres set in the
> endpoint uri.
>
> *.setHeader("CamelNettyRemoteAddress", simple("192.168.1.17:22"))
>
>                 .doTry()
>                         .to("netty4:tcp://foo?sync=false&connectTimeout=1000")
>                 .doCatch(java.net.ConnectException.class)
>                         .setHeader("ServerInfoRouteOperationException", 
> exceptionMessage())
>                 .end()*
>
>
>
>
>
> --
> View this message in context: 
> http://camel.465427.n5.nabble.com/Specifying-Netty-remote-host-at-runtime-tp5771365.html
> Sent from the Camel - Users mailing list archive at Nabble.com.



-- 
Claus Ibsen
-----------------
http://davsclaus.com @davsclaus
Camel in Action 2nd edition:
https://www.manning.com/books/camel-in-action-second-edition

Reply via email to