You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@activemq.apache.org by chudak <me...@gmail.com> on 2012/10/26 20:46:12 UTC

Redelivery policy broken in 5.7.0

I have an existing RedeliveryPolicy configured thusly:

<bean id="activeMQRedeliveryPolicy"
class="org.apache.activemq.RedeliveryPolicy">
    <property name="initialRedeliveryDelay"
value="${jms.queue.redelivery-policy.initial.redelivery.delay}"/>
    <property name="maximumRedeliveries"
value="${jms.queue.redelivery-policy.max.redeliveries}"/>
    <property name="useExponentialBackOff"
value="${jms.queue.redelivery-policy.exponential.backoff}"/>
    <property name="backOffMultiplier"
value="${jms.queue.redelivery-policy.backoff.multiplier}"/>
  </bean>

This has been working fine up through 5.5.1. Today I upgraded to 5.7.0 and
now my application won't start:


y'; nested exception is
org.springframework.beans.factory.BeanCreationException: Error creating bean
with name 'org.apache.activemq.RedeliveryPolicy#1ae9e9b': Invocation of init
method failed; nested exception is java.lang.IllegalArgumentException: You
must specify the 'destination' property:


What is this destination property and why must I now set it? I can't find
anything in the documentation. It looks like RedeliveryPolicy has been
changed to extend the class DestinationMapEntry. But the destination is a
required property. The example shows you binding a policy to a destination
via the redeliverypolicymap not with an embedded destination.



--
View this message in context: http://activemq.2283324.n4.nabble.com/Redelivery-policy-broken-in-5-7-0-tp4658304.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.

Re: Redelivery policy broken in 5.7.0

Posted by CodeWarrior <gl...@gmail.com>.
Adding <property name="queue" value="*" />	 resolved the issue for me.

Many thanks for the idea.




--
View this message in context: http://activemq.2283324.n4.nabble.com/Redelivery-policy-broken-in-5-7-0-tp4658304p4661611.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.

Re: Redelivery policy broken in 5.7.0

Posted by nvilmer <nv...@researchnow.com>.
Use the queue property with the value set to * as show below. Adding a
destination did not work for me.

	<bean name="amqInfiniteRetryConnectionFactory"
class="org.apache.activemq.ActiveMQConnectionFactory">
		<property name="brokerURL" value="${amq.broker.url}" />
		<property name="redeliveryPolicy">
			<bean class="org.apache.activemq.RedeliveryPolicy">
				<property name="initialRedeliveryDelay" value="2000" />
				<property name="redeliveryDelay" value="20000" />
				<property name="useExponentialBackOff" value="true" />
				<property name="backOffMultiplier" value="2" />
				<property name="maximumRedeliveryDelay" value="120000" />
				<property name="maximumRedeliveries" value="-1" />
				<property name="queue" value="*" />
			</bean>
		</property>
	</bean>




--
View this message in context: http://activemq.2283324.n4.nabble.com/Redelivery-policy-broken-in-5-7-0-tp4658304p4659265.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.

Re: Redelivery policy broken in 5.7.0

Posted by Gary Tully <ga...@gmail.com>.
that looks like a regression from https://issues.apache.org/jira/browse/AMQ-3224

you need to provide a specific destination or use the wildcard
AnyDestination otherwise.

It needs to be a bean reference:

<bean id="anyDestination" class="org.apache.activemq.filter.AnyDestination" >

then apply the destination property with something like:
     ...
     <property name="destination" >
       <idref bean="anyDestination"/>
    </property>

can you reopen that issue and attach your xml.

On 26 October 2012 19:46, chudak <me...@gmail.com> wrote:
> I have an existing RedeliveryPolicy configured thusly:
>
> <bean id="activeMQRedeliveryPolicy"
> class="org.apache.activemq.RedeliveryPolicy">
>     <property name="initialRedeliveryDelay"
> value="${jms.queue.redelivery-policy.initial.redelivery.delay}"/>
>     <property name="maximumRedeliveries"
> value="${jms.queue.redelivery-policy.max.redeliveries}"/>
>     <property name="useExponentialBackOff"
> value="${jms.queue.redelivery-policy.exponential.backoff}"/>
>     <property name="backOffMultiplier"
> value="${jms.queue.redelivery-policy.backoff.multiplier}"/>
>   </bean>
>
> This has been working fine up through 5.5.1. Today I upgraded to 5.7.0 and
> now my application won't start:
>
>
> y'; nested exception is
> org.springframework.beans.factory.BeanCreationException: Error creating bean
> with name 'org.apache.activemq.RedeliveryPolicy#1ae9e9b': Invocation of init
> method failed; nested exception is java.lang.IllegalArgumentException: You
> must specify the 'destination' property:
>
>
> What is this destination property and why must I now set it? I can't find
> anything in the documentation. It looks like RedeliveryPolicy has been
> changed to extend the class DestinationMapEntry. But the destination is a
> required property. The example shows you binding a policy to a destination
> via the redeliverypolicymap not with an embedded destination.
>
>
>
> --
> View this message in context: http://activemq.2283324.n4.nabble.com/Redelivery-policy-broken-in-5-7-0-tp4658304.html
> Sent from the ActiveMQ - User mailing list archive at Nabble.com.



-- 
http://redhat.com
http://blog.garytully.com