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

Examples

Runnable examples in crates/fungi-examples/.

Run

cargo run -p fungi-examples --example <name>

List

ExampleDemonstrates
state_backendKeyed state, snapshot/restore
streaming_primitivesWatermarks, windows, timers
execution_graphDAG construction + topological sort
checkpointingCoordinator, barrier, store
kafka_testKafka connectivity
kafka_streamingStreaming from Kafka
kafka_pipelinePipeline with transforms
kafka_sqlKafka → SQL → Kafka

kafka_sql (Full Pipeline)

# Setup Kafka
docker run -d --name kafka -p 9092:9092 apache/kafka:latest
docker exec kafka /opt/kafka/bin/kafka-topics.sh \
  --create --topic events --bootstrap-server localhost:9092 \
  --partitions 1 --replication-factor 1

# Run
cargo run -p fungi-examples --example kafka_sql

Output:

SQL Query Results:
  Total amount by user:
    user-1: 300
    user-2: 300
  Pipeline: Kafka → SQL → Kafka ✅

See Guides / Kafka for full Kafka setup.

Code Locations

ExampleFile
state_backendcrates/fungi-examples/examples/state_backend.rs
streaming_primitivescrates/fungi-examples/examples/streaming_primitives.rs
execution_graphcrates/fungi-examples/examples/execution_graph.rs
checkpointingcrates/fungi-examples/examples/checkpointing.rs
kafka_*crates/fungi-examples/examples/kafka_*.rs