Skip to content
This repository has been archived by the owner on Jun 19, 2024. It is now read-only.
/ fkafka Public archive

Use librdkafka via Dart FFI.

License

BSD-3-Clause, Unknown licenses found

Licenses found

BSD-3-Clause
LICENSE
Unknown
LICENSE.librdkafka
Notifications You must be signed in to change notification settings

headone/fkafka

Repository files navigation

fkafka - Dart wrapper of the librdkafka

Pub Platform

Use librdkafka via Dart FFI. Wraps Admin and Producer and Consumer clients, can also use librdkafka interface via FFI.

Features

Admin Client

  • create topic
  • query topics
  • query groups
  • query topic offsets
  • query group committed offsets

Producer Client

(coming soon)

Consumer Client

(coming soon)

librdkafka Bridges

Use the bound librdkafka interface via FFI

Usage

  1. 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
  2. in your code

    1. instantiate the client
    var client = FkafkaAdminClient(
      conf: FkafkaConf({
        'bootstrap.servers': '127.0.0.1:9092'
      })
    );
    1. use its method like create topic
    client.newTopic('first-topic');
    1. release when no longer in use
    client.release();