List<MessageDispatch> getUnconsumedMessages() { return messageQueue.removeAll(); }
public void redispatch(ActiveMQDispatcher dispatcher, MessageDispatchChannel unconsumedMessages) throws JMSException { List<MessageDispatch> c = unconsumedMessages.removeAll(); for (MessageDispatch md : c) { this.connection.rollbackDuplicate(dispatcher, md.getMessage()); } Collections.reverse(c); for (Iterator<MessageDispatch> iter = c.iterator(); iter.hasNext();) { MessageDispatch md = iter.next(); executor.executeFirst(md); } }
void clearMessagesInProgress() { if (inProgressClearRequiredFlag.get() > 0) { synchronized (unconsumedMessages.getMutex()) { if (inProgressClearRequiredFlag.get() > 0) { LOG.debug("{} clearing unconsumed list ({}) on transport interrupt", getConsumerId(), unconsumedMessages.size()); // ensure unconsumed are rolledback up front as they may get redelivered to another consumer List<MessageDispatch> list = unconsumedMessages.removeAll(); if (!this.info.isBrowser()) { for (MessageDispatch old : list) { session.connection.rollbackDuplicate(this, old.getMessage()); } } // allow dispatch on this connection to resume session.connection.transportInterruptionProcessingComplete(); inProgressClearRequiredFlag.decrementAndGet(); // Wake up any blockers and allow them to recheck state. unconsumedMessages.getMutex().notifyAll(); } } } clearDeliveredList(); }
List<MessageDispatch> list = unconsumedMessages.removeAll(); if (!this.info.isBrowser()) { for (MessageDispatch old : list) {
List<MessageDispatch> getUnconsumedMessages() { return messageQueue.removeAll(); }
List<MessageDispatch> getUnconsumedMessages() { return messageQueue.removeAll(); }
List<MessageDispatch> getUnconsumedMessages() { return messageQueue.removeAll(); }
List getUnconsumedMessages() { return messageQueue.removeAll(); }
public void redispatch(ActiveMQDispatcher dispatcher, MessageDispatchChannel unconsumedMessages) throws JMSException { List<MessageDispatch> c = unconsumedMessages.removeAll(); for (MessageDispatch md : c) { this.connection.rollbackDuplicate(dispatcher, md.getMessage()); } Collections.reverse(c); for (Iterator<MessageDispatch> iter = c.iterator(); iter.hasNext();) { MessageDispatch md = iter.next(); executor.executeFirst(md); } }
public void redispatch(ActiveMQDispatcher dispatcher, MessageDispatchChannel unconsumedMessages) throws JMSException { List<MessageDispatch> c = unconsumedMessages.removeAll(); for (MessageDispatch md : c) { this.connection.rollbackDuplicate(dispatcher, md.getMessage()); } Collections.reverse(c); for (Iterator<MessageDispatch> iter = c.iterator(); iter.hasNext();) { MessageDispatch md = iter.next(); executor.executeFirst(md); } }
public void redispatch(ActiveMQDispatcher dispatcher, MessageDispatchChannel unconsumedMessages) throws JMSException { List<MessageDispatch> c = unconsumedMessages.removeAll(); for (MessageDispatch md : c) { this.connection.rollbackDuplicate(dispatcher, md.getMessage()); } Collections.reverse(c); for (Iterator<MessageDispatch> iter = c.iterator(); iter.hasNext();) { MessageDispatch md = iter.next(); executor.executeFirst(md); } }
public void redispatch(ActiveMQDispatcher dispatcher, MessageDispatchChannel unconsumedMessages) throws JMSException { List<MessageDispatch> c = unconsumedMessages.removeAll(); for (MessageDispatch md : c) { this.connection.rollbackDuplicate(dispatcher, md.getMessage()); } Collections.reverse(c); for (Iterator<MessageDispatch> iter = c.iterator(); iter.hasNext();) { MessageDispatch md = iter.next(); executor.executeFirst(md); } }
void clearMessagesInProgress() { if (inProgressClearRequiredFlag.get() > 0) { synchronized (unconsumedMessages.getMutex()) { if (inProgressClearRequiredFlag.get() > 0) { LOG.debug("{} clearing unconsumed list ({}) on transport interrupt", getConsumerId(), unconsumedMessages.size()); // ensure unconsumed are rolledback up front as they may get redelivered to another consumer List<MessageDispatch> list = unconsumedMessages.removeAll(); if (!this.info.isBrowser()) { for (MessageDispatch old : list) { session.connection.rollbackDuplicate(this, old.getMessage()); } } // allow dispatch on this connection to resume session.connection.transportInterruptionProcessingComplete(); inProgressClearRequiredFlag.decrementAndGet(); // Wake up any blockers and allow them to recheck state. unconsumedMessages.getMutex().notifyAll(); } } } clearDeliveredList(); }
void clearMessagesInProgress() { if (inProgressClearRequiredFlag.get() > 0) { synchronized (unconsumedMessages.getMutex()) { if (inProgressClearRequiredFlag.get() > 0) { LOG.debug("{} clearing unconsumed list ({}) on transport interrupt", getConsumerId(), unconsumedMessages.size()); // ensure unconsumed are rolledback up front as they may get redelivered to another consumer List<MessageDispatch> list = unconsumedMessages.removeAll(); if (!this.info.isBrowser()) { for (MessageDispatch old : list) { session.connection.rollbackDuplicate(this, old.getMessage()); } } // allow dispatch on this connection to resume session.connection.transportInterruptionProcessingComplete(); inProgressClearRequiredFlag.decrementAndGet(); // Wake up any blockers and allow them to recheck state. unconsumedMessages.getMutex().notifyAll(); } } } clearDeliveredList(); }
void clearMessagesInProgress() { if (inProgressClearRequiredFlag.get() > 0) { synchronized (unconsumedMessages.getMutex()) { if (inProgressClearRequiredFlag.get() > 0) { LOG.debug("{} clearing unconsumed list ({}) on transport interrupt", getConsumerId(), unconsumedMessages.size()); // ensure unconsumed are rolledback up front as they may get redelivered to another consumer List<MessageDispatch> list = unconsumedMessages.removeAll(); if (!this.info.isBrowser()) { for (MessageDispatch old : list) { session.connection.rollbackDuplicate(this, old.getMessage()); } } // allow dispatch on this connection to resume session.connection.transportInterruptionProcessingComplete(); inProgressClearRequiredFlag.decrementAndGet(); // Wake up any blockers and allow them to recheck state. unconsumedMessages.getMutex().notifyAll(); } } } clearDeliveredList(); }
void clearMessagesInProgress() { if (inProgressClearRequiredFlag) { synchronized (unconsumedMessages.getMutex()) { if (inProgressClearRequiredFlag) { if (LOG.isDebugEnabled()) { LOG.debug(getConsumerId() + " clearing dispatched list (" + unconsumedMessages.size() + ") on transport interrupt"); } // ensure unconsumed are rolledback up front as they may get redelivered to another consumer List<MessageDispatch> list = unconsumedMessages.removeAll(); if (!this.info.isBrowser()) { for (MessageDispatch old : list) { session.connection.rollbackDuplicate(this, old.getMessage()); } } // allow dispatch on this connection to resume session.connection.transportInterruptionProcessingComplete(); inProgressClearRequiredFlag = false; } } } }
List<MessageDispatch> list = unconsumedMessages.removeAll(); if (!this.info.isBrowser()) { for (MessageDispatch old : list) {
List<MessageDispatch> list = unconsumedMessages.removeAll(); if (!this.info.isBrowser()) { for (MessageDispatch old : list) {
List<MessageDispatch> list = unconsumedMessages.removeAll(); if (!this.info.isBrowser()) { for (MessageDispatch old : list) {
List<MessageDispatch> list = unconsumedMessages.removeAll(); if (!this.info.isBrowser()) { for (MessageDispatch old : list) {