Skip to main content

Interface: MessageContract

TypeScript 0.4.0 · Source commit cbff27b8a34e1384384018680e46c20d5c610cc9. Generated with reviewed comment corrections; see generation notes.


Defined in: types.ts:27

Delivery contract. See Message for settlement, transaction, cancellation, and error behavior.

This page documents a structural type referenced by the package API. MessageContract is a documentation label, not a named export from postgremq. Use type inference or the exported option types in application code.

Properties​

consumerToken​

readonly consumerToken: string

Defined in: types.ts:31


deliveryAttempts​

readonly deliveryAttempts: number

Defined in: types.ts:32


groupKey​

readonly groupKey: string | null

Defined in: types.ts:35

Message group (see PublishOptions.groupKey); null if ungrouped.


groupSeq​

readonly groupSeq: number | null

Defined in: types.ts:37

Dense 1-based position in the group, in publish commit order; null if ungrouped.


id​

readonly id: number

Defined in: types.ts:28


isSettled​

readonly isSettled: boolean

Defined in: types.ts:42

True once ack/nack/release has been attempted (whether or not it succeeded).


payload​

readonly payload: any

Defined in: types.ts:30


publishedAt​

readonly publishedAt: Date

Defined in: types.ts:33


queueName​

readonly queueName: string

Defined in: types.ts:29


signal​

readonly signal: AbortSignal

Defined in: types.ts:40

Aborted on stop, close, queue-fatal teardown, or detected ownership loss. The signal itself neither settles the delivery nor rejects settlement.


vt​

vt: Date

Defined in: types.ts:38

Methods​

ack()​

ack(): Promise<void>

Defined in: types.ts:43

Returns​

Promise<void>


ackWithTransaction()​

ackWithTransaction(tx): Promise<void>

Defined in: types.ts:44

Parameters​

tx​

Transaction

Returns​

Promise<void>


nack()​

nack(options?): Promise<void>

Defined in: types.ts:45

Parameters​

options?​

MessageOptions

Returns​

Promise<void>


release()​

release(): Promise<void>

Defined in: types.ts:46

Returns​

Promise<void>


setVt()​

setVt(newVt): Promise<Date>

Defined in: types.ts:47

Parameters​

newVt​

number

Returns​

Promise<Date>