Use librdkafka via Dart FFI. Wraps Admin and Producer and Consumer clients, can also use librdkafka interface via FFI.
- create topic
- query topics
- query groups
- query topic offsets
- query group committed offsets
(coming soon)
(coming soon)
Use the bound librdkafka interface via FFI
-
ready librdkafka
- if windows, you can download dll file form here, and then put the file in current directory or set environment
LIBRDKAFKA_ROOT
the value is dll file directory. - if Mac OSX, install librdkafka with homebrew:
$ brew install librdkafka
- On Debian and Ubuntu, install librdkafka from the Confluent APT repositories, see instructions here and then install librdkafka:
$ apt install librdkafka-dev
- On RedHat, CentOS, Fedora, install librdkafka from the Confluent YUM repositories, instructions here and then install librdkafka:
$ yum install librdkafka-devel
- if windows, you can download dll file form here, and then put the file in current directory or set environment
-
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();