Available

amalgame-kafka

Apache Kafka via librdkafka. Producer + Consumer + groups.

amc package add kafka GitHub ↗ ← Back to the ecosystem

Overview

Kafka is the backbone of countless event-streaming pipelines. The package links dynamically to librdkafka — the reference C client (also used by Python, Ruby, Node.js). Compatible with Apache Kafka, Confluent, Redpanda, Aiven, AWS MSK.

Features

  • Producer with batching and compression (gzip/snappy/lz4/zstd)
  • Consumer with offset management and consumer groups
  • Compatible: Apache Kafka, Confluent, Redpanda, Aiven, AWS MSK
  • TLS + SASL/SCRAM via the librdkafka chain
  • Dynamic-link pattern — no fork to maintain

Example

Minimal usage example — copy-paste runnable after install.

amc package add kafka

let p = KafkaProducer.New("broker1:9092,broker2:9092")
p.Send("user-events", "user-42", "{ action: 'login' }")

let c = KafkaConsumer.Subscribe(["user-events"], "my-group")
c.OnMessage(fn(topic, key, value) {
    Console.WriteLine(topic + "/" + key + " → " + value)
})

At a glance

Related packages