Skip to content
Console
Menu

Queues

Workflows

Getting Started

Authentication

KV Store

Lease a queue

Leases up to `max_messages` ready messages for the visibility timeout.

This method is not served on the public API. api.sylphx.com does not route this call: its backend is not deployed behind the public API, or does not implement the call. This page documents the contract. It is kept out of the sidebar and of search engines.

Leases up to max_messages ready messages for the visibility timeout.

  • Path POST https://api.sylphx.com/v1/orgs/acme/projects/shop/envs/production/queues/queue:lease
  • Scope events:write
  • Effect write — a successful call changes state.
  • Collection queues

#Request

FieldTypeWhat it is
namestringThe name of the queue. Required.
max_messagesint32At most this many; default 1, at most 100.
visibility_timeoutdurationOverride the Queue's visibility timeout for this lease.
waitdurationWait up to this long (at most 20s) for a message when none is ready.

#Response

FieldTypeWhat it is
messagesLeasedMessage[]The leased messages.

#LeasedMessage

FieldTypeWhat it is
message_idstringThe message id, stable across deliveries. Output only.
eventCloudEventThe event. Output only.
leaseMessageLeaseThe lease to ack or nack with. Output only.
delivery_countint32This delivery's number, from 1. Output only.
lease_expire_timetimestampWhen the lease expires and the message is ready again. Output only.

#CloudEvent

FieldTypeWhat it is
idstringUnique per source; with source it is the dedupe key. Required.
sourcestringThe producer's URI-reference. Required.
typestringThe event type, for example com.example.order.created. Required.
subjectstringThe subject within the source.
event_timetimestampWhen the occurrence happened.
data_content_typestringThe payload media type; default application/json.
data_schemastringThe payload schema URI.
datavalueThe payload.
extensionsmap<string, string>Extension attributes, at most 64.

#MessageLease

FieldTypeWhat it is
message_idstringThe message id. Required.
lease_generationint64The lease fence: the lease generation this holder was granted. Required.

#Errors

Every error arrives in the body Errors describes.

#Examples

curl -X POST "https://api.sylphx.com/v1/orgs/acme/projects/shop/envs/production/queues/queue:lease" \
  -H "Authorization: Bearer $SYLPHX_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{}'