Have you set lazyChannelCreation=false or something, as it ought to be
lazy by default.



On Thu, Oct 29, 2015 at 10:16 AM, sykomaniac <ashleysyke...@gmail.com> wrote:
> Hi,
>
> I am using camel-netty4 as a producer. I take a message off of a Rabbit
> queue and attempt to send it via netty to the server. This works perfectly
> when the server is up an accepting requests. However, if the server is not
> responding when I enable the client I get the following error at start-up:
>
> Error occurred during starting Camel: CamelContext(ClientContext) due Failed
> to create Producer for endpoint: Endpoint[netty4:tcp://10.0.2.2:40000].
> Reason: java.net.ConnectException: Cannot connect to 10.0.2.2:40000.
>
> What I want to do is capture the error and attempt a connection retry until
> the server comes back on-line.
>
> I have tried various ways of catching this exception using the built-in
> camel error handling but this is not working.
>
> Do I need to add a customer netty handler to capture the error? Do I need a
> custom netty channel factory? Basically, I'm looking for help on how to
> capture the above error and retry the connection. Any help would be greatly
> appreciated!
>
>
>
>
> --
> View this message in context: 
> http://camel.465427.n5.nabble.com/Exception-handling-for-netty4-producers-tp5773180.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