# @tcf_team/send-json-to-kafka-queue

> > Publish list of object to kafka

Latest version **1.0.6** (published 2021-01-13) · MIT license · 0 weekly downloads

## Install

```sh
npm install @tcf_team/send-json-to-kafka-queue
pnpm add @tcf_team/send-json-to-kafka-queue
yarn add @tcf_team/send-json-to-kafka-queue
bun add @tcf_team/send-json-to-kafka-queue
```

## 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 | 1.0.6 |
| Published | 2021-01-13 |
| First published | 2020-01-31 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 3 |
| Unpacked size | 9.7 KB |
| Known vulnerabilities | 0 (+1 in 1 direct dependencies) |
| Install scripts | no |
| Author | tcf team |
| Maintainers | tcf_team |

## Links

- npm: https://www.npmjs.com/package/@tcf_team/send-json-to-kafka-queue
- Repository: https://github.com/thechatbotfactory/send-to-kafka
- Homepage: https://github.com/thechatbotfactory/send-to-kafka#readme
- Issues: https://github.com/thechatbotfactory/send-to-kafka/issues
- npm.io page: https://npm.io/package/@tcf_team/send-json-to-kafka-queue

## Dependencies (3)

- [debug](https://npm.io/package/debug.md) 4.1.1
- [ramda](https://npm.io/package/ramda.md) 0.26.1
- [kafka-node](https://npm.io/package/kafka-node.md) 4.0.2

## Recent versions

- 1.0.6 (latest) — 2021-01-13
- 1.0.5-beta1 — 2020-12-30
- 1.0.5-beta — 2020-12-28
- 1.0.4 — 2020-12-24
- 1.0.3 — 2020-10-02
- 1.0.2 — 2020-06-18
- 1.0.1 — 2020-01-31
- 1.0.0 — 2020-01-31

## README

> Publish list of object to kafka

[![XO code style](https://img.shields.io/badge/code_style-XO-5ed9c7.svg)](https://github.com/sindresorhus/xo)

## Install
```bash
yarn add @tcf_team/send-json-to-kafka-queue

# or

npm install --save @tcf_team/send-json-to-kafka-queue
```

## Configuring
The location of kafka can be set by the environment variable:
```bash
KAFKA_URL=localhost:9092 # default
```

## Example usage

```js
const {sendToKafka} = require('send-to-kafka');

const exampleFunction = async () => {
  const somethingToAddInsideEachMessage = 'what you want string, object, list, number';
  const listOfMessageJSON = [
    {key: 'value', key2: 'value2'},
    {key: 'value', something: 'value'}
  ];
  
   
  await sendToKafka('topic', somethingToAddInsideEachMessage, listOfMessageJSON)
};

exampleFunction().then(() => {console.log('Everything is sent')});
```

## Debugging
This package uses the [debug package](https://www.npmjs.com/package/debug).
You can configure it with environment variables:
```bash
DEBUG=send-to-kafka:debug # only debug messages
DEBUG=send-to-kafka:trace # only trace messages
DEBUG=send-to-kafka:*     # every messages
```

---
_Source: https://npm.io/package/@tcf_team/send-json-to-kafka-queue · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
