public function sendNack($payload, $purge = false, $requeue = true)
    {

        if (empty($payload->delivery_info['delivery_tag'])) {
            throw new Exception('sendNack: delivery_tag not set.');
        }

        $payload->delivery_info['channel']->basic_nack($payload->delivery_info['delivery_tag'], $purge, $requeue);
    }
public function sendNack($payload, $purge = false, $requeue = true)
    {

        if (empty($payload->delivery_info['delivery_tag'])) {
            throw new Exception('sendNack: delivery_tag not set.');
        }

        $payload->delivery_info['channel']->basic_nack($payload->delivery_info['delivery_tag'], $purge, $requeue);
    }
public function sendNack ( $ payload , $ purge = false , $ requeue = true ) { if ( empty ( $ payload -> delivery_info [ 'delivery_tag' ] ) ) { throw new Exception ( 'sendNack: delivery_tag not set.' ) ; } $ payload -> delivery_info [ 'channel' ] -> basic_nack ( $ payload -> delivery_info [ 'delivery_tag' ] , $ purge , $ requeue ) ; }
Sends an non acknowledgement back to the message broker so the message can be
rejected or returned to the queue.

https://www.rabbitmq.com/nack.html

@param $payload
The payload received in the consume callback.
@param $purge
Reject messages in bulk - all unacked messages up to the current message defined in $payload
@param $requeue
Reject and requeue (to potentially allow other consumer to process)
Sends an non acknowledgement back to the message broker so the message can be rejected or returned to the queue .