GithubHelp home page GithubHelp logo

isabella232 / node-sinek Goto Github PK

View Code? Open in Web Editor NEW

This project forked from brave-intl/node-sinek

0.0 0.0 0.0 1014 KB

:tophat: Most advanced high level Node.js Kafka client

License: MIT License

JavaScript 0.57% Shell 4.95% Dockerfile 1.21% TypeScript 93.26%

node-sinek's Introduction

High Level Node.js Kafka Client

Build Status npm version

The most advanced Kafka Client.

Features

  • easy promise based API
  • a lot of Kafka pitfalls already taken care of
  • backpressure and stream consume modes
  • secure committing in backpressure (1:n, batch) mode
  • plain Javascript implementation based on kafka-node and a super fast native implementation based on node-rdkafka
  • SSL, SASL & Kerberos support
  • auto reconnects
  • auto partition recognition and deterministic spreading for producers
  • intelligent health-checks and analytic events for consumers and producers

You might also like

Latest Changes

Can be found here

Install

npm install --save sinek

Usage

Usage - JS Client (based on kafka.js)

const {
  JSConsumer,
  JSProducer
} = require("sinek");

const jsProducerConfig = {
  clientId: "my-app",
  brokers: ["kafka1:9092"]
}

(async () => {

  const topic = "my-topic";

  const producer = new JSProducer(jsProducerConfig);
  const consumer = new JSConsumer(topic, jsConsumerConfig);

  producer.on("error", error => console.error(error));
  consumer.on("error", error => console.error(error));

  await consumer.connect();

  // consume from a topic.
  consumer.consume(async (messages) => {
    messages.forEach((message) => {
      console.log(message);
    })
  });

  // Produce messages to a topic.
  await producer.connect();
  producer.send(topic, "a message")
})().catch(console.error);

Further Docs

make it about them, not about you

  • Simon Sinek

node-sinek's People

Contributors

krystianity avatar yacut avatar greenkeeper[bot] avatar rob3000 avatar vuza avatar vidhill avatar juriwiens avatar rjmasikome avatar holgeradam avatar atd-schubert avatar dependabot[bot] avatar c24w avatar alkiskal avatar elmarx avatar gilesbradshaw avatar imnotjames avatar rd-johannes-jambor avatar darky avatar ubershmekel avatar zakjholt avatar sondremare avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.