In our activemq.xml file, simplified a little bit:

<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans";
xmlns:amq="http://activemq.apache.org/sch
ema/core" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
xsi:schemaLocation="http://www.sprin
gframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans.xsd     http://
activemq.apache.org/schema/core
http://activemq.apache.org/schema/core/activemq-core.xsd";>
  <bean
class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer">
  </bean>
  <bean id="logQuery" class="org.fusesource.insight.log.log4j.Log4jLogQuery"
lazy-init="false" scope
="singleton" init-method="start" destroy-method="stop">
  </bean>
  <broker xmlns="http://activemq.apache.org/schema/core";
brokerName="testname" dataDirectory="${activemq.data}">
    <managementContext>
      <managementContext createConnector="false"/>
    </managementContext>
    <persistenceAdapter>
      <kahaDB directory="${activemq.data}/kahadb"/>
    </persistenceAdapter>
    <systemUsage>
      <systemUsage>
        <memoryUsage>
          <memoryUsage percentOfJvmHeap="70"/>
        </memoryUsage>
        <storeUsage>
          <storeUsage limit="1 gb"/>
        </storeUsage>
        <tempUsage>
          <tempUsage limit="500 mb"/>
        </tempUsage>
      </systemUsage>
    </systemUsage>
    <sslContext>
      <sslContext keyStore="/etc/BROKER.jks" keyStorePassword="xxx"
trustStore="/etc/BROKERTRUST.jks" trustStorePassword="xxx"/>
    </sslContext>
    <transportConnectors>
      <transportConnector name="ssl"
uri="ssl://hostname:61616?needClientAuth=true&amp;maximumConnections=1000&amp;wireFormat.maxFrameSize=104857600"/>
    </transportConnectors>
    <shutdownHooks>
      <bean xmlns="http://www.springframework.org/schema/beans";
class="org.apache.activemq.hooks.SpringContextHook"/>
    </shutdownHooks>
    <plugins>
      <jaasCertificateAuthenticationPlugin configuration="CertLogin"/>
      <authorizationPlugin>
        <map>
          <authorizationMap>
            <authorizationEntries>
              <authorizationEntry topic="ActiveMQ.Advisory.&gt;" read="*"
write="*" admin="*"/>
              <authorizationEntry queue="events" reader="read"
admin="writer" write="writer"/>
              </authorizationEntries>
          </authorizationMap>
        </map>
      </authorizationPlugin>
    </plugins>
    <destinationPolicy>
      <policyMap>
        <policyEntries>
          <policyEntry queue="events" expireMessagesPeriod="10000"/>
        </policyEntries>
      </policyMap>
    </destinationPolicy>
  </broker>
</beans>

At the bottom, we have this expireMessagesPeriod, which I assume should be
in milliseconds, I cannot find this properly stated anywhere.
But I am writing to this queue, and if no one receives the message within 10
seconds, I am expecting it to expire and be deleted from the broker.  This
functionality does not seem to be working at all, even reducing the time to
1 has no effect.  When the receiver program reconnects, it receives all the
messages that should have expired.

Is there something I am missing in the xml to enable this feature, or
something I could be doing in my sending client to cause this?  I am using
ActiveMQ 5.9, both Java and C++ APIs. But in this scenario I am sending with
Java and receiving with C++.

Thanks



--
View this message in context: 
http://activemq.2283324.n4.nabble.com/expireMessagesPeriod-for-activemq-broker-tp4685839.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.

Reply via email to