activemq-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From tobiaslm <>
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"
		<property name="reconnectOnException" value="true"/>
		<property name="targetConnectionFactory" ref="amqConnectionFactory" />
	<bean id="amqConnectionFactory"
		<property name="brokerURL" value="tcp://localhost:61616"/>
		<property name="exclusiveConsumer" value="true"/>
		<property name="redeliveryPolicy" ref="redeliveryPolicy" />
	<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" />

		<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 id="jmsTransactionManager"
               <property name="connectionFactory" ref="amqConnectionFactory"

Any help on this would be highly appreciated.

View this message in context:
Sent from the ActiveMQ - User mailing list archive at

View raw message