Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/uber-common/node-kafka-rest-client
A REST client for producing messages to Kafka
https://github.com/uber-common/node-kafka-rest-client
Last synced: about 2 months ago
JSON representation
A REST client for producing messages to Kafka
- Host: GitHub
- URL: https://github.com/uber-common/node-kafka-rest-client
- Owner: uber-common
- License: mit
- Created: 2015-08-24T18:12:37.000Z (about 9 years ago)
- Default Branch: master
- Last Pushed: 2018-10-04T04:40:55.000Z (almost 6 years ago)
- Last Synced: 2024-05-01T02:02:02.787Z (5 months ago)
- Language: JavaScript
- Homepage: http://www.uber.com
- Size: 243 KB
- Stars: 39
- Watchers: 2,598
- Forks: 10
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# node-kafka-rest-client
A rest client for producing JSON and binary messages to kafka.
## Usage
```js
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 lintTests are run using `npm`:
npm run lint
## MIT Licenced