Skip to navigation

Changing a filter

View as Markdown

Resume restores a previous subscription. Rebind explicitly creates a new filter generation. Sending a changed filter with an old token in ordinary subscribe causes a binding mismatch.

Safe sequence

  1. Finish old processing through a locally committed checkpoint.
  2. Send rebind with the active subscription ID and expectedGeneration, a new filter and explicit start mode.
  3. Wait for the new subscribed; save its generation, hash and frozen mappings.
  4. Process its cut through batches, checkpoints and caught_up.
  5. ACK only with the new generation.

This complete template uses a synthetic condition and placeholder token. Substitute a known permitted condition and a checkpoint from the real current session.

{
"version": 1,
"kind": "rebind",
"requestId": "request-3",
"subscriptionId": "market-1",
"expectedGeneration": "1",
"filters": {
"conditionIds": ["0x1111111111111111111111111111111111111111111111111111111111111111"],
"stages": ["included", "canonicality"]
},
"start": {"mode": "resume", "token": "REPLACE_WITH_CURRENT_CHECKPOINT"}
}

History and permissions

The new predicate does not reinterpret the old cursor. Resume scans after the selected old checkpoint using the new filter; it does not request all earlier history for the new market. Old-generation ACKs are invalid after rebind.

Rebind does not expand the current lease’s scopes or reservation. A wider scope can require a new connection and authentication. Do not bypass a refusal by multiplying keys or subscription IDs.

If rebind is rejected, do not assume the new generation exists. Recover the agreed state using recovery. See frames for exact fields.