read:events scope. {id} is the ID of an event destination of type DURABLE_CONSUMER; other destination types return 400.
Pull a batch
A pull leases the next batch of events to the calling worker forvisibility seconds.
200 response
Acknowledge a batch
Send theleaseId and generation from the batch with a status of ok or failed:
status and the committed cursor in committed:
committed: the batch is done.requeued: you sentfailed, and the batch is redelivered with a higherattempt.stale: the lease expired and was handed to another worker before your acknowledgement. Nothing was committed.
Delivery guarantees
- Start. A durable consumer starts at the head of the event stream when you create it. Earlier events are never handed out.
- Redelivery. Expired and failed leases are redelivered before new work, with a higher
generation. An acknowledgement for an older generation isstale. - Order. Events are ordered within a batch. With several workers, batches interleave across them. Use a single worker when your processing depends on stream order.
- Commit. The committed cursor only advances over a contiguous run of acknowledged batches, so one slow lease holds it back even when later batches are done.