code: def __error_callback(self, exception, interval):
          
          logging.error('Error while publishing {}'.format(
              exception))
          logging.info('Retry in %s seconds.', interval)
docs: Execute when there is an error while sending a message.
  
          :param exception: Exception which has been thrown while trying to send
              the message.
          :param interval: Interval in which the message delivery will be
              retried.