Queue Adapters
QueueAdapterInterface defines dispatch, acknowledgment, and failure. DurableQueueAdapterInterface adds reservation leases, delayed release, cancellation, and dead-letter handling for competing workers and crash recovery.
Durable Semantics
- idempotent dispatch
- delayed availability
- reserve and lease ownership
- expired-lease recovery
- retry limits
- acknowledgment and release
- cancellation
- failure and dead-letter handling
The RAD PDO adapter persists these states in MySQL and uses transactional row locking for competing workers. InMemoryQueueAdapter supports local development and contract tests.
Queue Payload Requirements
Include request and trace UIDs, workspace and actor IDs, safe input references, a prompt-version snapshot where applicable, policy recheck intent, and an idempotency key.
Do not put long-lived secrets in queue payloads.
Worker Responsibilities
- rehydrate context
- confirm current policy for high-risk work
- execute through AIF gateway
- preserve correlation and terminal audit evidence
- acknowledge, release, cancel, or dead-letter explicitly
- notify the host workflow or UI
Queue backends remain host-supplied integration code, not core framework dependencies.