fkafka - Dart wrapper of the librdkafka
Overview
Use librdkafka via Dart FFI, wraps admin and producer and consumer clients.
Features
1. Admin Client
- create topic
- query topics
- query groups
- query topic offsets
- query group committed offsets
2. Producer Client
(coming soon)
3. Consumer Client
(coming soon)
Usage
-
ready librdkafka
- if windows, can download dll file form this, and then put the file in current dir or set env
LIBRDKAFKA_ROOT
the value is dll file dir.
- if windows, can download dll file form this, and then put the file in current dir or set env
-
in your code
- instantiate the client
var client = FkafkaAdminClient( conf: FkafkaConf({ 'bootstrap.servers': '127.0.0.1:9092' }) );
- use its method like create topic
client.newTopic('first-topic');
- release when no longer in use
client.release();