src/Bunny/Channel.php
public function addAckListener(callable $callback)
    {
        if ($this->mode !== ChannelModeEnum::CONFIRM) {
            throw new ChannelException("Ack/nack listener can be added when channel in confirm mode.");
        }

        $this->removeAckListener($callback);
        $this->ackCallbacks[] = $callback;
        return $this;
    }
public function addAckListener(callable $callback)
    {
        if ($this->mode !== ChannelModeEnum::CONFIRM) {
            throw new ChannelException("Ack/nack listener can be added when channel in confirm mode.");
        }

        $this->removeAckListener($callback);
        $this->ackCallbacks[] = $callback;
        return $this;
    }
public function addAckListener ( callable $ callback ) { if ( $ this -> mode !== ChannelModeEnum :: CONFIRM ) { throw new ChannelException ( "Ack/nack listener can be added when channel in confirm mode." ) ; } $ this -> removeAckListener ( $ callback ) ; $ this -> ackCallbacks [ ] = $ callback ; return $ this ; }
Listener is called whenever 'basic.ack' or 'basic.nack' is received.

@param callable $callback
@return $this
Listener is called whenever basic . ack or basic . nack is received .