public function cancel($consumer_tag = '') {

        if($consumer_tag === '')
            $consumer_tag = $this->consumer_tag;

        try {
            $this->channel->_getChannel()->basic_cancel($consumer_tag);
        } catch (AMQPRuntimeException $e) {
            throw new AMQPConnectionException($e->getMessage(), $e->getCode(), $e->getPrevious());
        } catch (Exception $e) {
            return false;
        }

        return true;
    }
public function cancel($consumer_tag = '') {

        if($consumer_tag === '')
            $consumer_tag = $this->consumer_tag;

        try {
            $this->channel->_getChannel()->basic_cancel($consumer_tag);
        } catch (AMQPRuntimeException $e) {
            throw new AMQPConnectionException($e->getMessage(), $e->getCode(), $e->getPrevious());
        } catch (Exception $e) {
            return false;
        }

        return true;
    }
public function cancel ( $ consumer_tag = '' ) { if ( $ consumer_tag === '' ) $ consumer_tag = $ this -> consumer_tag ; try { $ this -> channel -> _getChannel ( ) -> basic_cancel ( $ consumer_tag ) ; } catch ( AMQPRuntimeException $ e ) { throw new AMQPConnectionException ( $ e -> getMessage ( ) , $ e -> getCode ( ) , $ e -> getPrevious ( ) ) ; } catch ( Exception $ e ) { return false ; } return true ; }
Cancel a queue that is already bound to an exchange and routing key.

@param string $consumer_tag The queue name to cancel, if the queue
object is not already representative of
a queue.

@throws AMQPChannelException    If the channel is not open.
@throws AMQPConnectionException If the connection to the broker was lost.

@return bool;
Cancel a queue that is already bound to an exchange and routing key .