Skip to content

Interface: QueueDelivery ​

A delivery of a message to a group: it ends with one of ack(), retry() or abandon().

Properties ​

deliveryCount? ​

readonly optional deliveryCount?: number

The deliveries of the message to the group, this one included (1 for the first), when the driver counts them.


group ​

readonly group: string

The group it is delivered to.


message ​

readonly message: QueueMessage

The message delivered.

Methods ​

abandon() ​

abandon(): Promise<void>

The processing stopped (the application stops): the message is delivered again later, neither acknowledged nor counted as failed by the queue.

Returns ​

Promise<void>

Resolved once given back.


ack() ​

ack(): Promise<void>

The message is processed: removed for the group.

Returns ​

Promise<void>

Resolved once acknowledged.


extend() ​

extend(): Promise<void>

Extend the lease of the delivery (the time before the server delivers it again), while it is processed.

Returns ​

Promise<void>

Resolved once extended.


retry() ​

retry(delay?): Promise<void>

The processing failed: the message is delivered again, after the delay when the driver can.

Parameters ​

delay? ​

number

The delay before the delivery, in milliseconds.

Returns ​

Promise<void>

Resolved once given back.

Released under the MIT License.