Reputation: 2246
I can't get the nonBlockingRedelivery property to actually work, and I can't figure out why. I must be missing something obvious.
If I try to set it up through the broker URL, for example;
tcp://localhost:61616?jms.nonBlockingRedelivery=true
I will get the following error.
Cause: Could not create Transport. Reason: java.lang.IllegalArgumentException: Invalid connect parameters: {jms.nonBlockingRedelivery=true}
If I try to set it up through Spring configuration, I will get the following error.
<bean id="connectionFactoryRedelivery" class="org.springframework.jms.connection.TransactionAwareConnectionFactoryProxy">
<property name="targetConnectionFactory">
<bean class="org.apache.activemq.ActiveMQConnectionFactory">
<property name="brokerURL" value="${more.MQ.brokerURL}" />
<property name="nonBlockingRedelivery" value="true" />
<property name="redeliveryPolicy" ref="redeliveryPolicy" />
</bean>
</property>
<property name="synchedLocalTransactionAllowed" value="true" />
</bean>
org.springframework.beans.NotWritablePropertyException: Invalid property 'nonBlockingRedelivery' of bean class [org.apache.activemq.ActiveMQConnectionFactory]: Bean property 'nonBlockingRedelivery' is not writable or has an invalid setter method. Does the parameter type of the setter match the return type of the getter?
Upvotes: 1
Views: 1012
Reputation: 462
I believe that I'm still seeing this issue with spring-boot-starter-activemq:1.5.10.RELEASE - in that this on spring.activemq.broker-url does not work:
?jms.nonBlockingRedelivery=true
However setting this property fixes it:
spring.activemq.non-blocking-redelivery: true
Upvotes: 0
Reputation: 2246
My retarded error, I was using an old version of the JAR where this property actually did not exist. The above Spring configuration works 100%, and if you're having problems, they lie somewhere else.
Upvotes: 0