package kafka-eio

  1. Overview
  2. Docs
Eio-native Kafka client for OCaml 5, built on librdkafka

Install

dune-project
 Dependency

Authors

Maintainers

Sources

v0.1.1.tar.gz
md5=88c2b9c6d263a1eb114cc5d1b570288a
sha512=44f5395fcc58b8d4303bc0b36113a17193da3a1925125cb0742fabeb96f32eb6b243c98d2fde283b6c95872ff36ddbf96de6e98b7612799e2aefeb2f85a1db95

Description

Producer and consumer libraries for Kafka on Eio/OCaml 5, backed by librdkafka. Idempotent/transactional delivery, consumer-group streaming with explicit ack, partition-aware concurrency, and typed transport security (plaintext/SSL/SASL).

Added to opam-repository:

README

kafka-eio

Eio-native Kafka client for OCaml 5, built on librdkafka.

  • kafka-eio-core — internal shared FFI/error/security layer, installed as kafka-eio.core for the higher-level packages; Kafka_raw is unstable and not the supported user API
  • kafka-eio-producer — producer: fire-and-forget, awaitable delivery, transactions
  • kafka-eio-consumer — consumer: fetch/stream/poll, consumer groups, explicit ack, partition-aware retry
  • kafka-eio-facade (Kafka module, findlib kafka-eio.kafka) — thin aliases (Kafka.Producer, Kafka.Consumer, Kafka.Error, Kafka.Security) over the three packages above, for open Kafka instead of the flat module names
  • demo/ — minimal produce-then-consume sandbox binary

Extracted from the Sun platform, where kafka-eio-service (typed message contracts, schema registry, Redpanda admin, retry topics/DLQ — the opinionated application layer) still lives and now depends on this as an external library.

Build

eval $(opam env)
dune build

Prerequisite: sudo apt-get install -y librdkafka-dev

Test

# Unit tests (no broker needed)
dune runtest

# Integration tests (requires a running broker)
KAFKA_BROKERS=localhost:9092 dune build @runtest-integration

See each package's <name>.md for its design document.

Dependencies (6)

  1. conf-librdkafka
  2. cstruct >= "6.0.0"
  3. eio_main >= "1.3"
  4. eio >= "1.3"
  5. dune >= "3.0"
  6. ocaml >= "5.4.0"

Dev Dependencies (2)

  1. odoc with-doc
  2. alcotest with-test

Used by

None

Conflicts

None