QueuedMessage
final class QueuedMessage (View source)
Carries a message together with immutable transport metadata for one delivery attempt.
Database transports may retain the authenticated raw envelope so failed-job diagnostics preserve exactly what was reserved without serializing the hydrated object again.
Methods
Captures a message and its transport-owned delivery metadata.
Returns the hydrated object delivered to its registered handler.
Returns the logical queue from which this delivery originated.
Returns the persistent transport identifier, or null for an in-memory delivery.
Returns the one-based delivery attempt recorded by the transport.
Returns the original authenticated database envelope when the transport retained one.
Returns the opaque ownership fence attached by a persistent lease transport.
Creates a metadata copy for another attempt without changing the message or raw envelope.
Details
__construct
__construct(object $message, string $queue = 'default', int|null $id = null, int $attempts = 0, string|null $rawPayload = null, QueueReservationReceipt|null $reservationReceipt = null)
Captures a message and its transport-owned delivery metadata.
message
object
message()
Returns the hydrated object delivered to its registered handler.
queue
string
queue()
Returns the logical queue from which this delivery originated.
id
int|null
id()
Returns the persistent transport identifier, or null for an in-memory delivery.
attempts
int
attempts()
Returns the one-based delivery attempt recorded by the transport.
rawPayload
string|null
rawPayload()
Returns the original authenticated database envelope when the transport retained one.
reservationReceipt
QueueReservationReceipt|null
reservationReceipt()
| internal | Applications must not log or persist the receipt in a message payload. |
Returns the opaque ownership fence attached by a persistent lease transport.
withAttempts
QueuedMessage
withAttempts(int $attempts)
Creates a metadata copy for another attempt without changing the message or raw envelope.