We are thrilled to announce the release of swift-kafka-client 1.0.0, our first stable release of the Swift Kafka client built on librdkafka. Thank you to everyone who tested the beta and shared invaluable feedback along the way.
Highlights
- Modern Structured Concurrency: Initialize clients via makeConsumer(config:) / makeProducer(config:), or use safe, scoped lifetime helpers like withConsumer and withProducer.
- Robust Consumer API: Fully equipped for production with at-least-once processing (storeOffset, commit, commitStoredOffsets), rebalance lifecycle events, dynamic subscribe / unsubscribe, pause/resume capabilities, offset queries & seek, and cluster metadata introspection.
- Producer API: Features awaitable sendAndAwait alongside RawSpan overloads, enabling delivery of existing byte buffers (such as Foundation.Data) without copying them into an array first.
- Typed Error Handling: Typed KafkaError codes complete with built-in isRetriable and isFatal evaluations.
- Built-in Observability: Metrics enabled by default (consumer lag, throughput, broker latency, and more) via swift-metrics, paired with structured logging.
- Broad Platform Support: Supports macOS, iOS, tvOS, watchOS, and Linux—including fully static Linux (musl) builds with bundled BoringSSL (eliminating host OpenSSL dependencies). Powered by librdkafka 2.14.1.
Getting Started
Add the package to your Package.swift:
.package(url: " GitHub - swift-server/swift-kafka-client · GitHub ", from: "1.0.0")
System Requirements:
- Swift: 6.2.3 or later
- Operating Systems: macOS 15, iOS 18, tvOS 18, watchOS 11, or Linux
Learn More:
For breaking changes, check out the official Release Notes. For end-to-end guides covering producing, consuming, error handling, and observability, see the Documentation.
Feedback:
If you run into any problems or have ideas for what should come next, please open an issue on GitHub or reply below. We would love to hear how you are using it in production!