@Override public long getEnqueueCounter() { return getSubscriptionStatistics().getEnqueues().getCount(); }
@Override public long getEnqueueCounter() { return getSubscriptionStatistics().getEnqueues().getCount(); }
@Override public void add(MessageReference node) throws Exception { synchronized (pendingLock) { // The destination may have just been removed... if (!destinations.contains(node.getRegionDestination()) && node != QueueMessageReference.NULL_MESSAGE) { // perhaps we should inform the caller that we are no longer valid to dispatch to? return; } // Don't increment for the pullTimeout control message. if (!node.equals(QueueMessageReference.NULL_MESSAGE)) { getSubscriptionStatistics().getEnqueues().increment(); } pending.addMessageLast(node); } dispatchPending(); }
@Override public synchronized String toString() { return "DurableTopicSubscription-" + getSubscriptionKey() + ", id=" + info.getConsumerId() + ", active=" + isActive() + ", destinations=" + durableDestinations.size() + ", total=" + getSubscriptionStatistics().getEnqueues().getCount() + ", pending=" + getPendingQueueSize() + ", dispatched=" + getSubscriptionStatistics().getDispatched().getCount() + ", inflight=" + dispatched.size() + ", prefetchExtension=" + getPrefetchExtension(); }
@Override public void add(ConnectionContext context, Destination destination) throws Exception { if (!destinations.contains(destination)) { super.add(context, destination); } // do it just once per destination if (durableDestinations.containsKey(destination.getActiveMQDestination())) { return; } durableDestinations.put(destination.getActiveMQDestination(), destination); if (active.get() || keepDurableSubsActive) { Topic topic = (Topic) destination; topic.activate(context, this); getSubscriptionStatistics().getEnqueues().add(pending.size()); } else if (destination.getMessageStore() != null) { TopicMessageStore store = (TopicMessageStore) destination.getMessageStore(); try { getSubscriptionStatistics().getEnqueues().add(store.getMessageCount(subscriptionKey.getClientId(), subscriptionKey.getSubscriptionName())); } catch (IOException e) { JMSException jmsEx = new JMSException("Failed to retrieve enqueueCount from store " + e); jmsEx.setLinkedException(e); throw jmsEx; } } dispatchPending(); }
getSubscriptionStatistics().getEnqueues().increment(); synchronized (matchedListMutex) { if (getContext().getStopping().get()) { LOG.warn("{}: stopped waiting for space in pendingMessage cursor for: {}", toString(), node.getMessageId()); getSubscriptionStatistics().getEnqueues().decrement(); return;
@Override public long getEnqueueCounter() { return getSubscriptionStatistics().getEnqueues().getCount(); }
@Override public long getEnqueueCounter() { return getSubscriptionStatistics().getEnqueues().getCount(); }
@Override public long getEnqueueCounter() { return getSubscriptionStatistics().getEnqueues().getCount(); }
@Override public long getEnqueueCounter() { return getSubscriptionStatistics().getEnqueues().getCount(); }
@Override public long getEnqueueCounter() { return getSubscriptionStatistics().getEnqueues().getCount(); }
@Override public long getEnqueueCounter() { return getSubscriptionStatistics().getEnqueues().getCount(); }
@Override public void add(MessageReference node) throws Exception { synchronized (pendingLock) { // The destination may have just been removed... if (!destinations.contains(node.getRegionDestination()) && node != QueueMessageReference.NULL_MESSAGE) { // perhaps we should inform the caller that we are no longer valid to dispatch to? return; } // Don't increment for the pullTimeout control message. if (!node.equals(QueueMessageReference.NULL_MESSAGE)) { getSubscriptionStatistics().getEnqueues().increment(); } pending.addMessageLast(node); } dispatchPending(); }
@Override public void add(MessageReference node) throws Exception { synchronized (pendingLock) { // The destination may have just been removed... if (!destinations.contains(node.getRegionDestination()) && node != QueueMessageReference.NULL_MESSAGE) { // perhaps we should inform the caller that we are no longer valid to dispatch to? return; } // Don't increment for the pullTimeout control message. if (!node.equals(QueueMessageReference.NULL_MESSAGE)) { getSubscriptionStatistics().getEnqueues().increment(); } pending.addMessageLast(node); } dispatchPending(); }
@Override public void add(MessageReference node) throws Exception { synchronized (pendingLock) { // The destination may have just been removed... if (!destinations.contains(node.getRegionDestination()) && node != QueueMessageReference.NULL_MESSAGE) { // perhaps we should inform the caller that we are no longer valid to dispatch to? return; } // Don't increment for the pullTimeout control message. if (!node.equals(QueueMessageReference.NULL_MESSAGE)) { getSubscriptionStatistics().getEnqueues().increment(); } pending.addMessageLast(node); } dispatchPending(); }
@Override public synchronized String toString() { return "DurableTopicSubscription-" + getSubscriptionKey() + ", id=" + info.getConsumerId() + ", active=" + isActive() + ", destinations=" + durableDestinations.size() + ", total=" + getSubscriptionStatistics().getEnqueues().getCount() + ", pending=" + getPendingQueueSize() + ", dispatched=" + getSubscriptionStatistics().getDispatched().getCount() + ", inflight=" + dispatched.size() + ", prefetchExtension=" + getPrefetchExtension(); }
@Override public synchronized String toString() { return "DurableTopicSubscription-" + getSubscriptionKey() + ", id=" + info.getConsumerId() + ", active=" + isActive() + ", destinations=" + durableDestinations.size() + ", total=" + getSubscriptionStatistics().getEnqueues().getCount() + ", pending=" + getPendingQueueSize() + ", dispatched=" + getSubscriptionStatistics().getDispatched().getCount() + ", inflight=" + dispatched.size() + ", prefetchExtension=" + getPrefetchExtension(); }
@Override public synchronized String toString() { return "DurableTopicSubscription-" + getSubscriptionKey() + ", id=" + info.getConsumerId() + ", active=" + isActive() + ", destinations=" + durableDestinations.size() + ", total=" + getSubscriptionStatistics().getEnqueues().getCount() + ", pending=" + getPendingQueueSize() + ", dispatched=" + getSubscriptionStatistics().getDispatched().getCount() + ", inflight=" + dispatched.size() + ", prefetchExtension=" + getPrefetchExtension(); }
@Override public void add(ConnectionContext context, Destination destination) throws Exception { if (!destinations.contains(destination)) { super.add(context, destination); } // do it just once per destination if (durableDestinations.containsKey(destination.getActiveMQDestination())) { return; } durableDestinations.put(destination.getActiveMQDestination(), destination); if (active.get() || keepDurableSubsActive) { Topic topic = (Topic) destination; topic.activate(context, this); getSubscriptionStatistics().getEnqueues().add(pending.size()); } else if (destination.getMessageStore() != null) { TopicMessageStore store = (TopicMessageStore) destination.getMessageStore(); try { getSubscriptionStatistics().getEnqueues().add(store.getMessageCount(subscriptionKey.getClientId(), subscriptionKey.getSubscriptionName())); } catch (IOException e) { JMSException jmsEx = new JMSException("Failed to retrieve enqueueCount from store " + e); jmsEx.setLinkedException(e); throw jmsEx; } } dispatchPending(); }
@Override public void add(ConnectionContext context, Destination destination) throws Exception { if (!destinations.contains(destination)) { super.add(context, destination); } // do it just once per destination if (durableDestinations.containsKey(destination.getActiveMQDestination())) { return; } durableDestinations.put(destination.getActiveMQDestination(), destination); if (active.get() || keepDurableSubsActive) { Topic topic = (Topic) destination; topic.activate(context, this); getSubscriptionStatistics().getEnqueues().add(pending.size()); } else if (destination.getMessageStore() != null) { TopicMessageStore store = (TopicMessageStore) destination.getMessageStore(); try { getSubscriptionStatistics().getEnqueues().add(store.getMessageCount(subscriptionKey.getClientId(), subscriptionKey.getSubscriptionName())); } catch (IOException e) { JMSException jmsEx = new JMSException("Failed to retrieve enqueueCount from store " + e); jmsEx.setLinkedException(e); throw jmsEx; } } dispatchPending(); }