stomp = $stomp; } /** * @param StompDestination $destination * @param StompMessage $message */ public function send(Destination $destination, Message $message): void { InvalidDestinationException::assertDestinationInstanceOf($destination, StompDestination::class); InvalidMessageException::assertMessageInstanceOf($message, StompMessage::class); $headers = array_merge($message->getHeaders(), $destination->getHeaders()); $headers = StompHeadersEncoder::encode($headers, $message->getProperties()); $stompMessage = new StompLibMessage($message->getBody(), $headers); $this->stomp->send($destination->getQueueName(), $stompMessage); } public function setDeliveryDelay(int $deliveryDelay = null): Producer { if (null === $deliveryDelay) { return $this; } throw new \LogicException('Not implemented'); } public function getDeliveryDelay(): ?int { return null; } public function setPriority(int $priority = null): Producer { if (null === $priority) { return $this; } throw PriorityNotSupportedException::providerDoestNotSupportIt(); } public function getPriority(): ?int { return null; } public function setTimeToLive(int $timeToLive = null): Producer { if (null === $timeToLive) { return $this; } throw new \LogicException('Not implemented'); } public function getTimeToLive(): ?int { return null; } }