Hi

On Thu, May 21, 2009 at 9:49 PM, harinair <[email protected]> wrote:
>
> I am using Camel to send messages from a Queue to external vendors. The
> protocol can be FTP/SFTP/HTTP or HTTPS. However sometimes the queue starts
> filling up which means that the messages are not getting drained. My feeling
> is the connection to a particular external vendor is stuck because the
> timeout is not properly set. My DSL is similar to:
>    <bean id="dataPushErrorHandler"
> class="org.apache.camel.builder.DeadLetterChannelBuilder">
>        <property name="defaultDeadLetterEndpointUri"
> value="seda:routerDeliveryAttempt1Queue" />
>        <property name="redeliveryPolicy" ref="dataPushRedeliveryPolicy" />
>    </bean>
>
>        <!-- Deliver the Live Data Push - Channel A data -->
>        <route errorHandlerRef="dataPushErrorHandler">
>            <from ref="routerDeliveryChannelAQueue" />
>            <process ref="securityHeaderGenerator" />
>            <to ref="routerLogDefault" />
>            <recipientList>
>                <xpath resultType="java.lang.String">$routerRoute</xpath>
>            </recipientList>
>            <to uri="bean:responseVerificationProcessor?method=process" />
>        </route>
>
>
> Now my questions is - is there any easy global parameter to set the timeout
> for all network operations done by Camel? If there is not is there any way I
> can set timeout for FTP/SFTP/HTTP modules? Is it a good idea to add a global
> timeout or to use sun.net.client.defaultConnectTimeout and
> sun.net.client.defaultReadTimeout?

Yeah timeout setting is actually hard as well.
You got the OS level, the JVM, the JVM system properties, the
framework and then Camel as well.
And they all got different/independent timeout and whatnot.


A general timeout feature does not exists in Camel. Some of the
transports offer a timeout.
- JMS
- Mina
- and maybe some others but I cannot remember. But its documented in
the wiki if they have a timeout option

However we could consider having a Camel timeout feature so Camel at
least could and indicate a timeout error.
However its not easy to do with all protocols. And we need some latch
around that can trigger when a timeout occur.

But I do think we could add something to the SendToProcessor that can
support a custom Camel timeout that kinda overrule any other.
But this requires a latch and to use a different thread for sending.
Or am I wrong on this?

Any thought?




>
> Hari Gangadharan
> --
> View this message in context: 
> http://www.nabble.com/Camel-stuck-periodicallly---HTTP-timeout-issue-tp23659334p23659334.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

Reply via email to