Skip to content

Overview

synthaicode edited this page Nov 1, 2025 · 8 revisions

Summary

  • Ksql.Linq provides a LINQ-based DSL for Kafka/Schema Registry/ksqlDB that lets you describe POCO models, create Streams/Tables, and generate and execute KSQL DDL/queries.

Core Flow

  • Register entities (Entity<T>() or EventSet<T>())
  • Generate/apply KSQL DDL (CREATE / CREATE IF NOT EXISTS)
  • Register schemas in Schema Registry (Avro)
  • Operator concerns (query lifecycle, topic layout)
  • Produce/consume (AddAsync / ForEachAsync) and observe state

Architecture

flowchart TB
    subgraph App["C# application"]
        A[LINQ / DSL invocation]
    end

    A --> B[DSL]
    B --> C[Query Builder]
    C --> D[KSQL generator]
    D -->|DDL/CTAS| E[ksqlDB]
    E -->|Read/Write| F[(Kafka topics)]

    %% Supporting components
    subgraph Schema["Schema management"]
        SR[(Schema Registry)]
        AV[Avro serializer/deserializer]
    end

    D --> SR
    SR --- AV
    AV --- F

    %% Operations and modes
    subgraph Ops["Operational features"]
        EH[DLQ / Retry / Commit]
        MODE[Streaming mode\nPush / Pull]
    end

    E ---> EH
    E ---> MODE

    %% Cache layer
    subgraph Cache["Local cache"]
        ST[Streamiz]
        RDB[(RocksDB)]
    end
    ST --- RDB
    ST -. State store .- E
Loading
Clone this wiki locally