flowchart LR
    subgraph Sites["Site ScadaBridge Clusters (with Store & Forward)"]
        SB1["ScadaBridge — Warsaw West<br/>+ local queue"]
        SB2["ScadaBridge — Shannon<br/>+ local queue"]
        SB3["ScadaBridge — Ponce<br/>+ local queue"]
        SBN["ScadaBridge — other sites<br/>+ local queue"]
    end

    subgraph Redpanda["Redpanda Central Cluster (South Bend)"]
        direction TB
        subgraph Topics["Topics: {domain}.{entity}.{event-type}"]
            T1["equipment.tag.value-changed<br/>⏱ analytics 30d"]
            T2["equipment.state.transitioned<br/>⏱ analytics 30d"]
            T3["mes.workorder.started<br/>⏱ analytics 30d"]
            T4["scada.alarm.raised<br/>⏱ operational 7d"]
            T5["quality.inspection.completed<br/>⏱ compliance 90d"]
        end
        SR["Schema Registry<br/>Protobuf + BACKWARD_TRANSITIVE"]
        AUTH["SASL/OAUTHBEARER<br/>+ prefix ACLs"]
    end

    subgraph Consumers["Enterprise Consumers"]
        SNB["SnowBridge<br/>→ Snowflake"]
        KPI["KPI Processors"]
        CAM["Camstar<br/>Integration"]
        REPLAY["Historical Replay<br/>(simulation-lite)"]
    end

    SB1 --> T1
    SB2 --> T2
    SB3 --> T3
    SBN --> T4
    SR -.->|"validates"| Topics
    AUTH -.->|"enforces"| Topics
    T1 --> SNB
    T2 --> SNB
    T2 --> KPI
    T3 --> CAM
    T1 --> REPLAY
    T5 --> SNB
