Early access. Guaranteed delivery is live in production, but no solver has exercised it yet. It should behave as described. If you see missing messages, duplicate floods, or subscribe errors, let us know in the shared support channels.
quote_status events it would otherwise miss while disconnected.
The quote_status stream notifies your solver when one of its quotes is executed, carrying quote_hash, intent_hash, and tx_hash. Without guaranteed delivery, any event published while your WebSocket is disconnected is lost.
With it, the relay keeps a server-side queue for each solver instance. Events wait while you are offline, then replay when you reconnect, for up to 7 days.
Opt in
Guaranteed delivery requires an authenticated solver connection (JWT). Complete these three steps:Add instance_id to the WebSocket URL
Connect with an The relay finds your queue by this ID on every reconnect, and creates it the first time you subscribe with the guaranteed flag.Use a fixed value from your deploy config (
instance_id query parameter:prod-1, prod-2), not a random one generated at startup.IDs are scoped to your solver account, so two solvers using the same instance_id never collide. The relay gives each one a separate queue:- Use the same value across restarts and reconnects. A new value gives you a new, empty queue.
- One value per instance. Two instances sharing an ID fight over one queue, and each message goes to only one of them, chosen arbitrarily.
- One live connection per ID. Don’t open two at once for redundancy.
Subscribe with the guaranteed flag
Open the WebSocket with your The response returns your subscription ID:The request is rejected without an authenticated solver JWT and the
instance_id, then send a subscribe request for quote_status. Set the third positional parameter to true; the second parameter (filters) must be empty.instance_id from Step 1.If you already subscribe to
quote_status, this replaces that call.Handle and acknowledge every message
Messages arrive as Handle each event by acknowledging it with your subscription ID and its Deduplicate by
event notifications carrying a seq:seq, then running your settlement logic:seq or quote_hash. Redeliveries happen on reconnect, so you will sometimes receive the same message twice.After a reconnect
A subscription only lasts as long as the connection it was created on. When you reconnect, that old subscription is gone, so you have to sendsubscribe again. Doing so gives you a new subscription ID, and from that point on your acks must use the new ID, not the old one.
As soon as you re-subscribe, the relay replays your backlog in one burst: every message published while you were offline, plus any messages it had already sent you but that you hadn’t acknowledged before the connection dropped.
Wrap the connection in a function so a drop reconnects and re-subscribes on its own. This reuses handleMessage from Step 3, and keeps seen across reconnects so the replayed backlog is still deduplicated:
Limits
| Property | Value |
|---|---|
| Redelivery window (ack deadline) | 5 seconds |
| Max unacknowledged in flight | 256 (delivery pauses past this until you catch up) |
| Retention / max offline | Up to 7 days |
| Queue expiry | Dropped after 7 days idle |
| First opt-in | Not retroactive; tracking starts at your first guaranteed subscribe |
Errors
Subscribe rejected
| Error | Cause |
|---|---|
guaranteed delivery needs instance_id to be specified | No instance_id query parameter |
guaranteed delivery needs an authenticated partner | Connection isn’t authenticated with a solver JWT |
guaranteed delivery is only available on quote_status | guaranteed: true set on another stream |
Acknowledge
| Error | Cause / action |
|---|---|
no pending message with seq N | Double-ack, or an ack from before a reconnect. Harmless; don’t retry, don’t alert. |
subscription '...' not found | Old subscription ID after reconnect. Re-subscribe and ack with the new one. |
acknowledge is only supported for quote_status subscriptions | The subscription ID belongs to a different stream |