docs: def on_channel_closed(self, _channel, reply_code, reply_text):
          """Invoked by pika when RabbitMQ unexpectedly closes the channel.
          Channels are usually closed if you attempt to do something that
          violates the protocol, such as re-declare an exchange or queue with
          different parameters. In this case, we'll close the connection
          to shutdown the object.
  
          :param pika.channel.Channel _channel: The AMQP Channel
          :param int reply_code: The AMQP reply code
          :param str reply_text: The AMQP reply text
  
          """
          self.logger.warning('Channel was closed: (%s) %s - %s',
                              reply_code, reply_text, self.state_description)
          if not (400 <= reply_code <= 499):
              self.set_state(self.STATE_CLOSED)
              return
  
          if self.is_shutting_down:
              self.logger.debug('Closing connection')
              self.handle.close()
              return
  
          self.set_state(self.STATE_CONNECTING)
          self.handle.channel(self.on_channel_open)
  
          pending = self.pending_confirmations()
          if not pending:
              raise errors.RabbitMQException(self.name, reply_code, reply_text)
          pending[0][1].future.set_exception(
                  errors.RabbitMQException(self.name, reply_code, reply_text))