All Projects → uber-common → node-kafka-rest-client

uber-common / node-kafka-rest-client

Licence: MIT License
A REST client for producing messages to Kafka

Programming Languages

javascript
184084 projects - #8 most used programming language

node-kafka-rest-client

A rest client for producing JSON and binary messages to kafka.

Usage

var KafkaRestClient = require('kafka-rest-client');
var configs = {
    proxyHost: 'localhost',
    proxyPort: 18084
};

var kafkaRestClient = new KafkaRestClient(kafkaRestClientOptions, callback);
kafkaRestClient.connect(callback);

kafkaRestClient.produce(topicName, 'Example Kafka Message', callback);

Options

KafkaProducer constructor accepts these options:

  • proxyHost - Rest proxy hostname to produce kafka messages (default: localhost)
  • proxyPort - Rest proxy port to produce kafka messages (required)

Install

npm install kafka-rest-client

Running tests

Tests are run using npm:

npm run test

Running lint

Tests are run using npm:

npm run lint

MIT Licenced

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].