Last active
August 9, 2020 15:26
-
-
Save thakursaurabh1998/3489b09b3e64fd640a5ef2c74e324310 to your computer and use it in GitHub Desktop.
Kafka Throttle
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const { ConsumerGroup } = require('kafka-node'); | |
const options = { | |
kafkaHost: 'broker:9092', | |
groupId: 'order-service', | |
}; | |
const consumer = new ConsumerGroup(options, 'OrderTopic'); | |
consumer.on('message', (data) => { | |
// queue data available here | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment