activemq-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From eric wen <>
Subject RE: how can i config to let amq remove the queue message when timeout
Date Wed, 28 Dec 2011 02:08:08 GMT

hello, Stevo
    thank you very much for your prompt reply.
you have enlightened me and finally i finished my work as what i want. thanks again.
i'm using jms(amq5.5) with mule 3.1.2, what i want is to remove expired messages stored in
amq automatically, and now my mule configuration file looks like this:
<mule ...>
<jms:activemq-connector name="jmsConnector"
  connectionFactory-ref="activeMqConnectionFactory" />
 <spring:bean id="activeMqConnectionFactory" class="org.apache.activemq.ActiveMQConnectionFactory">
  <spring:property name="brokerURL" value="tcp://localhost:61616" />
  <spring:property name="userName" value="system" />
  <spring:property name="password" value="manager" />
  <spring:property name="sendTimeout" value="30000" />
<flow name="esbEntrance">
     <http:inbound-endpoint address="http://localhost:19090/esb/services" exchange-pattern="request-response">
        <byte-array-to-string-transformer encoding="UTF-8" />
    <jms:outbound-endpoint queue="#[xpath:/flow/@id]" exchange-pattern="request-response"
responseTimeout="60000" connector-ref="jmsConnector">
            <message-properties-transformer scope="outbound">
              <!-- tell amq to expire this message after some time. -->
              <add-message-property key="JMSExpiration" value="30000" />
              <add-message-property key="timeToLive" value="30000"/>
i've tested this, it seems, actually amq will remove this expired message when responseTimeout
after 60 seconds yet not timeToLive which is 30 seconds
but it doesn't matter, i'll study about this further.

View this message in context:
Sent from the ActiveMQ - User mailing list archive at
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message