updated the comments

git-svn-id: https://svn.apache.org/repos/asf/incubator/activemq/trunk@382434 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
James Strachan 2006-03-02 16:15:58 +00:00
parent c874b21ef8
commit d8c086274a
1 changed files with 4 additions and 2 deletions

View File

@ -52,12 +52,14 @@ public class TopicSubscription extends AbstractSubscription {
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) {