Skip to content
This repository has been archived by the owner on Aug 18, 2020. It is now read-only.
/ content-generator Public archive

Consume HTML from Kafka messages, transform to AMP HTML, produce

License

Notifications You must be signed in to change notification settings

knamp/content-generator

Repository files navigation

Content Generator

Consume HTML from Kafka messages, transform in any way, produce.

Usage

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();
})();

Uses

  • Sinek, consuming and producing messages to and from Apache Kafka

License

This project is under MIT.

About

Consume HTML from Kafka messages, transform to AMP HTML, produce

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published