Consume HTML from Kafka messages, transform in any way, produce.
Install via yarn
yarn install @knamp/content-generator
Then configure it and use it
import ContentGenerator from "@knamp/content-generator";
(async () => {
const generator = ContentGenerator({
clientName: "generator-client",
consumeFrom: "generator-consume",
groupId: "generator-group",
produceTo: "produce-topic",
tranformer: (transformThis: ConsumerContentInterface): Promise<string> => transformThis.content
});
generator.on("error", console.log)
generator.on("info", console.log)
generator.setup();
await generator.start();
})();
- Sinek, consuming and producing messages to and from Apache Kafka
This project is under MIT.