public function delete($flags = AMQP_NOPARAM) {

        $if_unused = boolval($flags & AMQP_IFUNUSED);

        try {
            list($num_deleted) = $this->channel->_getChannel()->queue_delete($this->name, $if_unused);
        } catch (AMQPRuntimeException $e) {
            throw new AMQPConnectionException($e->getMessage(), $e->getCode(), $e->getPrevious());
        } catch (Exception $e) {
            return 0;
        }

        //Will always be defined if an exception isn't thrown
        return $num_deleted;
    }