Socket
Socket
Sign inDemoInstall

@epsor/kafka-producer

Package Overview
Dependencies
2
Maintainers
21
Versions
22
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    @epsor/kafka-producer

Kafka producer abstraction


Version published
Maintainers
21
Created

Readme

Source

CircleCI npm version

@epsor/kafka-producer

The is the packet which has the responsability to encode/decode mesages for/to the event store.

Usage

Produce a message

import producer from '@epsor/kafka-producer';
import uuid from 'uuid';

const message = {
  headers: {
    version: 'v1.0',
    type: 'user.created',
    uuid: uuid.v4(),
  },
  uuid: uuid.v4(),
  email: 'ok',
  firstname: 'Jean',
  lastname: 'Michel',
};

(async () => {
  try {
    await producer.produce(message, process.env.EVENT_TOPIC);
  } finally {
    await producer.disconnect();
  }
})();

FAQs

Last updated on 20 Jul 2023

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc