protected function queueMessages()
    {
        $pages = $users = $files = $sites = 0;

        foreach ($this->pagesToQueue() as $id) {
            yield "P{$id}";
            $pages++;
        }
        foreach ($this->usersToQueue() as $id) {
            yield "U{$id}";
            $users++;
        }
        foreach ($this->filesToQueue() as $id) {
            yield "F{$id}";
            $files++;
        }
        foreach ($this->sitesToQueue() as $id) {
            yield "S{$id}";
            $sites++;
        }

        // Yield the result very last
        yield 'R' . json_encode([$pages, $users, $files, $sites]);
    }