Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Backends Overview

Aviso abstracts all storage and messaging behind a NotificationBackend trait. Two implementations ship out of the box.


Which Backend Should I Use?

flowchart TD
    A["What do you need?"] --> B{"Persistent history<br/>across restarts?"}
    B -->|Yes| C[jetstream]
    B -->|No| D{"Multiple replicas<br/>or pods?"}
    D -->|Yes| C
    D -->|No| E{"Production<br/>workload?"}
    E -->|Yes| C
    E -->|No| F[in_memory]

    C:::jet
    F:::mem

    classDef jet fill:#1a6b3a,color:#fff,stroke:#0d4a27
    classDef mem fill:#1a4d6b,color:#fff,stroke:#0d3347
RequirementRecommended backend
Persistent history across restartsjetstream
Replay endpoint supportjetstream (or in_memory for local/node-local use)
Live watch streaming supportjetstream (or in_memory for local/node-local use)
Multi-replica deploymentjetstream
Quick local experimentation with minimal setupin_memory

Capability Comparison

CapabilityJetStreamIn-Memory
Durable storageYesNo — data lost on restart
Replay supportYesYes — node-local only
Live watch supportYesYes — node-local fan-out
Multi-replica / HAYes (clustered NATS)No
Per-schema storage policyYesNo — rejected at startup
Cross-instance consistencyYesNo

Backend Details