Class QueueSubscription

All Implemented Interfaces:
LockOwner, Subscription, SubscriptionRecovery
Direct Known Subclasses:
QueueBrowserSubscription

public class QueueSubscription extends PrefetchSubscription implements LockOwner
  • Constructor Details

    • QueueSubscription

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

    • acknowledge

      protected void acknowledge(ConnectionContext context, org.apache.activemq.command.MessageAck ack, org.apache.activemq.broker.region.MessageReference n) throws IOException
      In the queue case, mark the node as dropped and then a gc cycle will remove it from the queue.
      Specified by:
      acknowledge in class PrefetchSubscription
      Throws:
      IOException
    • canDispatch

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

      public String toString()
      Overrides:
      toString in class Object
    • getLockPriority

      public int getLockPriority()
      Specified by:
      getLockPriority in interface LockOwner
    • isLockExclusive

      public boolean isLockExclusive()
      Specified by:
      isLockExclusive in interface LockOwner
    • destroy

      public void destroy()
      Description copied from interface: Subscription
      Called when the subscription is destroyed.
      Specified by:
      destroy in interface Subscription
    • isDropped

      protected boolean isDropped(org.apache.activemq.broker.region.MessageReference node)
      Specified by:
      isDropped in class PrefetchSubscription