You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@activemq.apache.org by gt...@apache.org on 2012/04/19 11:35:27 UTC

svn commit: r1327888 - /activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/region/policy/DispatchPolicy.java

Author: gtully
Date: Thu Apr 19 09:35:27 2012
New Revision: 1327888

URL: http://svn.apache.org/viewvc?rev=1327888&view=rev
Log:
reflect the reality of plugable dispatch policys for topics only, https://cwiki.apache.org/confluence/display/ACTIVEMQ/Dispatch+Policies

Modified:
    activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/region/policy/DispatchPolicy.java

Modified: activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/region/policy/DispatchPolicy.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/region/policy/DispatchPolicy.java?rev=1327888&r1=1327887&r2=1327888&view=diff
==============================================================================
--- activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/region/policy/DispatchPolicy.java (original)
+++ activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/region/policy/DispatchPolicy.java Thu Apr 19 09:35:27 2012
@@ -24,7 +24,7 @@ import org.apache.activemq.filter.Messag
 
 /**
  * Abstraction to allow different dispatching policies to be plugged
- * into the region implementations.  This is used by a queue to deliver
+ * into the  topic region implementations.  This is used by a topic to deliver
  * messages to the matching subscriptions.
  * 
  * 
@@ -33,15 +33,8 @@ public interface DispatchPolicy {
     
     /**
      * Decides how to dispatch a selected message to a collection of consumers.  A safe
-     * approach is to dispatch to every subscription that matches.  Queue Subscriptions that 
-     * have not exceeded their pre-fetch limit will attempt to lock the message before 
-     * dispatching to the client.  First subscription to lock the message wins.  
-     * 
-     * Order of dispatching to the subscriptions matters since a subscription with a 
-     * large pre-fetch may take all the messages if he is always dispatched to first.  
-     * Once a message has been locked, it does not need to be dispatched to any 
-     * further subscriptions.
-     * 
+     * approach is to dispatch to every subscription that matches.
+     *
      * The list will be safe to iterate over when this method is called
      * 
      * @return true if at least one consumer was dispatched or false if there are no active subscriptions that could be dispatched