Sunil created CAMEL-12718:
-----------------------------

             Summary: Camel retry optimization on large volume
                 Key: CAMEL-12718
                 URL: https://issues.apache.org/jira/browse/CAMEL-12718
             Project: Camel
          Issue Type: Improvement
          Components: camel-core
            Reporter: Sunil


We are using camel retry in our project. It works fine when number of 
transactions/period is low.

Our transaction are a ftp process - occassionally we encounter connections 
issues(servers are down etc) - so we have configured for a specific number of 
retry/delay - after which the flows goes to the error processor.

When there is a large number of transactions (say > 25) that fails and comes to 
retry loop all the same time - then the retry period of each transactions goes 
up...it takes more time for each of transactions to reach to the error 
processor.

 

We have configured a redeliveryprocessor to gather time statistics - as of now 
what we understand is that -

a) a transaction goes further and further back in the queue for retry each time 
other failed transactions are added to the queue.

b) the trigger for retry happens every second . We have added a 
scheduledexecutor service (10 threads to the deadletterChannel builder) - 
however the number of threads does not see increase the frequency of retry - 
since there are lots of transactions waiting for retry - expectation is there 
should be a retry happening as soon as transactions are available for retry and 
not necessarily every 1 sec.

 

Below is the blueprint snippet for this

 

<bean class="org.apache.camel.builder.DeadLetterChannelBuilder" 
id="myDeadLetterErrorHandler">
        <property name="deadLetterUri" value="direct:deadletter"/>
        <property name="redeliveryPolicy" ref="myRedeliveryPolicyConfig"/>
        <property name="executorServiceRef" value="redeliveryThreadPool"/>
        <property name="onRedelivery" ref="redelProcessor"/>  <!-- we have used 
this for getting statistics of the retry --->
    </bean>
    <bean class="org.apache.camel.processor.RedeliveryPolicy" 
id="myRedeliveryPolicyConfig">
        <property name="maximumRedeliveries" value="${maximum.Redeliveries}"/>
        <property name="redeliveryDelay" value="${redelivery.Delay}"/>
        <property name="asyncDelayedRedelivery" value="true"/>
        <property name="maximumRedeliveryDelay" 
value="${maximum.RedeliveryDelay}"/> 
        <property name="backOffMultiplier" value="0"/>
    </bean>
    <bean class="java.util.concurrent.ScheduledThreadPoolExecutor" 
id="redeliveryThreadPool">
        <argument type="int" value="${int}"/>
        <property name="maximumPoolSize" value="${maximum.PoolSize}"/>
    </bean>

 

Need inputs/advise on how to limit retry delay when large volume of failed 
transactions within a short period

 



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to