code: def add_on_connection_close_callback(self):
          
          self._logger.debug('Adding connection close callback')
          self._connection.add_on_close_callback(self.on_connection_closed)
docs: Add an on close callback that will be invoked by pika
          when RabbitMQ closes the connection to the publisher unexpectedly.