/**
  * @param MessageProperties|null $properties The message properties (null = defaults).
  * @param string                 $content    The message content.
  * @param string                 $routingKey The message routing key.
  */
 private function __construct(MessageProperties $properties = null, string $content = '', string $routingKey = '')
 {
     $this->properties = $properties ?: MessageProperties::create();
     $this->content = $content;
     $this->contentLength = strlen($content);
     $this->routingKey = $routingKey;
 }
 /**
  * @param MessageProperties|null $properties    The message properties (null = defaults).
  * @param resource               $contentStream The message content stream.
  * @param int                    $contentLength The content length, in bytes.
  * @param string                 $routingKey    The message routing key.
  */
 private function __construct(MessageProperties $properties = null, $contentStream, int $contentLength, string $routingKey)
 {
     $this->properties = $properties ?: MessageProperties::create();
     $this->contentStream = $contentStream;
     $this->contentLength = $contentLength;
     $this->routingKey = $routingKey;
 }
Example #3
0
 /**
  * @return int
  */
 public function getTimestamp()
 {
     return $this->properties->get(MessageProperties::KEY_TIMESTAMP);
 }