def METHOD_NAME(self):
    ''' Stop the Bot if cannot connect to AMQP Server after the defined connection attempts '''
    # self._connection and self.channel can be None
    if getattr(self._connection, 'is_closed', None) or getattr(self.channel, 'is_closed', None):
        self.connect_server()
    event = self.receive_message()
    body = self.export_event(event, return_type=str)
    # replace unicode characters when encoding (#1296)
    body = body.encode(errors='backslashreplace')
    if self.format_routing_key:
        routing_key = self.routing_key.format(ev=event)
    else:
        routing_key = self.routing_key
    try:
        if not self.channel.basic_publish(exchange=self.exchange_name,
                                          routing_key=routing_key,
                                          body=body,
                                          properties=self.properties,
                                          mandatory=True):
            if self.require_confirmation and not self.publish_raises_nack:
                raise ValueError('Message sent but not confirmed.')
            elif not self.publish_raises_nack:
                self.logger.info('Message sent but not confirmed.')
    except (pika.exceptions.ChannelError, pika.exceptions.AMQPChannelError,
            pika.exceptions.NackError):
        self.logger.exception('Error publishing the message.')
    except pika.exceptions.UnroutableError:
        self.logger.exception('The destination queue does not exist, declare it first. See also the README.')
        self.stop()
    else:
        self.acknowledge_message()