Interface: PublishOptions
TypeScript 0.4.0 · Source commit cbff27b8a34e1384384018680e46c20d5c610cc9. Generated with reviewed comment corrections; see generation notes.
Defined in: types.ts:230
Options for publishing a message
Properties
deliverAfter?
optionaldeliverAfter?:Date
Defined in: types.ts:232
Time at which the message should be delivered (defaults to immediate)
groupKey?
optionalgroupKey?:string
Defined in: types.ts:251
Message group (1..255 characters; empty is rejected with ValidationError). Omit for an ungrouped message.
Within one queue, deliveries of one group are claimed strictly in publish
commit order, one at a time: a message is not delivered while an earlier
message of its group is pending or being processed (head-of-line
blocking, as in SQS FIFO). A head nacked with a delay blocks its group
until the delay passes. A final-attempt nack moves the head to the DLQ
immediately. If its final attempt crashes or expires without settlement,
the head blocks its group until maintenanceFast() retires it to the DLQ.
A consume batch holds
at most one message per group.
Publishers of one group are serialised by the database until their transaction commits, so a group should be a session, an order or an account — never a hot key shared by unrelated work. A transaction that publishes to several groups should take them in a consistent order to avoid deadlocks.