Skip to main content
Long-poll clients get the same at-least-once guarantee as WebSocket clients — a full queue overflows to the durable store instead of silently dropping. A client polling over HTTP receives every event even when its queue backs up or the gateway restarts mid-delivery — the overflow lands in the durable store and replays on the next poll.

Quick Start

1

Run an agent behind the gateway

Any agent hosted on the gateway can push to poll clients — no code change needed:
2

Bound the poll queue in gateway.yaml

Set a per-client queue bound; overflow persists to the durable store:
3

Enable a delivery store for durability

A delivery backend makes the overflow at-least-once and survives restarts:

How It Works

An event that arrives for a poll client whose in-memory queue is full is persisted to the shared push store, then replayed on the next poll and held until the client acks.

Configuration Options

PollingConfig controls the poll transport. Every field is extracted from the SDK dataclass.
max_queue_size is durable only when a delivery store is wired. With store_backend: memory (or delivery disabled) an overflowing queue falls back to a best-effort drop.

Compatibility Note

POST /api/push/poll/ack now returns HTTP 503 with {"ok": false, "error": "delivery guarantee not enabled"} when no delivery manager is configured. It previously returned {"ok": true} — a hidden success for an ack that was never recorded. Enable a delivery backend, or handle the 503 explicitly in your client.

Common Patterns

Choose a max_queue_size and store that matches your durability needs.

Best Practices

The default 1000 overflows to the durable store instead of growing memory without limit. Leave it >0 unless you have a specific reason to run unbounded.
max_queue_size only becomes at-least-once when delivery.store_backend is sqlite or redis. With memory (or delivery disabled) an overflowing queue drops the event.
Clients that assert ok === true on ack break after this change. Treat a 503 as “delivery not enabled” and enable a store, or stop acking.
Durable events stay in the store until acknowledged. A client that never acks will keep receiving the same pending events on each poll.

Push Notifications

Channel pub/sub with WebSocket-first, polling fallback

Redis Pub/Sub Resilience

Multi-instance transport reconnect and outage surfacing