activemq-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From tobiaslm <tmelc...@hotmail.com>
Subject RedeliveryPolicy and remote broker
Date Wed, 28 Jan 2009 13:26:06 GMT

I've been struggling for a while with the redelivery policy.

If a message gets rolled back I would like the message to be redelivered
after a certain interval. Further any messages added to the queue after the
failing message should be left pending until the failing message gets
through or is removed from the queue.

Currently it seems as the redelivery policy is ignored and my app gets
pounded with the failing message.

These are the relevant beans in my spring config:

	<bean id="connectionFactory"
class="org.springframework.jms.connection.SingleConnectionFactory"> 
		<property name="reconnectOnException" value="true"/>
		<property name="targetConnectionFactory" ref="amqConnectionFactory" />
	</bean>
	<bean id="amqConnectionFactory"
class="org.apache.activemq.ActiveMQConnectionFactory">
		<property name="brokerURL" value="tcp://localhost:61616"/>
		<property name="exclusiveConsumer" value="true"/>
		<property name="redeliveryPolicy" ref="redeliveryPolicy" />
	</bean>
	<bean id="redeliveryPolicy" class="org.apache.activemq.RedeliveryPolicy">
		<property name="maximumRedeliveries" value="-1" />
		<property name="useExponentialBackOff" value="false" />
		<property name="backOffMultiplier" value="3" />
		<property name="initialRedeliveryDelay" value="5000" />
	</bean>

	<bean
class="org.springframework.jms.listener.DefaultMessageListenerContainer">
		<property name="connectionFactory" ref="connectionFactory" />
		<property name="destination" ref="testQueue" />
		<property name="messageListener" ref="msgListener" />
		<property name="sessionTransacted" value="true" />
		<property name="transactionManager" ref="jmsTransactionManager" />
		<property name="recoveryInterval" value="10000" />
		<property name="receiveTimeout" value="5000" />
	</bean>
	<bean id="jmsTransactionManager"
class="org.springframework.jms.connection.JmsTransactionManager">
               <property name="connectionFactory" ref="amqConnectionFactory"
/>
        </bean>

Any help on this would be highly appreciated.

Thanks.
-- 
View this message in context: http://www.nabble.com/RedeliveryPolicy-and-remote-broker-tp21705571p21705571.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.


Mime
View raw message