Example #1
0
 /**
  * Returning request from service client. For run any actions.
  * @return string
  */
 public function request()
 {
     $this->logger->info('Receive request from queue', ['nodeName' => $this->name]);
     return json_decode(Rabbit::read($this->requestQueue), true);
 }
Example #2
0
 /**
  * Returning request from service client. For run any actions.
  * @return array|bool
  */
 public function request()
 {
     return json_decode(Rabbit::read($this->requestQueue), true);
 }
Example #3
0
 /**
  * Get notification about requested action complete. Returning request/data key for identify needed results.
  * (which will used in getData() method)
  * @throws \Exception
  * @return array|bool
  */
 public function getNotify()
 {
     $message = Rabbit::read($this->notifyQueue);
     if (!$message) {
         return false;
     }
     $this->logger->info('Node notification fetched', ['nodeName' => $this->name, 'notifyType' => 'complete', 'message' => $message]);
     return json_decode($message, true);
 }