Example #1
0
 public function send($exchange_name, Notification $notification)
 {
     $this->exchange->publish($notification->getEventBody(), null, AMQP_NOPARAM, ['message_id' => $notification->getOccurredOn(), 'type' => $notification->getEventType(), 'timestamp' => $notification->getOccurredOn()->getTimestamp()]);
 }
Example #2
0
 /**
  * @param string $exchange_name
  * @param Notification $notification
  */
 public function send($exchange_name, Notification $notification)
 {
     $this->channel($exchange_name)->basic_publish(new AMQPMessage($notification->getEventBody(), ['message_id' => $notification->getOccurredOn(), 'type' => $notification->getEventType(), 'timestamp' => $notification->getOccurredOn()->getTimestamp()]), $exchange_name);
 }