git-svn-id: https://svn.apache.org/repos/asf/activemq/trunk@729703 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Robert Davies 2008-12-28 08:13:05 +00:00
parent bbdedeadf6
commit dfdd8963ad
1 changed files with 7 additions and 3 deletions

View File

@ -218,7 +218,9 @@ public class TopicSubscription extends AbstractSubscription {
// Message was delivered but not acknowledged: update pre-fetch
// counters.
dequeueCounter.addAndGet(ack.getMessageCount());
destination.getDestinationStatistics().getInflight().subtract(ack.getMessageCount());
if (destination != null) {
destination.getDestinationStatistics().getInflight().subtract(ack.getMessageCount());
}
dispatchMatched();
return;
}
@ -436,8 +438,10 @@ public class TopicSubscription extends AbstractSubscription {
matched.remove(message);
discarded++;
dequeueCounter.incrementAndGet();
destination.getDestinationStatistics().getDequeues().increment();
destination.getDestinationStatistics().getInflight().decrement();
if(destination != null) {
destination.getDestinationStatistics().getDequeues().increment();
destination.getDestinationStatistics().getInflight().decrement();
}
if (LOG.isDebugEnabled()) {
LOG.debug("Discarding message " + message);
}