🚀 Big News: Socket Acquires Coana to Bring Reachability Analysis to Every Appsec Team.Learn more
Socket
Book a DemoInstallSign in
Socket

@epsor/kafka-producer

Package Overview
Dependencies
Maintainers
21
Versions
22
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install
Package was removed
Sorry, it seems this package was removed from the registry

@epsor/kafka-producer

Kafka producer abstraction

5.3.0
unpublished
latest
npm
Version published
Maintainers
21
Created
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

Package last updated on 20 Jul 2023

Did you know?

Socket

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