Hi!
Introduction
We want to ensure that all messages received in our si-jms:message-driven-channel-adapter never fails.
The solution approach is to take advantage of the jms-queue-attribute 'maxRedelivery'.
So when an exception occurs in any place in our si:chain we whant the message to be rollback to queue and beeing processed again..
Description of the problem
I have read this forum and gets the redelivery to work, but my problem is when I rise the concurrentConsumers property to > 1 for my DefaultMessageListenerContainer. What then happens when an exception is thrown is that it gets redelivered and consumed by all my concurrentConsumers simultaneously. This is bad! I don't want this...
My latest configuration was like this:
JmsJobServiceEventChannel and its related queue has redelivery set to 0 (infinity retries for Tiboco configuration).<bean id="jmsTransactionManager" class="org.springframework.jms.connection.JmsTrans actionManager">
<constructor-arg ref="connectionFactory"/>
</bean>
<bean id="transactionalMessageListenerContainer" class="org.springframework.jms.listener.DefaultMes sageListenerContainer">
<property name="concurrentConsumers" value="2"/>
<property name="connectionFactory" ref="connectionFactory"/>
<property name="sessionTransacted" value="true"/>
<property name="transactionManager" ref="jmsTransactionManager"/>
<property name="errorHandler" ref="dealyedMessageDeliveryErrorHandler" />
<property name="autoStartup" value="false" />
<property name="cacheLevelName" value="CACHE_NONE" />
<property name="destination" ref="jmsJobServiceEventChannel" />
<property name="recoveryInterval" value="30000" />
</bean>
JmsTransactionManager isn't transactional.
No caching.
ErrorHandler only log the exception and wrapps the exception into a RuntimeException that is thrown.
What is the prefered setup to make i work?
My spring versions is:
- spring-*-3.0.5.RELEASE.jar
- spring-integtration-*-1.0.4.RELEASE.jar


Reply With Quote
