Documentation

PendingMessage
in package

Represents a pending message.

For messages with QoS 1 and 2 the client is responsible to resend the message if no acknowledgement is received from the broker within a given time period.

This class serves as common base for message objects which need to be resent if no acknowledgement is received.

Table of Contents

$lastSentAt  : DateTime
$messageId  : int
$sendingAttempts  : int
getLastSentAt()  : DateTime
Returns the date time when the message was last sent.
getMessageId()  : int
Returns the message identifier.
getSendingAttempts()  : int
Returns the number of times the message has been sent.
incrementSendingAttempts()  : static
Increments the sending attempts by one.
setLastSentAt()  : static
Sets the date time when the message was last sent.
__construct()  : mixed
Creates a new pending message object.

Properties

Methods

getLastSentAt()

Returns the date time when the message was last sent.

public getLastSentAt() : DateTime
Return values
DateTime

getMessageId()

Returns the message identifier.

public getMessageId() : int
Return values
int

getSendingAttempts()

Returns the number of times the message has been sent.

public getSendingAttempts() : int
Return values
int

incrementSendingAttempts()

Increments the sending attempts by one.

public incrementSendingAttempts() : static
Return values
static

setLastSentAt()

Sets the date time when the message was last sent.

public setLastSentAt([DateTime|null $value = null ]) : static
Parameters
$value : DateTime|null = null
Return values
static

__construct()

Creates a new pending message object.

protected __construct(int $messageId[, DateTime|null $sentAt = null ]) : mixed
Parameters
$messageId : int
$sentAt : DateTime|null = null
Return values
mixed

Search results