Thanks for the insight.

I have gone ahead to implement the Transactional Client EIP pattern.

However, I noticed that my transaction is redelivered only 4 times. I used
JMSTransactionManager as my transaction manager and my redelivery properties
says maxredelivery is 6. Also, my timetolive is 24hrs, but my failed
transaction is retried just 4 times.

How do I modify the number of time it is redelivered?


See my config below:
<bean id="redeliveryPolicy" class="org.apache.activemq.RedeliveryPolicy">
                <property name="initialRedeliveryDelay" value="5000"/>
                <property name="maximumRedeliveries" value="6"/>
                <property name="useCollisionAvoidance" value="false"/>
                <property name="useExponentialBackOff" value="false"/>
        </bean>

<bean id="jmsConnectionFactory"
class="org.apache.activemq.ActiveMQConnectionFactory">
                <property name="alwaysSessionAsync" value="false"/>
                <property name="alwaysSyncSend" value="true"/>
                <property
name="brokerURL"><value>${plusone-block-request-queue-url}</value></property>
                <property name="clientID" value=""/>
                <property name="closeTimeout" value="15000"/>
                <property name="copyMessageOnSend" value="true"/>
                <property name="disableTimeStampsByDefault" value="false"/>
                <property name="dispatchAsync" value="false"/>
                <property name="objectMessageSerializationDefered" 
value="false"/>
                <property name="optimizeAcknowledge" value="false"/>
                <property name="optimizedMessageDispatch" value="true"/>
                <property name="password" value=""/>
                <property name="producerWindowSize" value="0"/>
                <property name="statsEnabled" value="false"/>
                <property name="useAsyncSend" value="false"/>
                <property name="useCompression" value="false"/>
                <property name="useRetroactiveConsumer" value="false"/>
                <property name="userName" value=""/>
                <property name="watchTopicAdvisories" value="true"/>
                <property name="sendTimeout" value="0"/>
                <property name="redeliveryPolicy" ref="redeliveryPolicy"/>
        </bean>

<bean id="jmsTransactionManager"
class="org.springframework.jms.connection.JmsTransactionManager">
            <property name="connectionFactory" ref="jmsConnectionFactory" />    
            
        </bean>
        
        <bean id="jmsConfig"
class="org.apache.camel.component.jms.JmsConfiguration">
            <property name="connectionFactory" ref="jmsConnectionFactory"/>
            <property name="transactionManager" ref="jmsTransactionManager"/>
            <property name="transacted" value="true"/>
            <property name="concurrentConsumers" value="2"/>
            <property name="timeToLive" value="86400000"/>
                <property name="deliveryPersistent" value="true"/>
                <property name="explicitQosEnabled" value="true"/>              
                <property name="priority" value="9"/>
                <property name="transactedInOut" value="true"/>         
        </bean>
        
<bean id="PROPAGATION_REQUIRED"
class="org.apache.camel.spring.spi.SpringTransactionPolicy">
            <property name="transactionManager" ref="jmsTransactionManager"/>
            <property name="propagationBehaviorName" 
value="PROPAGATION_REQUIRED"/>
        </bean>
        
        <bean id="jms" class="org.apache.camel.component.jms.JmsComponent">
                <property name="configuration" ref="jmsConfig"/>                
        </bean>

What else do I watchout for?

kr.



Claus Ibsen-2 wrote:
> 
> You can use transactions - ack mode TRANSACTED
> 
> And then you need to setup a TX manager.
> 
> Chapter 9 in the Camel in Action book. (and find examples in the
> source code for the book)
> Or check the Transactional Client EIP pattern at Camel wiki.
> 
> 
> 
> On Wed, Apr 14, 2010 at 2:50 PM, lekkie <lekkie.ay...@gmail.com> wrote:
>>
>> I have this scenario where I 'd like to keep a message in the queue until
>> the
>> flow in my route has returned.
>>
>> See explanation below:
>>
>> <route>
>>    <from uri="jms:${queue}"/>
>>    <to uri="nmr:Webservice"/>
>> </route>
>>
>> I'd like to finish processing <to uri="nmr:Webservice"/> - which means
>> the
>> message is successfully sent to nmr:Webservice - before an ack is sent to
>> my
>> message broker (jms:${queue}).
>>
>> What acknowledgement mode will ensure an ack is only sent after camel
>> application returns from the <to uri="nmr:Webservice"/> call?
>>
>> In the case of an exception, I believe an ack will not be sent to the
>> broker. Is my assumption correct?
>>
>>
>> kr.
>> --
>> View this message in context:
>> http://old.nabble.com/JMS-Message-Acknowledgement---Persistence-in-Camel-tp28242166p28242166.html
>> Sent from the Camel - Users (activemq) mailing list archive at
>> Nabble.com.
>>
>>
> 
> 
> 
> -- 
> Claus Ibsen
> Apache Camel Committer
> 
> Author of Camel in Action: http://www.manning.com/ibsen/
> Open Source Integration: http://fusesource.com
> Blog: http://davsclaus.blogspot.com/
> Twitter: http://twitter.com/davsclaus
> 
> 

-- 
View this message in context: 
http://old.nabble.com/JMS-Message-Acknowledgement---Persistence-in-Camel-tp28242166p28245266.html
Sent from the Camel - Users (activemq) mailing list archive at Nabble.com.

Reply via email to