reflect the reality of plugable dispatch policys for topics only, https://cwiki.apache.org/confluence/display/ACTIVEMQ/Dispatch+Policies

git-svn-id: https://svn.apache.org/repos/asf/activemq/trunk@1327888 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Gary Tully 2012-04-19 09:35:27 +00:00
parent bda7ccb248
commit 2044ade687
1 changed files with 3 additions and 10 deletions

View File

@ -24,7 +24,7 @@ import org.apache.activemq.filter.MessageEvaluationContext;
/**
* 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