Skip to main content
Batoi AIF Docs

Queue Adapters

Run idempotent, lease-based asynchronous work with retry and dead-letter controls.

Version Foundation release Early foundation work Reviewed Jul 21, 2026 Next review Sep 21, 2026

Owner: Batoi Engineering Reviewed by: Batoi AIF Maintainers Source revision: cd680e8

AIF is the public engineering framework. For the managed intelligence capability used across supported Platform and Flex workflows, see Batoi Intelligence.
Browse Batoi AIF Documentation Queue Adapters

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.