public function request($subject, $payload, \Closure $callback)
    {
        $inbox = uniqid('_INBOX.');
        $sid   = $this->subscribe(
            $inbox,
            $callback
        );
        $this->unsubscribe($sid, 1);
        $this->publish($subject, $payload, $inbox);
        $this->wait(1);
    }
public function request($subject, $payload, \Closure $callback)
    {
        $inbox = uniqid('_INBOX.');
        $sid   = $this->subscribe(
            $inbox,
            $callback
        );
        $this->unsubscribe($sid, 1);
        $this->publish($subject, $payload, $inbox);
        $this->wait(1);
    }
public function request ( $ subject , $ payload , \ Closure $ callback ) { $ inbox = uniqid ( '_INBOX.' ) ; $ sid = $ this -> subscribe ( $ inbox , $ callback ) ; $ this -> unsubscribe ( $ sid , 1 ) ; $ this -> publish ( $ subject , $ payload , $ inbox ) ; $ this -> wait ( 1 ) ; }
Request does a request and executes a callback with the response.

@param string   $subject  Message topic.
@param string   $payload  Message data.
@param \Closure $callback Closure to be executed as callback.

@return void
Request does a request and executes a callback with the response .