Message
The Message interface is the root interface of all transport messages.
Most message-oriented middleware (MOM) products treat messages as lightweight entities that consist of a header and a payload. The header contains fields used for message routing and identification; the payload contains the application data being sent.
Within this general form, the definition of a message varies significantly across products.
Tags
Table of Contents
Methods
- getBody() : mixed
- getHeader() : mixed
- getHeaders() : array<string|int, mixed>
- Returns [name => value, ...]
- getProperties() : array<string|int, mixed>
- Returns [name => value, ...]
- getProperty() : mixed
- getRoutingKey() : string|null
- setBody() : $this
- setHeader() : self
- setHeaders() : self
- setProperties() : self
- setProperty() : self
- setRoutingKey() : self
Methods
getBody()
public
getBody() : mixed
getHeader()
public
getHeader(string $name[, mixed $default = null ]) : mixed
Parameters
- $name : string
- $default : mixed = null
getHeaders()
Returns [name => value, ...]
public
getHeaders() : array<string|int, mixed>
Return values
array<string|int, mixed>getProperties()
Returns [name => value, ...]
public
getProperties() : array<string|int, mixed>
Return values
array<string|int, mixed>getProperty()
public
getProperty(string $name[, mixed $default = null ]) : mixed
Parameters
- $name : string
- $default : mixed = null
getRoutingKey()
public
getRoutingKey() : string|null
Return values
string|nullsetBody()
public
setBody(mixed $body) : $this
Parameters
- $body : mixed
-
json serializable value
Return values
$thissetHeader()
public
setHeader(string $name, mixed $value) : self
Parameters
- $name : string
- $value : mixed
Return values
selfsetHeaders()
public
setHeaders(array<string|int, mixed> $headers) : self
Parameters
- $headers : array<string|int, mixed>
Return values
selfsetProperties()
public
setProperties(array<string|int, mixed> $properties) : self
Parameters
- $properties : array<string|int, mixed>
Return values
selfsetProperty()
public
setProperty(string $name, mixed $value) : self
Parameters
- $name : string
- $value : mixed
Return values
selfsetRoutingKey()
public
setRoutingKey([string $routingKey = null ]) : self
Parameters
- $routingKey : string = null