Class QueueBrowserSubscription

All Implemented Interfaces:
LockOwner, Subscription, SubscriptionRecovery

public class QueueBrowserSubscription extends QueueSubscription
  • Field Details

    • LOG

      protected static final org.slf4j.Logger LOG
  • Constructor Details

    • QueueBrowserSubscription

      public QueueBrowserSubscription(Broker broker, SystemUsage usageManager, ConnectionContext context, org.apache.activemq.command.ConsumerInfo info) throws jakarta.jms.JMSException
      Throws:
      jakarta.jms.JMSException
  • Method Details

    • canDispatch

      protected boolean canDispatch(org.apache.activemq.broker.region.MessageReference node)
      Description copied from class: PrefetchSubscription
      Use when a matched message is about to be dispatched to the client.
      Overrides:
      canDispatch in class QueueSubscription
      Returns:
      false if the message should not be dispatched to the client (another sub may have already dispatched it for example).
    • toString

      public String toString()
      Overrides:
      toString in class QueueSubscription
    • destinationsAdded

      public void destinationsAdded() throws Exception
      Throws:
      Exception
    • isDuplicate

      public boolean isDuplicate(org.apache.activemq.command.MessageId messageId)
    • matches

      public boolean matches(org.apache.activemq.broker.region.MessageReference node, org.apache.activemq.filter.MessageEvaluationContext context) throws IOException
      Description copied from interface: Subscription
      Is the subscription interested in the message?
      Specified by:
      matches in interface Subscription
      Overrides:
      matches in class AbstractSubscription
      Returns:
      true if matching
      Throws:
      IOException
    • acknowledge

      protected void acknowledge(ConnectionContext context, org.apache.activemq.command.MessageAck ack, org.apache.activemq.broker.region.MessageReference n) throws IOException
      Since we are a browser we don't really remove the message from the queue.
      Overrides:
      acknowledge in class QueueSubscription
      Throws:
      IOException
    • incrementQueueRef

      public void incrementQueueRef()
    • decrementQueueRef

      public void decrementQueueRef() throws Exception
      Throws:
      Exception
    • remove

      public List<org.apache.activemq.broker.region.MessageReference> remove(ConnectionContext context, Destination destination) throws Exception
      Description copied from interface: Subscription
      The subscription will be no longer be receiving messages from the destination.
      Specified by:
      remove in interface Subscription
      Overrides:
      remove in class PrefetchSubscription
      Returns:
      a list of un-acked messages that were added to the subscription.
      Throws:
      Exception
    • atMax

      public boolean atMax()
    • setMaxMessages

      public void setMaxMessages(long max)