Examples
Volley includes runnable examples in the volley-examples crate. Each demonstrates a different feature or pipeline pattern.
Running Examples
# Run any example
cargo run --example <name> -p volley-examples
# Run benchmarks in release mode
cargo run --example <name> -p volley-examples --release
Available Examples
| Example | Description |
|---|---|
in_memory_pipeline | Basic pipeline with filter, key_by, window, and aggregate using in-memory source |
kafka_pipeline | Kafka source to Kafka sink with windowed aggregation |
windowed_pipeline | Event-time windowing with watermarks and late data handling |
observable_pipeline | Pipeline with observability (Prometheus metrics, OpenTelemetry tracing) |
protobuf_to_delta | Protobuf decode -> Delta Lake sink with partitioned writes |
nested_proto_partitioned | Nested protobuf types with Hive-style partitioned writes |
benchmark_throughput | Single-shot throughput benchmark across batch sizes and parallelism levels |
benchmark_sustained | Sustained throughput benchmark (10s run, batch=1000, parallelism=4) |
Prerequisites
Most examples work out of the box. Some have additional requirements:
kafka_pipeline— requires a running Kafka broker atlocalhost:9092andcmakeinstalledprotobuf_to_delta,nested_proto_partitioned— requires a writable path for Delta table output- Benchmarks — run with
--releasefor meaningful numbers
Walkthrough
See Your First Pipeline for a step-by-step walkthrough of the in_memory_pipeline example.