Examples of MessageGroupMap


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

                QueueMessageReference node = (QueueMessageReference) m;
                // Keep message groups together.
                String groupId = node.getGroupID();
                int sequence = node.getGroupSequence();
                if (groupId != null) {
                    MessageGroupMap messageGroupOwners = ((Queue) node
                            .getRegionDestination()).getMessageGroupOwners();

                    // If we can own the first, then no-one else should own the
                    // rest.
                    if (sequence == 1) {
                        assignGroup(subscription, messageGroupOwners, node,groupId);
                    }else {
   
                        // Make sure that the previous owner is still valid, we may
                        // need to become the new owner.
                        ConsumerId groupOwner;
   
                        groupOwner = messageGroupOwners.get(groupId);
                        if (groupOwner == null) {
                            assignGroup(subscription, messageGroupOwners, node,groupId);
                        } else {
                            if (groupOwner.equals(subscription.getConsumerInfo().getConsumerId())) {
                                // A group sequence < 1 is an end of group signal.
                                if (sequence < 0) {
                                    messageGroupOwners.removeGroup(groupId);
                                }
                            } else {
                                result = false;
                            }
                        }
View Full Code Here

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

        // Keep message groups together.
        String groupId = node.getGroupID();
        int sequence = node.getGroupSequence();
        if (groupId != null) {

            MessageGroupMap messageGroupOwners = getMessageGroupOwners();
            // If we can own the first, then no-one else should own the
            // rest.
            if (sequence == 1) {
                assignGroup(subscription, messageGroupOwners, node, groupId);
            } else {

                // Make sure that the previous owner is still valid, we may
                // need to become the new owner.
                ConsumerId groupOwner;

                groupOwner = messageGroupOwners.get(groupId);
                if (groupOwner == null) {
                    assignGroup(subscription, messageGroupOwners, node, groupId);
                } else {
                    if (groupOwner.equals(subscription.getConsumerInfo().getConsumerId())) {
                        // A group sequence < 1 is an end of group signal.
                        if (sequence < 0) {
                            messageGroupOwners.removeGroup(groupId);
                            subscription.getConsumerInfo().setLastDeliveredSequenceId(subscription.getConsumerInfo().getLastDeliveredSequenceId() - 1);
                        }
                    } else {
                        result = false;
                    }
View Full Code Here

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

        // Keep message groups together.
        String groupId = node.getGroupID();
        int sequence = node.getGroupSequence();
        if (groupId != null) {

            MessageGroupMap messageGroupOwners = getMessageGroupOwners();
            // If we can own the first, then no-one else should own the
            // rest.
            if (sequence == 1) {
                assignGroup(subscription, messageGroupOwners, node, groupId);
            } else {

                // Make sure that the previous owner is still valid, we may
                // need to become the new owner.
                ConsumerId groupOwner;

                groupOwner = messageGroupOwners.get(groupId);
                if (groupOwner == null) {
                    assignGroup(subscription, messageGroupOwners, node, groupId);
                } else {
                    if (groupOwner.equals(subscription.getConsumerInfo().getConsumerId())) {
                        // A group sequence < 1 is an end of group signal.
                        if (sequence < 0) {
                            messageGroupOwners.removeGroup(groupId);
                            subscription.getConsumerInfo().setLastDeliveredSequenceId(subscription.getConsumerInfo().getLastDeliveredSequenceId() - 1);
                        }
                    } else {
                        result = false;
                    }
View Full Code Here

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

        // Keep message groups together.
        String groupId = node.getGroupID();
        int sequence = node.getGroupSequence();
        if (groupId != null) {

            MessageGroupMap messageGroupOwners = getMessageGroupOwners();
            // If we can own the first, then no-one else should own the
            // rest.
            if (sequence == 1) {
                assignGroup(subscription, messageGroupOwners, node, groupId);
            } else {

                // Make sure that the previous owner is still valid, we may
                // need to become the new owner.
                ConsumerId groupOwner;

                groupOwner = messageGroupOwners.get(groupId);
                if (groupOwner == null) {
                    assignGroup(subscription, messageGroupOwners, node, groupId);
                } else {
                    if (groupOwner.equals(subscription.getConsumerInfo().getConsumerId())) {
                        // A group sequence < 1 is an end of group signal.
                        if (sequence < 0) {
                            messageGroupOwners.removeGroup(groupId);
                            subscription.getConsumerInfo().setLastDeliveredSequenceId(subscription.getConsumerInfo().getLastDeliveredSequenceId() - 1);
                        }
                    } else {
                        result = false;
                    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.