kafka-schema-registry
module for create kafka-node connection.
Installation and Usage
Before installing the package, the Kafka server must be running and Schema-registry or you can running Confluent
Install the package
npm install kafka-schema-registry --save
Require KafkaClient:
const KafkaClient = ;const kafkaClient = schemaHost: 'http://your-kafka-host:8081' kafkaHost: 'your-kafka-host:9092' topics: topic: 'your-topic';
Producer
const KafkaClient = ; const kafkaClient = schemaHost: 'http://localhost:8081' kafkaHost: 'localhost:9092'; kafkaClient;
Consumer
const KafkaClient = ;const kafkaClient = schemaHost: 'http://localhost:8081' kafkaHost: 'localhost:9092' topics: topic: 'your-topic'; kafkaClient;