Apache Iggy Rust SDK
Website | Getting started | Documentation | Examples | Discord
Official Rust client SDK for Apache Iggy, the persistent message streaming platform written in Rust. The SDK ships a low-level transport client (QUIC, TCP, HTTP, WebSocket) for direct command access and a high-level producer/consumer API with batching, consumer groups, and auto-commit.
Apache Iggy (Incubating) is an effort undergoing incubation at the Apache Software Foundation (ASF), sponsored by the Apache Incubator PMC.
Incubation is required of all newly accepted projects until a further review indicates that the infrastructure, communications, and decision making process have stabilized in a manner consistent with other successful ASF projects.
While incubation status is not necessarily a reflection of the completeness or stability of the code, it does indicate that the project has yet to be fully endorsed by the ASF.
Features
- Transports: TCP (custom binary), QUIC, HTTP, WebSocket. One unified
IggyClientAPI across all four. - TLS on every transport, configured via connection string (
?tls=true&tls_ca_file=/path/to/ca.crt) or builder. - Connection strings with auto-login on
connect():iggy://(TCP default),iggy+tcp://,iggy+quic://,iggy+http://,iggy+ws://. Reconnection retries and heartbeat interval are configurable as URL options. - Authentication: username/password and Personal Access Tokens (PAT).
- Async, non-blocking client built on Tokio with custom zero-copy (de)serialization.
- High-level builders on
IggyClient:producer(stream, topic),consumer(name, stream, topic, partition), andconsumer_group(name, stream, topic). - Producer modes:
direct(synchronous send) andbackground(buffered with parallel shard workers usingOrderedShardingorBalancedSharding). Configurable batch length / size and linger time. - Partitioning:
balanced,partition_key, or explicitpartition_id. CustomPartitioneris pluggable. - Consumer: standalone or consumer-group; consumed as an async
Stream. Polling strategies:next,offset,timestamp,first,last. - Auto-commit offset policies:
Interval,When,After,IntervalOrWhen,IntervalOrAfter, or disabled. - Stream builder (
IggyStream,IggyStreamProducer,IggyStreamConsumer) for declarative producer + consumer setup on shared or separate stream/topic. - Reliability: automatic reconnection with retries, heartbeat, send retries, and offset auto-commit handled by the high-level API.
- Message features: optional headers (
HeaderKey/HeaderValue), client-side AES-256-GCM encryption (viaAes256GcmEncryptor), topic compression metadata (NoneandGzip; no runtime compression yet), server-honored message expiry, and server-side deduplication. - Admin: stream/topic/partition CRUD, consumer-group management, server-side consumer offsets, system stats.
Installation
Optional features map to common scenarios. See the Rust SDK docs for the full list.
Quick start
use Error;
use FromStr;
use StreamExt;
use *;
const STREAM: &str = "telemetry";
const TOPIC: &str = "device-events";
const CONSUMER_GROUP: &str = "telemetry-ingester";
async
For lower-level control over individual commands (login, stream/topic management, raw send, polling by offset or timestamp), use the transport-specific clients directly. See the examples and the Rust SDK docs.
Versioning
Stable releases follow semver (x.y.z). Edge releases (x.y.z-edge.N) are cut from master between stable versions and may include unreleased fixes; pin to a stable version for production.
Resources
- Rust SDK docs
- High-level SDK guide
- Stream builder guide
- Project documentation
- Runnable examples: getting-started, basic, new-sdk, stream-builder, multi-tenant, message-envelope, message-headers, tcp-tls, sink-data-producer.
- Benchmarking platform
- GitHub repository
- Discord community
Related crates
iggy_common: shared types and traits.iggy_binary_protocol: wire protocol codec.iggy-cli: command-line tool,cargo install iggy-cli.
License
Licensed under the Apache License, Version 2.0. See LICENSE.