API Queue (Offline Outbox)

Mode

Skin

Theme

Overview & Architecture

Applied to an outbox element via data-ln-api-queue nested inside a data-ln-data-coordinator, this component listens for ln-api-queue:request-enqueue from the coordinator, persists mutations to an internal IndexedDB outbox (ln_api_queue) with monotonic per-scope sequence counters, and emits ln-api-queue:send CustomEvents for FIFO dispatch. It never initiates network requests directly, updating retry attempts with exponential backoff until acknowledged via ack or nack.

The API Queue is a connector- and id-blind offline outbox that sits between the Data Coordinator and the Transport Gateway. It replays writes FIFO per record-chain once connectivity returns, pauses safely on authentication errors, and hands temporary-to-permanent ID remappings back to the coordinator on successful creation.

Simulated Offline Mode

This playground never touches real network state. "Going offline" simply toggles data-ln-api-queue-online="false" on the queue element, which makes its internal drain guard skip network sends — exactly the override the component supports for tests.

Declarative 3-Tier + Queue Markup (Copy/Paste)

Interactive Playground & Telemetry

1. Connectivity & Mock Backend Mode

Toggle simulated offline mode and pick how the mocked backend responds to writes.

Online

Mock backend response mode

2. Outbox Actions

Dispatch the real optimistic store events. With the queue present, writes are routed through the outbox instead of hitting the connector directly.

Pending outbox entries: 0

Create Task
Update Last Task
Delete Last Task
Manual Outbox Controls

3. Live Event Telemetry Stream