@Override public void add(MessageReference node) throws Exception { if (!active.get() && !keepDurableSubsActive) { return; } super.add(node); }
/** * Occurs when a pull times out. If nothing has been dispatched since the * timeout was setup, then send the NULL message. */ final void pullTimeout(long dispatchCounterBeforePull, boolean alwaysSignalDone) { synchronized (pendingLock) { if (dispatchCounterBeforePull == getSubscriptionStatistics().getDispatched().getCount() || alwaysSignalDone) { try { prefetchExtension.set(1); add(QueueMessageReference.NULL_MESSAGE); dispatchPending(); } catch (Exception e) { context.getConnection().serviceException(e); } finally { prefetchExtension.set(0); } } } }
@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(); }
add(QueueMessageReference.NULL_MESSAGE); dispatchPending();
@Override public void add(MessageReference node) throws Exception { if (!active.get() && !keepDurableSubsActive) { return; } super.add(node); }
@Override public void add(MessageReference node) throws Exception { if (!active.get() && !keepDurableSubsActive) { return; } super.add(node); }
@Override public void add(MessageReference node) throws Exception { if (!active.get() && !keepDurableSubsActive) { return; } super.add(node); }
public void add(MessageReference node) throws Exception { if (!active.get() && !keepDurableSubsActive) { return; } super.add(node); }
/** * Occurs when a pull times out. If nothing has been dispatched since the * timeout was setup, then send the NULL message. */ final void pullTimeout(long dispatchCounterBeforePull) { synchronized (pendingLock) { if (dispatchCounterBeforePull == dispatchCounter) { try { add(QueueMessageReference.NULL_MESSAGE); dispatchPending(); } catch (Exception e) { context.getConnection().serviceException(e); } } } }
/** * Occurs when a pull times out. If nothing has been dispatched since the * timeout was setup, then send the NULL message. */ final void pullTimeout(long dispatchCounterBeforePull, boolean alwaysSignalDone) { synchronized (pendingLock) { if (dispatchCounterBeforePull == getSubscriptionStatistics().getDispatched().getCount() || alwaysSignalDone) { try { prefetchExtension.set(1); add(QueueMessageReference.NULL_MESSAGE); dispatchPending(); } catch (Exception e) { context.getConnection().serviceException(e); } finally { prefetchExtension.set(0); } } } }
/** * Occurs when a pull times out. If nothing has been dispatched since the * timeout was setup, then send the NULL message. */ final void pullTimeout(long dispatchCounterBeforePull, boolean alwaysSignalDone) { synchronized (pendingLock) { if (dispatchCounterBeforePull == getSubscriptionStatistics().getDispatched().getCount() || alwaysSignalDone) { try { prefetchExtension.set(1); add(QueueMessageReference.NULL_MESSAGE); dispatchPending(); } catch (Exception e) { context.getConnection().serviceException(e); } finally { prefetchExtension.set(0); } } } }
/** * Occurs when a pull times out. If nothing has been dispatched since the * timeout was setup, then send the NULL message. */ final void pullTimeout(long dispatchCounterBeforePull, boolean alwaysSignalDone) { synchronized (pendingLock) { if (dispatchCounterBeforePull == getSubscriptionStatistics().getDispatched().getCount() || alwaysSignalDone) { try { prefetchExtension.set(1); add(QueueMessageReference.NULL_MESSAGE); dispatchPending(); } catch (Exception e) { context.getConnection().serviceException(e); } finally { prefetchExtension.set(0); } } } }
public void add(ConnectionContext context, Destination destination) throws Exception { super.add(context, destination); // do it just once per destination if (destinations.containsKey(destination.getActiveMQDestination())) { return; } destinations.put(destination.getActiveMQDestination(), destination); if (active.get() || keepDurableSubsActive) { Topic topic = (Topic)destination; topic.activate(context, this); if (pending.isEmpty(topic)) { topic.recoverRetroactiveMessages(context, this); } this.enqueueCounter+=pending.size(); } else if (destination.getMessageStore() != null) { TopicMessageStore store = (TopicMessageStore)destination.getMessageStore(); try { this.enqueueCounter+=store.getMessageCount(subscriptionKey.getClientId(),subscriptionKey.getSubscriptionName()); } catch (IOException e) { JMSException jmsEx = new JMSException("Failed to retrieve eunqueueCount 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(); }
@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(); }
add(QueueMessageReference.NULL_MESSAGE); dispatchPending();
add(QueueMessageReference.NULL_MESSAGE); dispatchPending();
add(QueueMessageReference.NULL_MESSAGE); dispatchPending();
add(QueueMessageReference.NULL_MESSAGE); dispatchPending();