Examples of OrderedPendingList


Examples of org.apache.activemq.broker.region.cursors.OrderedPendingList

            pagedInMessagesLock.writeLock().lock();
            try {
                if(isPrioritizedMessages()) {
                    resultList = new PrioritizedPendingList();
                } else {
                    resultList = new OrderedPendingList();
                }
                for (QueueMessageReference ref : result) {
                    if (!pagedInMessages.contains(ref)) {
                        pagedInMessages.addMessageLast(ref);
                        resultList.addMessageLast(ref);
                    } else {
                        ref.decrementReferenceCount();
                        // store should have trapped duplicate in it's index, also cursor audit
                        // we need to remove the duplicate from the store in the knowledge that the original message may be inflight
                        // note: jdbc store will not trap unacked messages as a duplicate b/c it gives each message a unique sequence id
                        LOG.warn("{}, duplicate message {} paged in, is cursor audit disabled? Removing from store and redirecting to dlq", this, ref.getMessage());
                        if (store != null) {
                            ConnectionContext connectionContext = createConnectionContext();
                            store.removeMessage(connectionContext, new MessageAck(ref.getMessage(), MessageAck.POSION_ACK_TYPE, 1));
                            broker.getRoot().sendToDeadLetterQueue(connectionContext, ref.getMessage(), null, new Throwable("duplicate paged in from store for " + destination));
                        }
                    }
                }
            } finally {
                pagedInMessagesLock.writeLock().unlock();
            }
        } else {
            // Avoid return null list, if condition is not validated
            resultList = new OrderedPendingList();
        }

        return resultList;
    }
View Full Code Here

Examples of org.apache.activemq.broker.region.cursors.OrderedPendingList

        if (prioritizedMessages && this.pagedInPendingDispatch instanceof OrderedPendingList) {
            pagedInPendingDispatch = new PrioritizedPendingList();
            redeliveredWaitingDispatch = new PrioritizedPendingList();
        } else if(pagedInPendingDispatch instanceof PrioritizedPendingList) {
            pagedInPendingDispatch = new OrderedPendingList();
            redeliveredWaitingDispatch = new OrderedPendingList();
        }
    }
View Full Code Here

Examples of org.apache.activemq.broker.region.cursors.OrderedPendingList

                    ((QueueBrowserSubscription)sub).decrementQueueRef();
                    browserDispatches.remove(sub);
                }
                // AMQ-5107: don't resend if the broker is shutting down
                if (!redeliveredWaitingDispatch.isEmpty() && (! this.brokerService.isStopping())) {
                    doDispatch(new OrderedPendingList());
                }
            } finally {
                consumersLock.writeLock().unlock();
            }
            if (!this.optimizedDispatch) {
View Full Code Here

Examples of org.apache.activemq.broker.region.cursors.OrderedPendingList

            pagedInMessagesLock.writeLock().lock();
            try {
                if(isPrioritizedMessages()) {
                    resultList = new PrioritizedPendingList();
                } else {
                    resultList = new OrderedPendingList();
                }
                for (QueueMessageReference ref : result) {
                    if (!pagedInMessages.contains(ref)) {
                        pagedInMessages.addMessageLast(ref);
                        resultList.addMessageLast(ref);
                    } else {
                        ref.decrementReferenceCount();
                        // store should have trapped duplicate in it's index, also cursor audit
                        // we need to remove the duplicate from the store in the knowledge that the original message may be inflight
                        // note: jdbc store will not trap unacked messages as a duplicate b/c it gives each message a unique sequence id
                        LOG.warn("{}, duplicate message {} paged in, is cursor audit disabled? Removing from store and redirecting to dlq", this, ref.getMessage());
                        if (store != null) {
                            ConnectionContext connectionContext = createConnectionContext();
                            store.removeMessage(connectionContext, new MessageAck(ref.getMessage(), MessageAck.POSION_ACK_TYPE, 1));
                            broker.getRoot().sendToDeadLetterQueue(connectionContext, ref.getMessage(), null, new Throwable("duplicate paged in from store for " + destination));
                        }
                    }
                }
            } finally {
                pagedInMessagesLock.writeLock().unlock();
            }
        } else {
            // Avoid return null list, if condition is not validated
            resultList = new OrderedPendingList();
        }

        return resultList;
    }
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.