Releases: kellanburket/franz
Releases · kellanburket/franz
SASL PLAIN support and create topic API
You can now connect to clusters with PLAIN authentication:
let cluster = Cluster(brokers: [("localhost", 9092)],
clientId: "saslClient",
authentication: .plain(username: "franz", password: "password"))
You can also create new topics:
cluster.createTopic(name: "myTopic", partitions: 3, replicationFactor: 2)
1.0.1
New consumer API
This release includes a new consumer API that makes it easier to start and stop listening to topics.
Here is an example using the new Consumer
class:
let consumer = cluster.getConsumer(topics: ["foo", "bar"], groupId: "testGroup")
consumer.listen { message in
let string = String(data: message.value, encoding: .utf8)!
print(string)
}
The existing consumer classes, SimpleConsumer
and HighLevelConsumer
are still around but have been deprecated.
Swift 4 and Swift Package Manager
0.2.0 Add back file private where needed