Expand description
A blocking, brokerless work queue stored in one object.
Every operation reads the complete JSON document. Mutations conditionally
replace it using the objsds_store::ObjectStore version token, so
concurrent mutations can return Error::Conflict and are never retried
automatically. CPU, memory, and transfer costs are O(n) in queue size.
Successful publication makes a message available at least once. A claim
grants one time-bounded lease; an unacknowledged message becomes claimable
again when that lease expires. Acknowledgement permanently removes the
message only when its current lease token matches and has not expired.
Ack::NotFound, Ack::LeaseMismatch, and Ack::LeaseExpired are
classifications of the snapshot that was read; they are not written back.
Only Ack::Acknowledged is made durable with a successful compare-and-swap.
Consequently handlers must be idempotent: a worker can finish its side
effect and fail before acknowledgement, and lease expiry can allow another
worker to process the same message. There is no exactly-once delivery,
broker, consumer group, group commit, long polling, or automatic retry.
Clock synchronization bounds lease safety across processes.
Structs§
- Claim
- A message claimed for processing until its lease deadline.
- Lease
Token - Opaque token authorizing acknowledgement of one claim.
- Message
Id - Opaque identifier assigned to one published message.
- Queue
- A brokerless queue occupying exactly one object.
- Queue
Builder - Configures and opens one queue.
- System
Clock - Wall clock used by default.
Enums§
- Ack
- Outcome of an acknowledgement attempt.
- Build
Error - Queue construction error.
- Error
- A queue operation error.
Traits§
- Clock
- Supplies Unix time in milliseconds for lease decisions.