Пример #1
0
 public function send($data, Config $config)
 {
     $channel = $this->client->channel();
     $channel->queue_declare($config->getDestination(), false, true, false, false);
     $msg = new AMQPMessage($data, $config->getParameters());
     $channel->basic_publish($msg, '', $config->getDestination());
 }
Пример #2
0
 public function send($data, Config $config)
 {
     $headers = $config->getParameters();
     if ($expire = $config->getExpire()) {
         $date = new \DateTime();
         $date->add($expire);
         $headers['expires'] = $date->format('U000');
     }
     $this->stompClient->send($config->getDestination(), $data, $headers);
 }
Пример #3
0
 public function send($data, Config $config)
 {
     $this->messageList[$config->getDestination()][] = ['message' => $data, 'config' => $config->getConfig()];
 }
Пример #4
0
 /**
  * @inheritdoc
  */
 public function send($data, Config $config)
 {
     $headers = $config->getParameters();
     $this->stompClient->send($config->getDestination(), $data, $headers);
 }