activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jstrac...@apache.org
Subject svn commit: r382434 - /incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/region/TopicSubscription.java
Date Thu, 02 Mar 2006 16:15:59 GMT
Author: jstrachan
Date: Thu Mar  2 08:15:58 2006
New Revision: 382434

URL: http://svn.apache.org/viewcvs?rev=382434&view=rev
Log:
updated the comments

Modified:
    incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/region/TopicSubscription.java

Modified: incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/region/TopicSubscription.java
URL: http://svn.apache.org/viewcvs/incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/region/TopicSubscription.java?rev=382434&r1=382433&r2=382434&view=diff
==============================================================================
--- incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/region/TopicSubscription.java
(original)
+++ incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/region/TopicSubscription.java
Thu Mar  2 08:15:58 2006
@@ -52,12 +52,14 @@
     public void add(MessageReference node) throws InterruptedException, IOException {
         node.incrementReferenceCount();
         if( !isFull() && !isSlaveBroker()) {
-            // TODO - if we have already dispatched too many messages to this slow consumer
-            // should we avoid dispatching and just discard old messages as shown below
+            // if maximumPendingMessages is set we will only discard messages which
+            // have not been dispatched (i.e. we allow the prefetch buffer to be filled)
             dispatch(node);
         } else {
             synchronized (matched) {
                 matched.addLast(node);
+                
+                // NOTE - be careful about the slaveBroker!
                 if (maximumPendingMessages > 0) {
                     // lets discard old messages as we are a slow consumer
                     while (matched.size() > maximumPendingMessages) {



Mime
View raw message