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()); }
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); }
public function send($data, Config $config) { $this->messageList[$config->getDestination()][] = ['message' => $data, 'config' => $config->getConfig()]; }
/** * @inheritdoc */ public function send($data, Config $config) { $headers = $config->getParameters(); $this->stompClient->send($config->getDestination(), $data, $headers); }