Maybe, you should consider to use an async route : http://camel.apache.org/asynchronous-processing.html
Kind regards, Charles Moulliard Senior Enterprise Architect Apache Camel Committer ***************************** blog : http://cmoulliard.blogspot.com twitter : http://twitter.com/cmoulliard Linkedlin : http://www.linkedin.com/in/charlesmoulliard Apache Camel Group : http://www.linkedin.com/groups?home=&gid=2447439&trk=anet_ug_hm On Wed, Mar 24, 2010 at 12:16 PM, Leen Toelen <toe...@gmail.com> wrote: > Hi, > > I have an HTTP endpoint that submits messages to an ActiveMQ queue. > When the consumer gets slow, the Queue is throttled and the HTTP call > hangs infinitely. Is there a way to tell the broker that if a JMS > message is not accepted within a timeout, the exchange is interrupted > and the HTTP endpoint returns an HTTP error? I tried RequestTimeout > but that does not seem to do what I expected. > > HttpEndpoint httpEndpoint = (HttpEndpoint) > endpoint("jetty:http://0.0.0.0:8162/queue"); > > JmsEndpoint topic = (JmsEndpoint) endpoint("activemq:topic:MyTopic"); > topic.setReceiveTimeout(5000); > topic.setRequestTimeout(5000); > > from(httpEndpoint).inOnly(topic); > > Regards, > Leen >