activemq-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Mykola <mpaliye...@gmail.com>
Subject Redelivery Policy does not work AMQ 4.1.1
Date Fri, 04 May 2007 12:29:49 GMT

Hi All.
I fased the problem with redelivery policy, it simply does not work for
following config

Factory:
	<bean id="jmsConnectionFactory"
		class="org.apache.activemq.pool.PooledConnectionFactory"
		init-method="start" destroy-method="stop">
		<property name="connectionFactory">
			<bean
				class="org.apache.activemq.ActiveMQConnectionFactory">
				<property name="brokerURL"
					value="${jms.remotehost.uri}" />
				<property name="redeliveryPolicy">
					<bean class="org.apache.activemq.RedeliveryPolicy">
						<property name="backOffMultiplier" value="3"/>
						<property name="useExponentialBackOff" value="true"/>
						<property name="maximumRedeliveries" value="11"></property>
						<property name="initialRedeliveryDelay" value="2000"></property>
					</bean>
				</property>
			</bean>
		</property>
	</bean>

Listener, I'm using Spring Container with transaction enabled

    <bean
class="org.springframework.jms.listener.DefaultMessageListenerContainer">
        <property name="autoStartup" value="${jms.sms.start}" />
        <property name="concurrentConsumers"
value="${jms.sms.concurrent.consumers}" />
        <property name="connectionFactory" ref="jmsConnectionFactory" />
        <property name="destination" ref="jmsSmsDestination" />
        <property name="messageListener" ref="smsJmsListener" />
        <property name="sessionTransacted" value="true"></property>
    </bean>

In message bean I just put

   public void onMessage(Message message) {
        throw new IllegalArgumentException();
    }

As a result I see endless calls of onMessage 
the same is if I set redelivery policy via URL like
jms.remotehost.uri=tcp://localhost:61616?jms.redeliveryPolicy.initialRedeliveryDelay=2000&jms.redeliveryPolicy.maximumRedeliveries=6

What am I doing wrong? The queue I subscribe is 
	<bean id="jmsSmsDestination"
		class="org.apache.activemq.command.ActiveMQQueue">
		<constructor-arg>
			<value>QUEUE.SMS</value>
		</constructor-arg>
	</bean>


Thanks in advance
-- 
View this message in context: http://www.nabble.com/Redelivery-Policy-does-not-work-AMQ-4.1.1-tf3691771s2354.html#a10321739
Sent from the ActiveMQ - User mailing list archive at Nabble.com.


Mime
View raw message