We have an issue in ActiveMQ where we have a huge number of messages not dropping off topics. The topics are set to non-persistent, non-durable. Our Activemq.xml file is
<beans>
<broker xmlns="http://activemq.apache.org/schema/core" useJmx="false" persistent="false">
<!--
<persistenceAdapter>
<journaledJDBC journalLogFiles="5" dataDirectory="../data"/>
</persistenceAdapter>
-->
<transportConnectors>
<transportConnector uri="vm://localhost"/>
</transportConnectors>
</broker>
</beans>
and our topic definition in messaging-config.xml is
<destination id="traceChannel">
<properties>
<network>
<session-timeout>10</session-timeout>
</network>
<server>
<message-time-to-live>10000</message-time-to-live>
<durable>false</durable>
<durable-store-manager>flex.messaging.durability.FileStoreManager</durable-store-manager>
</server>
<jms>
<destination-type>Topic</destination-type>
<message-type>javax.jms.ObjectMessage</message-type>
<connection-factory>ConnectionFactory</connection-factory>
<destination-jndi-name>dynamicTopics/traceTopic</destination-jndi-name>
<delivery-mode>NON_PERSISTENT</delivery-mode>
<message-priority>DEFAULT_PRIORITY</message-priority>
<acknowledge-mode>AUTO_ACKNOWLEDGE</acknowledge-mode>
<transacted-sessions>false</transacted-sessions>
<initial-context-environment>
<property>
<name>Context.INITIAL_CONTEXT_FACTORY</name>
<value>org.apache.activemq.jndi.ActiveMQInitialContextFactory</value>
</property>
<property>
<name>Context.PROVIDER_URL</name>
<value>tcp://localhost:61616</value>
</property>
</initial-context-environment>
</jms>
</properties>
<channels>
<channel ref="rtmps" />
</channels>
<adapter ref="trace" />
</destination>
What I am trying to achieve is that only the last 10 messages be on the topics at any one time as leaving it running overnight results in over 150K messages on the topic even though it should only be holding a very small number.