18 private array $properties = [];
23 private bool $redelivered =
false;
28 private array $headers = [];
44 $this->properties = $properties;
53 unset($this->properties[$name]);
57 $this->properties[$name] = $value;
65 return $this->properties;
70 return array_key_exists($name, $this->properties) ? $this->properties[$name] : $default;
73 public function setHeader(
string $name, $value): self
77 unset($this->headers[$name]);
81 $this->headers[$name] = $value;
89 $this->headers = $headers;
96 return $this->headers;
99 public function getHeader(
string $name, $default =
null)
101 return array_key_exists($name, $this->headers) ? $this->headers[$name] : $default;
106 $this->redelivered = $redelivered;
113 return $this->redelivered;
118 $this->
setHeader(
'correlation_id', $correlationId);
125 return $this->
getHeader(
'correlation_id');
130 $this->
setHeader(
'message_id', $messageId);
144 return null === $value ? null : (int) $value;
149 $this->
setHeader(
'timestamp', $timestamp);
setHeader(string $name, $value)
setReplyTo(string $replyTo=null)
setProperties(array $properties)
getHeader(string $name, $default=null)
setTimestamp(int $timestamp=null)
getProperty(string $name, $default=null)
setMessageId(string $messageId=null)
setHeaders(array $headers)
setProperty(string $name, $value)
setRedelivered(bool $redelivered)
setCorrelationId(string $correlationId=null)