You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@activemq.apache.org by jiunjiunma <ji...@gmail.com> on 2012/11/13 07:12:39 UTC
spring dsl sample for redelivery policy
Hi,
Does anyone have a sample on how to set the redelivery policy in spring
DSL? The pooled connection factory only takes a delivery policy (not a
delivery policy map) and I got an exception saying destination is not set
when I set the ref to a RedeliveryPolicy object. According to this doc
http://activemq.apache.org/redelivery-policy.html
<http://activemq.apache.org/redelivery-policy.html> , it should take a
RedeliveryPolicyMap.
A sample file will be really helpful.
Thanks,
--Jiunjiun
--
View this message in context: http://activemq.2283324.n4.nabble.com/spring-dsl-sample-for-redelivery-policy-tp4659223.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.
Re: spring dsl sample for redelivery policy
Posted by jiunjiunma <ji...@gmail.com>.
Yes, it is. That's actually what I set but did not work in activemq 5.7. As
another thread indicates
(http://activemq.2283324.n4.nabble.com/Redelivery-policy-broken-in-5-7-0-td4658304.html),
it seems to be an regression.
Thanks a lot for your help. It's very helpful.
--Jiunjiun
Torsten Mielke-2 wrote
> Hello,
>
> How about this Spring config?
> <bean id="redeliveryPolicy" class="org.apache.activemq.RedeliveryPolicy">
>
> <property name="initialRedeliveryDelay" value="5000" />
>
> <property name="redeliveryDelay" value="5000" />
>
> <property name="maximumRedeliveries" value="-1" />
> </bean>
>
> <bean id="AmqCF" class="org.apache.activemq.ActiveMQConnectionFactory">
>
> <property name="brokerURL" value="failover:(tcp://localhost:61616)" />
>
> <property name="redeliveryPolicy" ref="redeliveryPolicy" />
>
> </bean>
>
> You may want to set the redelivery policy on the ActiveMQConnectionFactory
> not on the PooledConnectionFactory.
> Is this what you are looking for?
>
> Hope this helps.
>
> Regards,
> Torsten Mielke
> torsten@
> tmielke.blogspot.com
>
>
> On Nov 13, 2012, at 7:12 AM, jiunjiunma wrote:
>
>> Hi,
>> Does anyone have a sample on how to set the redelivery policy in
>> spring
>> DSL? The pooled connection factory only takes a delivery policy (not a
>> delivery policy map) and I got an exception saying destination is not set
>> when I set the ref to a RedeliveryPolicy object. According to this doc
>> http://activemq.apache.org/redelivery-policy.html
>> <http://activemq.apache.org/redelivery-policy.html> , it should
>> take a
>> RedeliveryPolicyMap.
>> A sample file will be really helpful.
>>
>> Thanks,
>> --Jiunjiun
>>
>>
>>
>> --
>> View this message in context:
>> http://activemq.2283324.n4.nabble.com/spring-dsl-sample-for-redelivery-policy-tp4659223.html
>> Sent from the ActiveMQ - User mailing list archive at Nabble.com.
--
View this message in context: http://activemq.2283324.n4.nabble.com/spring-dsl-sample-for-redelivery-policy-tp4659223p4659268.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.
Re: spring dsl sample for redelivery policy
Posted by Torsten Mielke <to...@fusesource.com>.
Hello,
How about this Spring config?
<bean id="redeliveryPolicy" class="org.apache.activemq.RedeliveryPolicy">
<property name="initialRedeliveryDelay" value="5000" />
<property name="redeliveryDelay" value="5000" />
<property name="maximumRedeliveries" value="-1" />
</bean>
<bean id="AmqCF" class="org.apache.activemq.ActiveMQConnectionFactory">
<property name="brokerURL" value="failover:(tcp://localhost:61616)" />
<property name="redeliveryPolicy" ref="redeliveryPolicy" />
</bean>
You may want to set the redelivery policy on the ActiveMQConnectionFactory not on the PooledConnectionFactory.
Is this what you are looking for?
Hope this helps.
Regards,
Torsten Mielke
torsten@fusesource.com
tmielke.blogspot.com
On Nov 13, 2012, at 7:12 AM, jiunjiunma wrote:
> Hi,
> Does anyone have a sample on how to set the redelivery policy in spring
> DSL? The pooled connection factory only takes a delivery policy (not a
> delivery policy map) and I got an exception saying destination is not set
> when I set the ref to a RedeliveryPolicy object. According to this doc
> http://activemq.apache.org/redelivery-policy.html
> <http://activemq.apache.org/redelivery-policy.html> , it should take a
> RedeliveryPolicyMap.
> A sample file will be really helpful.
>
> Thanks,
> --Jiunjiun
>
>
>
> --
> View this message in context: http://activemq.2283324.n4.nabble.com/spring-dsl-sample-for-redelivery-policy-tp4659223.html
> Sent from the ActiveMQ - User mailing list archive at Nabble.com.