activemq-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From yesnid <>
Subject Re: Queue PolicyEntry Eviction Not working
Date Mon, 13 Apr 2009 23:01:59 GMT


All I did was take the examples from the link I posted, and place them into
the default activeMQ configuration file: (see below)

I have tried this with a TTL of 0 essentially infinite for the message and
for non-zero values, but neither yielded any results for me. Also My queue
that I am trying to evict from has no consumer on it, does that make a
difference, I am beginning to suspect from other posts that it is? 

Could you post a configuration that has worked and I could try this and see
if I get better results with eviction?

Thank you,

    Licensed to the Apache Software Foundation (ASF) under one or more
    contributor license agreements.  See the NOTICE file distributed with
    this work for additional information regarding copyright ownership.
    The ASF licenses this file to You under the Apache License, Version 2.0
    (the "License"); you may not use this file except in compliance with
    the License.  You may obtain a copy of the License at
    Unless required by applicable law or agreed to in writing, software
    distributed under the License is distributed on an "AS IS" BASIS,
    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    See the License for the specific language governing permissions and
    limitations under the License.

    <!-- Allows us to use system properties as variables in this
configuration file -->

	<!-- Add this Attribute to the Broker element to get a clean broker set up
during testing & debugging: deleteAllMessagesOnStartup="true" -->

	<!--  -->
    <broker xmlns=""
dataDirectory="${activemq.base}/data"  deleteAllMessagesOnStartup="true"  >

        <!-- Destination specific policies using destination names or
wildcards -->
                    <policyEntry queue=">" memoryLimit="5mb" 
advisoryForSlowConsumers="true" advisoryWhenFull="true"
sendAdvisoryIfNoConsumers="true" >

					<constantPendingMessageLimitStrategy limit="50" />
<prefetchRatePendingMessageLimitStrategy multiplier="1"/>
   	           <policyEntry topic=">" memoryLimit="5mb">

        <!-- Use the following to configure how ActiveMQ is exposed in JMX
            <managementContext createConnector="true"/>

        <!-- The store and forward broker networks ActiveMQ will listen to
            <!-- by default just auto discover the other brokers -->
            <!-- <networkConnector name="default-nc"
uri="multicast://default"/> -->
            <!-- Example of a static configuration:
            <networkConnector name="host1 and host2"

            <amqPersistenceAdapter syncOnWrite="false"
directory="${activemq.base}/data" maxFileLength="20 mb"/>

        <!--  The maximum about of space the broker will use before slowing
down producers -->
                	<!-- MemoryUsage is the maximum amount of memory the broker
will use -->
                    <memoryUsage limit="20 mb"/>
                	<!-- Store usage controls the maximum size of the
AMQMessage Store  -->
                    <storeUsage limit="1 gb" name="foo"/>
                	<!-- TempUsage is the maximum size of the store used for
                     messages that may optionally overflow from memory
awaiting dispatch -->
                    <tempUsage limit="100 mb"/>

        <!-- The transport connectors ActiveMQ will listen to -->
            <transportConnector name="openwire" uri="tcp://localhost:61616"
            <transportConnector name="ssl" uri="ssl://localhost:61617"/>

            <sslContext keyStore="file:${activemq.base}/conf/broker.ks"

            <zeroconfDiscovery type=""/>


    <!-- An embedded servlet engine for serving up the Admin console -->
    <jetty xmlns="">
            <nioConnector port="8161"/>
            <webAppContext contextPath="/admin"
resourceBase="${activemq.base}/webapps/admin" logUrlOnStart="true"/>
            <webAppContext contextPath=""
resourceBase="${activemq.base}/webapps/demo" logUrlOnStart="true"/>
            <webAppContext contextPath="/fileserver"
resourceBase="${activemq.base}/webapps/fileserver" logUrlOnStart="true"/>


jbekas wrote:
> yesnid wrote:
>> I am trying to get an eviction policy as described here:
>> working for the Queues on my broker, I have attempted several
>> configurations of different types and don't seem to be having any luck
>> getting messages to expire is there something I am missing please HELP!
> Can you post a sample broker configuration that you think should work with
> the queue eviction policy?  Also, any relevant code for setting the TTL or
> JMSExpiration would be helpful as well.
> I've been able to make the eviction policy work for queues, topics are a
> different story.

View this message in context:
Sent from the ActiveMQ - User mailing list archive at

View raw message