src/Queues/Collection.php
public function fromSubscriptions(string $topic): array
    {
        $response = [];

        if (empty($topic)) {
            return $response;
        }

        $subscriptions = $this->client->call('subscription', 'default', 'all', $topic);
        $subscriptions = json_decode($subscriptions, true) ?: [];

        foreach ($subscriptions as $subscription => $queues) {
            $topicPattern = str_replace(['.', '*', '#'], ['\.', '[a-zA-z0-9^.]{1,}', '.*'], $subscription);
            if (preg_match("/^$topicPattern$/", $topic)) {
                $response = array_merge($response, $queues);
            }
        }

        return array_unique($response);
    }
public function fromSubscriptions(string $topic): array
    {
        $response = [];

        if (empty($topic)) {
            return $response;
        }

        $subscriptions = $this->client->call('subscription', 'default', 'all', $topic);
        $subscriptions = json_decode($subscriptions, true) ?: [];

        foreach ($subscriptions as $subscription => $queues) {
            $topicPattern = str_replace(['.', '*', '#'], ['\.', '[a-zA-z0-9^.]{1,}', '.*'], $subscription);
            if (preg_match("/^$topicPattern$/", $topic)) {
                $response = array_merge($response, $queues);
            }
        }

        return array_unique($response);
    }
Gets a list of existent Queues matched by topic.

@param  string $topic
@return Queue[]