Leases, redelivery, dead-letter
Only the lease holder can ack, nack or extend the lease, only while the lease is live — ack versus expiry is decided inside the SQL UPDATE. An expired lease redelivers; after the ceiling (defaults: high 3, normal 5, low 10) the message goes to dead-letter.
Delivery is at-least-once: dequeue order is priority, then accepted time, and per-recipient FIFO is best-effort. get_pending claims 1–100 messages a call with a lease of 10–600 s and a long-poll of up to 20 s; claim and lease are one statement. extend_lease adds 10–600 s per call — the same tool over REST and MCP.