gadc3 / franz-1

A Kafka Client for Swift

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Franz

CI Status Version License Platform

Franz is an Apache Kafka 0.9.0 client for iOS and macOS.

Usage

import Franz

let cluster = Cluster(brokers: [("localhost", 9092)], clientId: "FranzExample")

let consumer = cluster.getConsumer(topics: ["test"], groupId: "group")
consumer.listen { message in
	print(String(data: message.value, encoding: .utf8)!)
}

cluster.sendMessage("test", message: "Hello world!")

The current release of Franz should be considered beta. It is not necessarily ready for production code.

The repo has example projects for CocoaPods and Swift Package Manager.

Installation

CocoaPods

Add the following line to your Podfile:

pod "Franz"

Swift Package Manager

Add the following dependency to your Package.swift:

dependencies: [
    .package(url: "https://github.com/kellanburket/franz.git", from: "1.0.0"),
],
targets: [
    .target(name: "MyTarget", dependencies: ["Franz"])
]

Author

Kellan Cummings

Luke Lau

License

Franz is available under the MIT license. See the LICENSE file for more info.

About

A Kafka Client for Swift

License:MIT License


Languages

Language:Swift 99.2%Language:Ruby 0.8%