3.0.0 • Published 6 years ago

kafka-client v3.0.0

Weekly downloads
12
License
ISC
Repository
-
Last release
6 years ago

kafka-client

A javascript client for kafka

Why the client

The purpose of this client has been to get hands on experience with kafka.

This client does not interact with Kafka directly but relies on kafka-node for this interaction. It is more focused on simplifying the API interface rather than the technical with a kafka cluster. There are other node libraries to interact with kafka such as node-rdkafka.
By using this client it will possible to switch to using a different kafka interaction package in the future without having to change upstream code. For instance if kafka-rdnode evolves faster than kafka-node

Getting started

see Getting Started

Get a client

var client = await client.connect();

View Topics

var topics = await client.getTopics();

Creating a Topic

await client.createTopic(topic);

Produce a simple message

await client.produce(key,value,topic);								

Consuming a message

//Establish a message consumer for a group on a topic
var consumeMessage = await client.singleMessageConsumer(group,topic);

//Then wait for a message
var result = await consumeMessage();

Useful Reference

Getting Started with Kafka Client

Release Notes

Release Notes

3.0.0

6 years ago

2.2.0

6 years ago

2.1.2

6 years ago

2.1.1

6 years ago

2.1.0

6 years ago

2.0.4

6 years ago

2.0.3

6 years ago

2.0.2

6 years ago

2.0.1

6 years ago

2.0.0

6 years ago

1.1.0

6 years ago

0.0.3

6 years ago

0.0.2

6 years ago

0.0.1

6 years ago