camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From janylj <jan...@gmail.com>
Subject What to do with HTTP response when route from HTTP to JMS?
Date Tue, 11 Aug 2009 19:56:22 GMT

Hello,

I am trying to implement a simple application using Camel, which expose as
HTTP, then send a JMS message with the HTTP request data. My route is:

from("jetty:http://localhost:9080/myapp/myservice").process(new Processor()
{
       public void process(Exchange exchange) {
            HttpServletRequest req =
exchange.getIn().getBody(HttpServletRequest.class); 
            String payload = req.getParameter("payload");
            exchange.getOut().setBody(payload);
       }
}).to("jms:queue:some.test.queue");

When I run the application, my client which sends http request would fail:

org.apache.camel.ExchangeTimedOutException: The OUT message was not received
within: 20000 millis on the exchange

I think it is because exchange.out is redirected to JMS. But how to send a
http response with 200 status code after successfully sending the JMS
message?

Thanks a lot.
-- 
View this message in context: http://www.nabble.com/What-to-do-with-HTTP-response-when-route-from-HTTP-to-JMS--tp24924548p24924548.html
Sent from the Camel - Users mailing list archive at Nabble.com.


Mime
View raw message