Consumer cancelled by server.

        Most likely the queue was deleted.
480684
def _basic_cancel_notify(self, args):
        
        consumer_tag = args.read_shortstr()
        callback = self._on_cancel(consumer_tag)
        if callback:
            callback(consumer_tag)
        else:
            raise ConsumerCancelled(consumer_tag, (60, 30))
981064
function(err) {
  // this set to the appropriate client via apply call in performConnect
  var client = this;
  if (typeof client === 'undefined'/* || client.constructor !== Client*/) {
    logger.entry('processQueuedActions', 'client was not set');
    logger.exit('processQueuedActions', 'client not set returning', null);
    return;
  }
  logger.entry('processQueuedActions', client.id);
  logger.log('parms', client.id, 'err:', err);
  logger.log('data', client.id, 'client.state:', client.state);

  if (!err) {
    var performSend = function() {
      logger.entry('performSend', client.id);
      logger.log('data', client.id, 'client._queuedSends',
                 client._queuedSends);
      while (client._queuedSends.length > 0 &&
              client.state === STATE_STARTED) {
        var remaining = client._queuedSends.length;
        var msg = client._queuedSends.shift();
        client.send(msg.topic, msg.data, msg.options, msg.callback);
        if (client._queuedSends.length >= remaining) {
          // Calling client.send can cause messages to be added back into
          // _queuedSends, if the network connection is broken.  Check that the
          // size of the array is decreasing to avoid looping forever...
          break;
        }
      }

      logger.exit('performSend', client.id, null);
    };

    var performUnsub = function() {
      logger.entry('performUnsub', client.id);

      if (client._queuedUnsubscribes.length > 0 &&
          client.state === STATE_STARTED) {
        var rm = client._queuedUnsubscribes.shift();
        logger.log('data', client.id, 'rm:', rm);
        if (rm.noop) {
          // no-op, so just trigger the callback without actually unsubscribing
          if (rm.callback) {
            logger.entry('performUnsub.callback', client.id);
            rm.callback.apply(client, [null, rm.topicPattern, rm.share]);
            logger.exit('performUnsub.callback', client.id, null);
          }
          setImmediate(function() {
            performUnsub.apply(client);
          });
        } else {
          client.unsubscribe(rm.topicPattern, rm.share, rm.options,
              function(err, topicPattern, share) {
                if (rm.callback) {
                  logger.entry('performUnsub.callback', client.id);
                  rm.callback.apply(client, [err, topicPattern, share]);
                  logger.exit('performUnsub.callback', client.id, null);
                }
                setImmediate(function() {
                  performUnsub.apply(client);
                });
              }
          );
        }
      } else {
        performSend.apply(client);
      }

      logger.exit('performUnsub', client.id, null);
    };

    var performSub = function() {
      logger.entry('performSub', client.id);

      if (client._queuedSubscriptions.length > 0 &&
          client.state === STATE_STARTED) {
        var sub = client._queuedSubscriptions.shift();
        logger.log('data', client.id, 'sub:', sub);
        if (sub.noop) {
          // no-op, so just trigger the callback without actually subscribing
          if (sub.callback) {
            process.nextTick(function() {
              logger.entry('performSub.callback', client.id);
              logger.log('parms', client.id, 'err:', err, ', topicPattern:',
                         sub.topicPattern, ', originalShareValue:', sub.share);
              sub.callback.apply(client,
                  [err, sub.topicPattern, sub.originalShareValue]);
              logger.exit('performSub.callback', client.id, null);
            });
          }
          setImmediate(function() {
            performSub.apply(client);
          });
        } else {
          client.subscribe(sub.topicPattern, sub.share, sub.options,
              function(err, topicPattern, share) {
                if (sub.callback) {
                  process.nextTick(function() {
                    logger.entry('performSub.callback',
                                 client.id);
                    logger.log('parms', client.id, 'err:', err,
                               ', topicPattern:', topicPattern,
                               ', share:', share);
                    sub.callback.apply(client,
                        [err, topicPattern, share]);
                    logger.exit('performSub.callback',
                                client.id, null);
                  });
                }
                setImmediate(function() {
                  performSub.apply(client);
                });
              }
          );
        }
      } else {
        performUnsub.apply(client);
      }

      logger.exit('performSub', client.id, null);
    };

    performSub();
  }
  logger.exit('processQueuedActions', client.id, null);
}
842666
String recoverQueue(String queueName, QueueDeclaration queueDeclaration) throws Exception {
    try {
      String newQueueName =
          ((Queue.DeclareOk) queueDeclaration.invoke(getRecoveryChannel())).getQueue();
      if (queueName.equals(newQueueName))
        log.info("Recovered queue {} via {}", queueName, this);
      else {
        log.info("Recovered queue {} as {} via {}", queueName, newQueueName, this);
        queueDeclaration.name = newQueueName;
      }

      return newQueueName;
    } catch (Exception e) {
      log.error("Failed to recover queue {} via {}", queueName, this, e);
      if (throwOnRecoveryFailure() || Exceptions.isCausedByConnectionClosure(e))
        throw e;
      return queueName;
    }
  }
594777
public ConsumerSession getConsumerSession()
  throws SISessionUnavailableException, SISessionDroppedException,
         SIIncorrectCallException
  {
    if (TraceComponent.isAnyTracingEnabled() && CoreSPILockedMessageEnumeration.tc.isEntryEnabled())
      SibTr.entry(CoreSPILockedMessageEnumeration.tc, "getConsumerSession",
        new Integer(hashCode()));

    checkValidState("getConsumerSession");

    localConsumerPoint.checkNotClosed();

    if (TraceComponent.isAnyTracingEnabled() && CoreSPILockedMessageEnumeration.tc.isEntryEnabled())
      SibTr.exit(CoreSPILockedMessageEnumeration.tc, "getConsumerSession", consumerSession);

    return consumerSession;
  }
395266
def consumer_shutdown_task(processor, check_point_tracker):
    
    exception = None
    try:
        processor.shutdown(check_point_tracker)
    except Exception as e:
        print(e)
        exception = None

    try:
        check_point_tracker.get_check_point()
    except Exception:
        logger.error('Failed to flush check point', exc_info=True)

    return TaskResult(exception)
469682
def connectionLost(self, reason=protocol.connectionDone):
        
        self.connected = 0

        for pending in self._queue.values():
            pending.errback(reason)
        self._queue.clear()

        if self._stopped:
            result = self if reason.check(error.ConnectionDone) else reason
            self._stopped.callback(result)
            self._stopped = None
        else:
            reason.raiseException()
965013
def queue_get_stoppable(self, q):
        
        while not self.stopped():
            try:
                return q.get(timeout=5)
            except queue.Empty:
                pass
694491
static void checkForKqueueLibrary() {

        LettuceAssert.assertState(KQUEUE_ENABLED,
                String.format("kqueue use is disabled via System properties (%s)", KQUEUE_ENABLED_KEY));
        LettuceAssert
                .assertState(
                        isAvailable(),
                        "netty-transport-native-kqueue is not available. Make sure netty-transport-native-kqueue library on the class path and supported by your operating system.");
    }
634454
public void localQueuePointRemoved(SIBUuid8 messagingEngineUuid)
  {
    if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
      SibTr.entry(
        tc,
        "localQueuePointRemoved",
        new Object[] {messagingEngineUuid});

    synchronized(_queuePointsGuessSet)
    {
      _queuePointsGuessSet.remove(messagingEngineUuid);

      // This ME no longer localises the destination
      _hasLocal = false;
    }

    //update TRM if necessary
    updateTrmAdvertisements();

    if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
      SibTr.exit(tc, "localQueuePointRemoved");

  }
1243779
def cancel(self, consumer_tag='', nowait=True, consumer=None, cb=None):
        '''
        
        '''
        # Remove the consumer's broker-cancel callback entry
        if consumer:
            tag = self._lookup_consumer_tag_by_consumer(consumer)
            if tag:
                consumer_tag = tag

        try:
            del self._broker_cancel_cb_map[consumer_tag]
        except KeyError:
            self.logger.warning(
                'cancel: no broker-cancel-cb entry for consumer tag %r '
                '(consumer %r)', consumer_tag, consumer)

        # Cancel consumer
        super(RabbitBasicClass, self).cancel(consumer_tag, nowait, consumer, cb)
1035622
@Override
    public void deregisterConsumerSetMonitor(
                                             ConsumerSetChangeCallback callback)
                    throws SINotPossibleInCurrentConfigurationException
    {
        if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
            SibTr.entry(
                        tc,
                        "deregisterConsumerSetMonitor",
                        new Object[] { callback });

        _messageProcessor.
                        getMessageProcessorMatching().
                        deregisterConsumerSetMonitor(this, callback);

        if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
            SibTr.exit(tc, "deregisterConsumerSetMonitor");
    }
1020129
def pipeline(self, consumer):
        
        if self._pipeline is None:
            self._pipeline = ResponsePipeline(self)
            self.event('connection_lost').bind(self._close_pipeline)
        self._pipeline.put(consumer)
1139184
protected void removeBifurcatedConsumer(BifurcatedConsumerSessionImpl consumer) throws SIResourceException, SISessionDroppedException
    {
        if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
            SibTr.entry(tc, "removeBifurcatedConsumer", consumer);

        synchronized (_bifurcatedConsumers)
        {
            _bifurcatedConsumers.remove(consumer);
        }

        // Cleanup after the bifurcated consumer (unlock any messages it owns)
        _localConsumerPoint.cleanupBifurcatedConsumer(consumer);

        if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
            SibTr.exit(tc, "removeBifurcatedConsumer");
    }
248666
public void closeAllConsumersForDelete(DestinationHandler destinationBeingDeleted)
    {
        if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
            SibTr.entry(tc, "closeAllConsumersForDelete", destinationBeingDeleted);

        Iterator<DispatchableKey> itr = null;
        Iterator<DispatchableKey> clonedItr = null;

        // The consumerPoints list is cloned for the notifyException
        // call.
        synchronized (consumerPoints)
        {
            //since the close of the underlying session causes the consumer point to
            //be removed from the list we have to take a clone of the list
            clonedItr = ((LinkedList<DispatchableKey>) consumerPoints.clone()).iterator();
            itr = ((LinkedList<DispatchableKey>) consumerPoints.clone()).iterator();
        }

        // Defect 360452
        // Iterate twice to avoid deadlock. First iteration to mark
        // as not ready. This ensure no messages on the destination
        // will arrive at the consumers.
        synchronized (_baseDestHandler.getReadyConsumerPointLock())
        {
            while (itr.hasNext())
            {
                DispatchableKey consumerKey = itr.next();

                // If we're making the consumer notReady then we must also remove
                // them from the list of ready consumers that we hold
                if (consumerKey.isKeyReady())
                    removeReadyConsumer(consumerKey.getParent(), consumerKey.isSpecific());

                consumerKey.markNotReady();
            }
        }

        // Second iteration to close sessions outside of readyConsumerPointLock
        // to avoid deadlock with receive.
        while (clonedItr.hasNext())
        {
            DispatchableKey consumerKey = clonedItr.next();
            consumerKey.getConsumerPoint().implicitClose(destinationBeingDeleted.getUuid(), null, _messageProcessor.getMessagingEngineUuid());
        }

        // Close any browsers
        closeBrowsersDestinationDeleted(destinationBeingDeleted);

        if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
            SibTr.exit(tc, "closeAllConsumersForDelete");
    }
54848
void cleanupQueue(SubscriptionImpl subscription, Queue<Object> queue) {
        final Throwable cause = ClosedPublisherException.get();
        for (;;) {
            final Object e = queue.poll();
            if (e == null) {
                break;
            }

            try {
                if (e instanceof CloseEvent) {
                    notifySubscriberOfCloseEvent(subscription, (CloseEvent) e);
                    continue;
                }

                if (e instanceof CompletableFuture) {
                    ((CompletableFuture<?>) e).completeExceptionally(cause);
                }

                @SuppressWarnings("unchecked")
                final T obj = (T) e;
                onRemoval(obj);
            } finally {
                ReferenceCountUtil.safeRelease(e);
            }
        }
    }
381773
@Override
    public void resumeConsumer(int suspendFlag)
    {
        if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
            SibTr.entry(tc, "resumeConsumer", this);

        // Use this flag to identify whether a new thread must be spun off to look for more
        // messages
        boolean spinOffNewThread = false;
        try
        {
            // Take the lock
            this.lock();

            if (_consumerSuspended)
            {
                boolean setStillSuspended = false;

                // If we're resuming due to the ConsumerSet being resumed then we need to
                // re-check the set's state due to us not holding the set's activeMessageCount
                // lock at this time (due to the hierarchy). And if we find that the set is
                // actually suspended (due to someone else in the set getting in and adding
                // another message then we just ignore this resume as there'll be another one
                // along when the count drops back below the limit again.
                if (suspendFlag == DispatchableConsumerPoint.SUSPEND_FLAG_SET_ACTIVE_MSGS)
                    setStillSuspended = _consumerKey.isConsumerSetSuspended();

                if (!setStillSuspended)
                {
                    // clear the bit provided in the _suspendFlags
                    _suspendFlags &= ~suspendFlag;

                    if (_suspendFlags == 0) // No flags set so resume the consumer
                    {
                        _consumerSuspended = false;

                        // If the consumer is still active (started) we need
                        // to kickstart the consumer back into life to check for more
                        // messages
                        if (!_stopped && !_closing)
                        {
                            if (_asynchConsumerRegistered)
                            {
                                if (!_asynchConsumer.isAsynchConsumerRunning())
                                {
                                    // We'll have to take the full lock hierarchy and
                                    // possibly spin off another thread to start looking for more messages
                                    // (just like start())
                                    spinOffNewThread = true;
                                }
                            }
                            else
                            {
                                // Wake up any synchronous receivers
                                _waiter.signal();
                            }
                        }
                    }
                }
            }
        } finally
        {
            this.unlock();
        }

        // start a new thread to run the callback if we determined that it was necessary   
        if (spinOffNewThread)
        {
            try
            {
                _messageProcessor.startNewThread(new AsynchThread(this, false));
            } catch (InterruptedException e)
            {
                FFDCFilter.processException(
                                            e,
                                            "com.ibm.ws.sib.processor.impl.JSLocalConsumerPoint.resumeConsumer",
                                            "1:4978:1.22.5.1",
                                            this);

                SibTr.exception(tc, e);

                if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
                    SibTr.exit(tc, "resumeConsumer", e);
            }
        }

        if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
            SibTr.exit(tc, "resumeConsumer");
    }
1251581
def cancel(self):
        """"""
        if self.channel_open:
            try:
                self.backend.cancel(self.consumer_tag)
            except KeyError:
                pass