Nats\Connection::queueSubscribe PHP Method

queueSubscribe() public method

Subscribes to an specific event given a subject and a queue.
public queueSubscribe ( string $subject, string $queue, Closure $callback ) : string
$subject string Message topic.
$queue string Queue name.
$callback Closure Closure to be executed as callback.
return string
    public function queueSubscribe($subject, $queue, \Closure $callback)
    {
        $sid = $this->randomGenerator->generateString(16);
        $msg = 'SUB ' . $subject . ' ' . $queue . ' ' . $sid;
        $this->send($msg);
        $this->subscriptions[$sid] = $callback;
        return $sid;
    }