queue

QUEUE: atomically claim up to `count` messages for...

QUEUE: atomically claim up to count messages for processing, scoped to YOUR wallet. Each comes with a leaseToken; the messages are hidden from other workers for visibilitySeconds. Process them, then queue.ack each with its leaseToken — if you don't ack in time, the message is redelivered. Concurrent workers never get the same message (FOR UPDATE SKIP LOCKED). Private to your wallet (the x402 payer).

post/api/queue/lease

Request

  • Base URL: https://2s.io
  • URL: https://2s.io/api/queue/lease
  • Auth: API key in header PAYMENT-SIGNATURE

Request body

queuestring required

Queue to pull from.

countinteger

How many to claim. Default 1, max 100.

visibilitySecondsinteger

How long claimed messages stay hidden before redelivery. Default 30, max 3600.

Response

(unresolved $ref)

Changes

No recorded changes to this operation across all 1 revision of this API.