Class QueueSubscription

    • Constructor Detail

      • QueueSubscription

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

      • 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
      • 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