camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Claus Ibsen <claus.ib...@gmail.com>
Subject Re: What to do with HTTP response when route from HTTP to JMS?
Date Fri, 14 Aug 2009 03:55:44 GMT
Yeah

Look at Willems latest answer.
Just want to point out that you should NOT send to the same input
endpoint when you want to "hint" that Camel should send a reply
So remove the last .to("http://localhost:9080/myapp/myservice")
Otherwise you will run in endless loop.

The response is automatic returned when the route ends and with the
content of what the message "looks like" at that given time.

On Thu, Aug 13, 2009 at 8:27 PM, janylj<janylj@gmail.com> wrote:
>
> I don't think it works. My exact route is:
>
> from("jetty:http://localhost:9080/myapp/myservice")
> .process(new Processor() {...})
> .to("jms:queue:some_queue")
> .to("http://localhost:9080/myapp/myservice");
>
> I still got the error said,
> org.apache.camel.ExchangeTimedOutException: The OUT message was not received
> within: 20000 millis on the exchange:
>
> Basically I would like my starting endpoint receive 200 status ok when send
> jms successfully or 500 error when send jms failed. How to do that?
>
> Thanks a lot.
>
>
> Claus Ibsen-2 wrote:
>>
>> On Wed, Aug 12, 2009 at 7:01 PM, janylj<janylj@gmail.com> wrote:
>>>
>>> Thanks a lot, Willem. It works using inOnly()
>>>
>>> willem.jiang wrote:
>>>>
>>>> from("jetty ....").process(...).inOnly().to("jms:queue")
>>>>
>>>
>>> How to make it send a HttpResponse only if sending JMS message is
>>> successfully. I tried to list the same jetty endpoint in the end, but it
>>> doesn't work. Please advise. Thanks again.
>>>
>>> from("jetty ....").process(...).to("jms:queue").to("jetty....")
>>>
>>
>> jetty is only used as a consumer, eg you can only use it in the from node.
>> So when you want to call some external HTTP service use the http
>> component instead
>>
>> from(jetty).to(http)  = OK
>>
>> from(jetty).to(jetty) = NO OK
>>
>>
>>> --
>>> View this message in context:
>>> http://www.nabble.com/What-to-do-with-HTTP-response-when-route-from-HTTP-to-JMS--tp24924548p24940755.html
>>> Sent from the Camel - Users mailing list archive at Nabble.com.
>>>
>>>
>>
>>
>>
>> --
>> Claus Ibsen
>> Apache Camel Committer
>>
>> Open Source Integration: http://fusesource.com
>> Blog: http://davsclaus.blogspot.com/
>> Twitter: http://twitter.com/davsclaus
>>
>>
>
> --
> View this message in context: http://www.nabble.com/What-to-do-with-HTTP-response-when-route-from-HTTP-to-JMS--tp24924548p24956371.html
> Sent from the Camel - Users mailing list archive at Nabble.com.
>
>



-- 
Claus Ibsen
Apache Camel Committer

Open Source Integration: http://fusesource.com
Blog: http://davsclaus.blogspot.com/
Twitter: http://twitter.com/davsclaus

Mime
View raw message