You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@camel.apache.org by Marco Westermann <Ma...@gmx.de> on 2011/10/04 11:22:01 UTC

http never times out

Hi,

I think I found a bug in camel 2.8


I have the following code:

public void configure() {
     from ("activemq:newOrders")
         
to("http://server:port/path/?bridgeEndpoint=true&httpClient.soTimeout=120000")
}

this code terminates after 2 mins with a timeoutException (which is OK)

now I add an ErrorHandler to my context like this:

public void configure() {
            errorHandler(deadLetterChannel("activemq:qstep.orders.failed")
                 .log("Doing redelivery of message")
                 .maximumRedeliveries(10)
                 );

     from ("activemq:newOrders")
         
to("http://server:port/path/?bridgeEndpoint=true&httpClient.soTimeout=120000")
}


this route never terminates. It waits forever and when I try to stop my 
bundle in SMX I get that timeout-messages cause there a still 1 inflight 
messages.. after 300 secs it then terminates.

regards, Marco

Re: http never times out

Posted by Marco Westermann <Ma...@gmx.de>.
Hi Claus,

thank you for your response. But wouldn't it show the log "Doing 
redelivery of message" after 2 mins?

regards, Marco

Am 04.10.2011 12:52, schrieb Claus Ibsen:
> On Tue, Oct 4, 2011 at 11:22 AM, Marco Westermann<Ma...@gmx.de>  wrote:
>> Hi,
>>
>> I think I found a bug in camel 2.8
>>
>>
>> I have the following code:
>>
>> public void configure() {
>>     from ("activemq:newOrders")
>>
>>   to("http://server:port/path/?bridgeEndpoint=true&httpClient.soTimeout=120000")
>> }
>>
>> this code terminates after 2 mins with a timeoutException (which is OK)
>>
>> now I add an ErrorHandler to my context like this:
>>
>> public void configure() {
>>            errorHandler(deadLetterChannel("activemq:qstep.orders.failed")
>>                 .log("Doing redelivery of message")
>>                 .maximumRedeliveries(10)
>>                 );
>>
>>     from ("activemq:newOrders")
>>
>>   to("http://server:port/path/?bridgeEndpoint=true&httpClient.soTimeout=120000")
>> }
>>
>>
>> this route never terminates. It waits forever and when I try to stop my
>> bundle in SMX I get that timeout-messages cause there a still 1 inflight
>> messages.. after 300 secs it then terminates.
>>
> Well you setup the error handler with 10 in max redeliveries, so that
> mean 10 x 120000 (10 x 2m) = 20 min.
> So you would have to wait 20 min for that exchange to fail/succeed.
>
>
>
>> regards, Marco
>>
>
>


Re: http never times out

Posted by Claus Ibsen <cl...@gmail.com>.
On Tue, Oct 4, 2011 at 11:22 AM, Marco Westermann <Ma...@gmx.de> wrote:
> Hi,
>
> I think I found a bug in camel 2.8
>
>
> I have the following code:
>
> public void configure() {
>    from ("activemq:newOrders")
>
>  to("http://server:port/path/?bridgeEndpoint=true&httpClient.soTimeout=120000")
> }
>
> this code terminates after 2 mins with a timeoutException (which is OK)
>
> now I add an ErrorHandler to my context like this:
>
> public void configure() {
>           errorHandler(deadLetterChannel("activemq:qstep.orders.failed")
>                .log("Doing redelivery of message")
>                .maximumRedeliveries(10)
>                );
>
>    from ("activemq:newOrders")
>
>  to("http://server:port/path/?bridgeEndpoint=true&httpClient.soTimeout=120000")
> }
>
>
> this route never terminates. It waits forever and when I try to stop my
> bundle in SMX I get that timeout-messages cause there a still 1 inflight
> messages.. after 300 secs it then terminates.
>

Well you setup the error handler with 10 in max redeliveries, so that
mean 10 x 120000 (10 x 2m) = 20 min.
So you would have to wait 20 min for that exchange to fail/succeed.



> regards, Marco
>



-- 
Claus Ibsen
-----------------
FuseSource
Email: cibsen@fusesource.com
Web: http://fusesource.com
Twitter: davsclaus, fusenews
Blog: http://davsclaus.blogspot.com/
Author of Camel in Action: http://www.manning.com/ibsen/