/** * @return the number of messages inflight (dispatched by not acknowledged) by this destination */ public long getInFlightCount() { return destination.getDestinationStatistics().getInflight().getCount(); }
@Override public long getInFlightCount() { return destination.getDestinationStatistics().getInflight().getCount(); }
private void addReferencesAndUpdateRedispatch(LinkedList<MessageReference> redispatch, Destination destination, List<MessageReference> dispatched) { ArrayList<MessageReference> references = new ArrayList<MessageReference>(); for (MessageReference r : dispatched) { if (r.getRegionDestination() == destination) { references.add(r); getSubscriptionStatistics().getInflightMessageSize().addSize(-r.getSize()); } } redispatch.addAll(0, references); destination.getDestinationStatistics().getInflight().subtract(references.size()); dispatched.removeAll(references); }
topicsToDeactivate.add(topic); } else { topic.getDestinationStatistics().getInflight().subtract(dispatched.size());
@Override public void onSuccess() { Destination regionDestination = (Destination) node.getRegionDestination(); regionDestination.getDestinationStatistics().getDispatched().increment(); regionDestination.getDestinationStatistics().getInflight().increment(); node.decrementReferenceCount(); }
@Override public void onFailure() { Destination regionDestination = (Destination) node.getRegionDestination(); regionDestination.getDestinationStatistics().getDispatched().increment(); regionDestination.getDestinationStatistics().getInflight().increment(); node.decrementReferenceCount(); } });
@Override public void onFailure() { Destination nodeDest = (Destination) node.getRegionDestination(); if (nodeDest != null) { if (node != QueueMessageReference.NULL_MESSAGE) { nodeDest.getDestinationStatistics().getDispatched().increment(); nodeDest.getDestinationStatistics().getInflight().increment(); LOG.trace("{} failed to dispatch: {} - {}, dispatched: {}, inflight: {}", new Object[]{ info.getConsumerId(), message.getMessageId(), message.getDestination(), getSubscriptionStatistics().getDispatched().getCount(), dispatched.size() }); } } if (node instanceof QueueMessageReference) { ((QueueMessageReference) node).unlock(); } } });
@Override public void addSubscription(ConnectionContext context, Subscription sub) throws Exception { LOG.debug("{} add sub: {}, dequeues: {}, dispatched: {}, inflight: {}", new Object[]{ getActiveMQDestination().getQualifiedName(), sub, getDestinationStatistics().getDequeues().getCount(), getDestinationStatistics().getDispatched().getCount(), getDestinationStatistics().getInflight().getCount() });
protected void onDispatch(final MessageReference node, final Message message) { Destination nodeDest = (Destination) node.getRegionDestination(); if (nodeDest != null) { if (node != QueueMessageReference.NULL_MESSAGE) { nodeDest.getDestinationStatistics().getDispatched().increment(); nodeDest.getDestinationStatistics().getInflight().increment(); LOG.trace("{} dispatched: {} - {}, dispatched: {}, inflight: {}", new Object[]{ info.getConsumerId(), message.getMessageId(), message.getDestination(), getSubscriptionStatistics().getDispatched().getCount(), dispatched.size() }); } } if (info.isDispatchAsync()) { try { dispatchPending(); } catch (IOException e) { context.getConnection().serviceExceptionAsync(e); } } }
toPageIn, force, destinationStatistics.getInflight().getCount(), pagedInMessages.size(), pagedInPendingSize,
@Override public void afterCommit() throws Exception { Destination nodeDest = (Destination) node.getRegionDestination(); synchronized (dispatchLock) { getSubscriptionStatistics().getDequeues().increment(); if (dispatched.remove(node)) { // if consumer is removed, dispatched will be empty and inflight will // already have been adjusted getSubscriptionStatistics().getInflightMessageSize().addSize(-node.getSize()); nodeDest.getDestinationStatistics().getInflight().decrement(); } } contractPrefetchExtension(1); nodeDest.wakeup(); dispatchPending(); }
getDestinationStatistics().getDequeues().getCount(), getDestinationStatistics().getDispatched().getCount(), getDestinationStatistics().getInflight().getCount(), sub.getConsumerInfo().getAssignedGroupCount(destination) });
private void incrementStatsOnAck(final Destination destination, final MessageAck ack, final int count) { getSubscriptionStatistics().getDequeues().add(count); destination.getDestinationStatistics().getDequeues().add(count); destination.getDestinationStatistics().getInflight().subtract(count); if (info.isNetworkSubscription()) { destination.getDestinationStatistics().getForwards().add(count); } if (ack.isExpiredAck()) { destination.getDestinationStatistics().getExpired().add(count); } }
((Destination)node.getRegionDestination()).getDestinationStatistics().getInflight().decrement(); removeList.add(node); contractPrefetchExtension(1); ((Destination)node.getRegionDestination()).getDestinationStatistics().getInflight().decrement(); dispatched.remove(node); getSubscriptionStatistics().getInflightMessageSize().addSize(-node.getSize()); nodeDest.getDestinationStatistics().getInflight().decrement(); Destination nodeDest = (Destination) node.getRegionDestination(); nodeDest.getDestinationStatistics() .getInflight().decrement(); removeList.add(node); getSubscriptionStatistics().getDequeues().increment();
statsMessage.setLong("dispatchCount", stats.getDispatched().getCount()); statsMessage.setLong("expiredCount", stats.getExpired().getCount()); statsMessage.setLong("inflightCount", stats.getInflight().getCount()); statsMessage.setLong("messagesCached", stats.getMessagesCached().getCount()); statsMessage.setLong("dispatchCount", stats.getDispatched().getCount()); statsMessage.setLong("expiredCount", stats.getExpired().getCount()); statsMessage.setLong("inflightCount", stats.getInflight().getCount());
Destination regionDestination = (Destination) node.getRegionDestination(); regionDestination.getDestinationStatistics().getDispatched().increment(); regionDestination.getDestinationStatistics().getInflight().increment(); node.decrementReferenceCount();
/** * @return the number of messages inflight (dispatched by not acknowledged) by this destination */ public long getInFlightCount() { return destination.getDestinationStatistics().getInflight().getCount(); }
private void addReferencesAndUpdateRedispatch(LinkedList<MessageReference> redispatch, Destination destination, List<MessageReference> dispatched) { ArrayList<MessageReference> references = new ArrayList<MessageReference>(); for (MessageReference r : dispatched) { if (r.getRegionDestination() == destination) { references.add(r); getSubscriptionStatistics().getInflightMessageSize().addSize(-r.getSize()); } } redispatch.addAll(0, references); destination.getDestinationStatistics().getInflight().subtract(references.size()); dispatched.removeAll(references); }
@Override public void onFailure() { Destination regionDestination = (Destination) node.getRegionDestination(); regionDestination.getDestinationStatistics().getDispatched().increment(); regionDestination.getDestinationStatistics().getInflight().increment(); node.decrementReferenceCount(); } });
private void incrementStatsOnAck(final Destination destination, final MessageAck ack, final int count) { getSubscriptionStatistics().getDequeues().add(count); destination.getDestinationStatistics().getDequeues().add(count); destination.getDestinationStatistics().getInflight().subtract(count); if (info.isNetworkSubscription()) { destination.getDestinationStatistics().getForwards().add(count); } if (ack.isExpiredAck()) { destination.getDestinationStatistics().getExpired().add(count); } }