Watch Streams
What this page gives you: a single tutorial map for every watch operation in Anvil. Watches are spread across services because each domain has its own source of change, but the operating model is the same: keep a cursor, process records idempotently, and store the cursor only after your derived work is durable.
A watch is not a notification that can be forgotten. It is a durable stream position. If a client crashes, it resumes from the last committed cursor. If a derived view falls behind, the cursor tells operators where lag begins. If a stream cannot be resumed because retention has moved on, the repair or rebuild path must rebuild from source facts.
Watch workflow
Read or initialize the last durable cursor for your consumer.
Open the watch with after_cursor set to that value.
Process each event idempotently.
Commit your derived output.
Store the event cursor only after the derived output is durable.
Watch operations
| | |
|---|
| | |
| Objects, Versions, Streams, And Multipart Uploads | |
| | |
| | |
| Authentication And Relationship Authorisation | |
| Authentication And Relationship Authorisation | |
| Authentication And Relationship Authorisation | |
| | |
WatchPersonalDbProjection | | |
| Source, Model, And Ingestion Artefacts | |
Language pattern
The exact request type differs by service, but the four client shapes are the same.
{
"operation": "watch-pattern",
"rust": "let mut stream = anvil.watch_prefix(request).await?;\nwhile let Some(event) = stream.next().await {\n let event = event?;\n process_idempotently(&event).await?;\n save_cursor(event.cursor).await?;\n}"
}
What you can do after this page
You should understand every watch stream and know where the full operation examples live. Use watches for live views, derived indexes, projections, audit export, ingestion status, and repair-aware automation.