v1

latestOpenAPI 3.1.0Apache 2.02026-07-17143043.7 KB
Querator V1

Lease items from the queue

Lease a items from the requested queue. When a items is lease by a consumer, that consumer gains exclusive rights to the items. No other consumer will be provided the same items unless the lease_deadline has expired and the consumer with the lease has not marked the items via /queue.complete or /queue.retry

If a items is not acknowledge via /queue.complete within the lease_deadline period it will be offered to another consumer.

Timeout Semantics

The call will return when a lease is successful or when request_timeout has been reached. If the call returns with a 454 Retry Request response code, this means there were no items in the queue and the request_timeout was reached. In this case the client should retry the lease request.

The client should NOT cancel the request before request_timeout has been reached. If the call fails to return after request_timeout is reached the client can safely cancel the request.

post/v1/queue.lease

Request body

queue_namestring required

The name of the queue

client_idstring required

A unique id which identifies this client. Duplicate client id's are not allowed

request_timeoutstring required

The duration this request should block before the client will cancel the request.

batch_sizeinteger

The maximum number of items to be leased for this request

Example request

{
  "client_id": "client-1234",
  "request_timeout": "30s"
}

Response

queue_namestring required

The name of the queue the leased items are from

partitioninteger required

Partition the leased items are from