public function set_nack_handler($callback)
    {
        if (!is_callable($callback)) {
            throw new \InvalidArgumentException(sprintf(
                'Given callback "%s" should be callable. %s type was given.',
                $callback,
                gettype($callback)
            ));
        }

        $this->nack_handler = $callback;
    }
public function set_nack_handler($callback)
    {
        if (!is_callable($callback)) {
            throw new \InvalidArgumentException(sprintf(
                'Given callback "%s" should be callable. %s type was given.',
                $callback,
                gettype($callback)
            ));
        }

        $this->nack_handler = $callback;
    }
public function set_nack_handler ( $ callback ) { if ( ! is_callable ( $ callback ) ) { throw new \ InvalidArgumentException ( sprintf ( 'Given callback "%s" should be callable. %s type was given.' , $ callback , gettype ( $ callback ) ) ) ; } $ this -> nack_handler = $ callback ; }
Sets a handler which called for any message nack'ed by the server, with the AMQPMessage as first argument.

@param callable $callback
@throws \InvalidArgumentException
Sets a handler which called for any message nack ed by the server with the AMQPMessage as first argument .