Hi Sounds like the remote http server does not respond and therefore the message is inflight waiting for the response.
There is a timeout option you can tweak to force a timeout to be hit sooner so the message is not so inflight so long time. Take a look at the jetty documentation. Also you can configure the graceful shutdown timeout of Camel On Sat, Jan 31, 2015 at 8:00 PM, muell01 <rob.muell...@hp.com> wrote: > Using camel 2.12 w/o the doTry block (and using a loop) I get a non > fluctuating '1' in flight message. when stopping the route after deploying > as a .war into eap6, it would take the full 5 minutes for a graceful > shutdown. > > I also relearned how to use the Timer. limiting the period to 1s allows the > route to complete w/o violating the REST contract. > > <from > uri="timer://jettyTimer?fixedRate=true&period=1000&repeatCount=0"/> > > <doTry> > <to > uri="jetty:http://api.application.com/v1/pull?httpClient.timeout=30000&enableJmx=true&throwExceptionOnFailure=false&id={{streamId}}&api_key={{api_key}}&username={{username}}"/> > <doCatch> > <exception>java.net.ConnectException</exception> > <log message="*** inside Exception :: ${exception.message} " > loggingLevel="ERROR"/> > </doCatch> > </doTry> > > > > -- > View this message in context: > http://camel.465427.n5.nabble.com/Jetty-as-a-producer-for-a-Rest-Call-tp5762262p5762284.html > Sent from the Camel - Users mailing list archive at Nabble.com. -- Claus Ibsen ----------------- Red Hat, Inc. Email: cib...@redhat.com Twitter: davsclaus Blog: http://davsclaus.com Author of Camel in Action: http://www.manning.com/ibsen hawtio: http://hawt.io/ fabric8: http://fabric8.io/