Unable to Set JMSExpiration on Outbound Messages
In a project on which I am currently working, I am using Spring Integration
to send JMS messages to a ActiveMQ queue. I can successfully send messages
to the queue, but I have as of yet been unable to set a non-zero JMSExpiration
value on the messages. This is resulting in messages 'stacking up' in the
queue if there is no active consumer.
I have tried specifying 'time-to-live' as an attribute of my outbound
JMS channel adapter:
I have also tried using a JMS template:
Neither approach seems to work. In both cases, outbound messages have an
<bean id="testJmsTemplate" class="org.springframework.jms.core.JmsTemplate" >
<property name="connectionFactory" ref="externalConnectionFactory" />
<property name="defaultDestinationName" value="outbound.msg.q" />
<property name="explicitQosEnabled" value="true" />
<property name="deliveryPersistent" value="false" />
<property name="timeToLive" value="10000" />
expiration value of '0'.
I would greatly appreciate any ideas you could provide to me on how to
address the problem and/or further debug the issue.
Spring Integration 2.1.0