Package org.apache.activemq.broker.region.group

Examples of org.apache.activemq.broker.region.group.MessageGroupSet


    if(exclusiveOwner==sub){
      exclusiveOwner=null;
      wasExclusiveOwner=true;
    }
    ConsumerId consumerId=sub.getConsumerInfo().getConsumerId();
    MessageGroupSet ownedGroups=getMessageGroupOwners().removeConsumer(
            consumerId);
    if(!sub.getConsumerInfo().isBrowser()){
      MessageEvaluationContext msgContext=context
              .getMessageEvaluationContext();
      try{
        msgContext.setDestination(destination);
        // lets copy the messages to dispatch to avoid deadlock
        List<QueueMessageReference> messagesToDispatch=new ArrayList<QueueMessageReference>();
        synchronized(pagedInMessages){
          for(Iterator<MessageReference> i=pagedInMessages.iterator();i
                  .hasNext();){
            QueueMessageReference node=(QueueMessageReference)i
                    .next();
            if(node.isDropped()){
              continue;
            }
            String groupID=node.getGroupID();
            // Re-deliver all messages that the sub locked
            if(node.getLockOwner()==sub
                    ||wasExclusiveOwner
                    ||(groupID!=null&&ownedGroups.contains(groupID))){
              messagesToDispatch.add(node);
            }
          }
        }
        // now lets dispatch from the copy of the collection to
View Full Code Here


                        }
                        dispatchSelector.setExclusiveConsumer(exclusiveConsumer);
                    }
                }
                ConsumerId consumerId = sub.getConsumerInfo().getConsumerId();
                MessageGroupSet ownedGroups = getMessageGroupOwners()
                        .removeConsumer(consumerId);
               
                // redeliver inflight messages
                List<QueueMessageReference> list = new ArrayList<QueueMessageReference>();
                for (MessageReference ref : sub.remove(context, this)) {
View Full Code Here

                exclusiveOwner = null;
                wasExclusiveOwner = true;
            }

            ConsumerId consumerId = sub.getConsumerInfo().getConsumerId();
            MessageGroupSet ownedGroups = getMessageGroupOwners().removeConsumer(consumerId);

            if (!sub.getConsumerInfo().isBrowser()) {
                MessageEvaluationContext msgContext = context.getMessageEvaluationContext();
                try {
                    msgContext.setDestination(destination);

                    // lets copy the messages to dispatch to avoid deadlock
                    List messagesToDispatch = new ArrayList();
                    synchronized (messages) {
                        messages.reset();
                        while(messages.hasNext()) {
                            QueueMessageReference node = (QueueMessageReference) messages.next();
                            if (node.isDropped()) {
                                continue;
                            }

                            String groupID = node.getGroupID();

                            // Re-deliver all messages that the sub locked
                            if (node.getLockOwner() == sub || wasExclusiveOwner || (groupID != null && ownedGroups.contains(groupID))) {
                                messagesToDispatch.add(node);
                            }
                        }
                    }
View Full Code Here

                exclusiveOwner = null;
                wasExclusiveOwner = true;
            }

            ConsumerId consumerId = sub.getConsumerInfo().getConsumerId();
            MessageGroupSet ownedGroups = getMessageGroupOwners().removeConsumer(consumerId);

            if (!sub.getConsumerInfo().isBrowser()) {
                MessageEvaluationContext msgContext = context.getMessageEvaluationContext();
                try {
                    msgContext.setDestination(destination);

                    // lets copy the messages to dispatch to avoid deadlock
                    List messagesToDispatch = new ArrayList();
                    synchronized (messages) {
                        messages.reset();
                        while(messages.hasNext()) {
                            QueueMessageReference node = (QueueMessageReference) messages.next();
                            if (node.isDropped()) {
                                continue;
                            }

                            String groupID = node.getGroupID();

                            // Re-deliver all messages that the sub locked
                            if (node.getLockOwner() == sub || wasExclusiveOwner || (groupID != null && ownedGroups.contains(groupID))) {
                                messagesToDispatch.add(node);
                            }
                        }
                    }
View Full Code Here

                        }
                        dispatchSelector.setExclusiveConsumer(exclusiveConsumer);
                    }
                }
                ConsumerId consumerId = sub.getConsumerInfo().getConsumerId();
                MessageGroupSet ownedGroups = getMessageGroupOwners()
                        .removeConsumer(consumerId);
               
                // redeliver inflight messages
                List<QueueMessageReference> list = new ArrayList<QueueMessageReference>();
                for (MessageReference ref : sub.remove(context, this)) {
View Full Code Here

TOP

Related Classes of org.apache.activemq.broker.region.group.MessageGroupSet

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.