your constantPendingMessageLimitStrategy limit property must be greater than 0

thanks,

Rob

Rob Davies
http://fusesource.com
http://rajdavies.blogspot.com/


On 2 Dec 2008, at 05:35, mar1394 wrote:


I'm using Active MQ 5.0 on a RedHat Linux system.

I have a number of slow consumers in my network, but I cannot get the slow
consumer policies to work.

I have set the PrefetchSize on the connection URL.

java.naming.provider.url=tcp://localhost:61614? connectionTimeout = 0 &jms .prefetchPolicy .all=1000&jms.useCopyOnSend=false&jms.useCompression=true

I have tried each of these:

     <constantPendingMessageLimitStrategy limit="0"/>

      <prefetchRatePendingMessageLimitStrategy multiplier="1"/>

And have tried various values for the maximum pending limit in my code with
this:

       ActiveMQPrefetchPolicy prefetchPolicy = new
ActiveMQPrefetchPolicy();
       prefetchPolicy.setMaximumPendingMessageLimit(1000);


((ActiveMQConnection )this.connection).setPrefetchPolicy(prefetchPolicy);

But in the JMX consoles, the entries for my subscribers show that
PrefetchSize STARTs at 1000, and then it climbs from there, rather than remaining constant. On my slow consumers the DispatchedQueueSize grows until it is huge -- certainly way beyond any of the limits I have set. All the
DiscardCounts are always 0.


This in in my activemq.xml file:

<!-- Destination specific policies using destination names or wildcards
-->
   <destinationPolicy>
     <policyMap>
       <policyEntries>

         <policyEntry topic="mpcs.>" producerFlowControl="false"
memoryLimit="512mb">
           <dispatchPolicy>
             <!-- <roundRobinDispatchPolicy/> -->
             <!-- <strictOrderDispatchPolicy/> -->
             <simpleDispatchPolicy/>
           </dispatchPolicy>

           <messageEvictionStrategy>
               <oldestMessageEvictionStrategy/>
           </messageEvictionStrategy>

           <pendingMessageLimitStrategy>
             <constantPendingMessageLimitStrategy limit="0"/>
<!-- <prefetchRatePendingMessageLimitStrategy multiplier="1"/> -->
           </pendingMessageLimitStrategy>

          <subscriptionRecoveryPolicy>
             <lastImageSubscriptionRecoveryPolicy/>
           </subscriptionRecoveryPolicy>

         </policyEntry>

       </policyEntries>
     </policyMap>
   </destinationPolicy>

Does this feature just not work?  Does anyone know?

-Marti DeMore



--
View this message in context: 
http://www.nabble.com/Cannot-get-slow-consumers-to-discard-messages-tp20786422p20786422.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.


Reply via email to