Skip to content

chrisrecalis/kafkats

Repository files navigation

kafkats

kafkats

A TypeScript Kafka client and streaming library.

npm build license

Documentation

Packages

Package Description
@kafkats/client Kafka client with producer, consumer, and admin APIs
@kafkats/flow Kafka Streams-like DSL for stream processing
@kafkats/flow-state-lmdb Persistent LMDB state stores
@kafkats/codec-zod Zod schema validation codecs

Quick Start

npm install @kafkats/client
import { KafkaClient } from '@kafkats/client'

const client = new KafkaClient({ brokers: ['localhost:9092'] })

// Producer
const producer = client.producer()
await producer.send('events', [{ key: 'user-1', value: 'hello' }])

// Consumer
const consumer = client.consumer({ groupId: 'my-group' })
await consumer.runEach('events', async (message, ctx) => {
  console.log(message.value?.toString())
})

License

MIT

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors

Languages