public function queueStatus($manager)
    {
        $socket = $this->getSocket($manager);
        $stream = $socket->getStream();

        $stream->send(new QueueStatusRequest());

        $msg = $stream->read(new TimeoutTimer(1500));
        if (!$msg instanceof QueueStatusResponse) {
            throw new RuntimeException('Invalid response: '.get_class($msg).'.');
        }

        return $msg->getQueueStatus();
    }