activemq-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Fernando Franzini <fernandofranz...@gmail.com>
Subject initialRedeliveryDelay and redeliveryDelay Not Working
Date Wed, 11 Jan 2017 12:59:22 GMT
Hello people

I started using ActiveMQ and the initialRedeliveryDelay and redeliveryDelay
properties of the policy did not work! Both assume 1 second ....
maximumRedeliveries is working! I searched the solution for many days and
did not find it. Can anybody help me?
Here's my settings:

pom:
	<dependencies>
		
		<dependency>
			<groupId>org.codehaus.groovy</groupId>
			<artifactId>groovy-all</artifactId>
			<version>2.4.0</version>
		</dependency>
		
		<dependency>
			<groupId>log4j</groupId>
			<artifactId>log4j</artifactId>
			<version>1.2.17</version>
		</dependency>
		
		<dependency>
			<groupId>org.springframework</groupId>
			<artifactId>spring-context</artifactId>
			<version>${spring.version}</version>
		</dependency>
		<dependency>
			<groupId>org.springframework</groupId>
			<artifactId>spring-jms</artifactId>
			<version>${spring.version}</version>
		</dependency>
		
		<dependency>
			<groupId>org.apache.activemq</groupId>
			<artifactId>activemq-all</artifactId>
			<version>5.14.2</version>
		</dependency>
		
		<dependency>
			<groupId>javax.enterprise</groupId>
			<artifactId>cdi-api</artifactId>
			<version>1.1</version>
		</dependency>
	</dependencies>

spring:

	<bean id="localBroker" class="org.apache.activemq.broker.BrokerService"
init-method="start"
		destroy-method="stop">
		<property name="brokerName" value="localhost" />
		<property name="persistent" value="false" />
		<property name="useJmx" value="false" />
	</bean>

	<bean id="politica" class="org.apache.activemq.RedeliveryPolicy">
		<property name="initialRedeliveryDelay" value="10000" />
		<property name="redeliveryDelay" value="10000" />
		<property name="maximumRedeliveries" value="3" />
	</bean>

	<bean id="connectionFactory"
class="org.apache.activemq.ActiveMQConnectionFactory">
		<constructor-arg value="vm://localhost?create=false" />
		<property name="redeliveryPolicy" ref="politica" />
	</bean>

	<bean id="jmsTransactionManager"
class="org.springframework.jms.connection.JmsTransactionManager">
		<property name="connectionFactory" ref="connectionFactory" />
	</bean>

	<bean id="cacheConnectionFactory"
class="org.springframework.jms.connection.CachingConnectionFactory">
		<constructor-arg ref="connectionFactory" />
		<property name="sessionCacheSize" value="5" />
	</bean>

	<bean id="fila1" class="org.apache.activemq.command.ActiveMQQueue">
		<constructor-arg value="fila1" />
	</bean>

	<bean id="jmsTemplate" class="org.springframework.jms.core.JmsTemplate">
		<property name="connectionFactory" ref="cacheConnectionFactory" />
		<property name="defaultDestination" ref="fila1" />
		<property name="sessionTransacted" value="true" />
	</bean>

	<bean id="listenerMensagem"
class="org.springframework.jms.listener.DefaultMessageListenerContainer">
		<property name="connectionFactory" ref="cacheConnectionFactory" />
		<property name="destination" ref="fila1" />
		<property name="messageListener" ref="receptor" />
		<property name="transactionManager" ref="jmsTransactionManager" />
	</bean>

	<context:component-scan base-package="mensageria" />

Is there something wrong? What do I have to do to set my
initialRedeliveryDelay time and redeliveryDelay?
Best Regards




--
View this message in context: http://activemq.2283324.n4.nabble.com/initialRedeliveryDelay-and-redeliveryDelay-Not-Working-tp4720973.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.

Mime
View raw message