# toto-event-consumer

> This is a npm library to be used to consume from a Kafka topic.

Latest version **6.2.0** (published 2020-03-08) · ISC license · 0 weekly downloads

## Install

```sh
npm install toto-event-consumer
pnpm add toto-event-consumer
yarn add toto-event-consumer
bun add toto-event-consumer
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 6.2.0 |
| Published | 2020-03-08 |
| First published | 2019-01-26 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 4 |
| Unpacked size | 8.7 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Maintainers | nicolas.ances |

## Links

- npm: https://www.npmjs.com/package/toto-event-consumer
- npm.io page: https://npm.io/package/toto-event-consumer

## Dependencies (4)

- [kafka-node](https://npm.io/package/kafka-node.md) ^4.0.0
- [toto-logger](https://npm.io/package/toto-logger.md) ^4.0.0
- [moment-timezone](https://npm.io/package/moment-timezone.md) ^0.5.23
- [@google-cloud/pubsub](https://npm.io/package/@google-cloud/pubsub.md) ^0.30.1

## Recent versions

- 6.2.0 (latest) — 2020-03-08
- 6.0.0 — 2019-07-20
- 5.1.1 — 2019-06-23
- 5.1.0 — 2019-06-23
- 5.0.0 — 2019-05-25
- 4.1.0 — 2019-05-25
- 4.0.0 — 2019-02-19
- 3.0.7 — 2019-02-09
- 3.0.6 — 2019-02-09
- 3.0.5 — 2019-02-09
- 3.0.4 — 2019-02-09
- 3.0.3 — 2019-02-09
- 3.0.2 — 2019-02-09
- 3.0.1 — 2019-02-09
- 3.0.0 — 2019-02-09
- … 8 more at https://npm.io/package/toto-event-consumer/versions

## README

# Toto Event Consumer

This is a npm library to be used to consume from a Kafka topic.

When including this through `require()`, a new `TotoEventConsumer` instance will be automatically created and it will be possible to consume events from kafka.

Typical usage:

```
var TotoEventConsumer = require('toto-event-consumer');
var eventConsumer = new TotoEventConsumer(microserviceName, topic, (event) => {});
```

Example:
```
var TotoEventConsumer = require('toto-event-consumer');
var eventConsumer = new TotoEventConsumer('react-training-nssex', 'trainingSessionsCreated', (event) => {});
```

**NOTE!** that the `event` that is being passed in the callback **has already been parsed and is in JSON format**!

---
_Source: https://npm.io/package/toto-event-consumer · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
