# @gridql/kafka-event-consumer

> Listens to mongo and emits events

Latest version **3.9.0** (published 2024-04-24) · MIT license · 0 weekly downloads

## Install

```sh
npm install @gridql/kafka-event-consumer
pnpm add @gridql/kafka-event-consumer
yarn add @gridql/kafka-event-consumer
bun add @gridql/kafka-event-consumer
```

## Health

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

Positive: has types; esm support; no vulnerabilities; high quality score.

Warnings: low downloads.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 3.9.0 |
| Published | 2024-04-24 |
| First published | 2023-07-22 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | ESM + CommonJS |
| Dependencies | 7 |
| Unpacked size | 24.9 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | Tom Marsh |
| Maintainers | tsmarsh |

## Links

- npm: https://www.npmjs.com/package/@gridql/kafka-event-consumer
- npm.io page: https://npm.io/package/@gridql/kafka-event-consumer

## Dependencies (7)

- [axios](https://npm.io/package/axios.md) ^1.4.0
- [kafkajs](https://npm.io/package/kafkajs.md) ^2.2.4
- [mongodb](https://npm.io/package/mongodb.md) ^6.5.0
- [@gridql/url](https://npm.io/package/@gridql/url.md) ^3.8.4
- [@pushcorn/hocon-parser](https://npm.io/package/@pushcorn/hocon-parser.md) ^1.2.6
- [@gridql/mongo-connector](https://npm.io/package/@gridql/mongo-connector.md) ^3.9.0
- [@gridql/payload-validator](https://npm.io/package/@gridql/payload-validator.md) ^3.8.4

## Recent versions

- 3.9.0 (latest) — 2024-04-24
- 3.8.9 — 2024-04-23
- 3.8.4 — 2024-03-22
- 3.8.2 — 2024-03-21
- 3.8.1 — 2024-03-21
- 3.8.0 — 2024-03-18
- 3.7.0 — 2024-03-14
- 3.6.0 — 2024-03-12
- 3.5.0 — 2024-02-21
- 3.4.3 — 2024-02-16
- 3.4.2 — 2024-02-15
- 3.2.0 — 2024-01-01
- 3.1.5 — 2023-11-29
- 3.1.0 — 2023-07-31
- 3.0.1 — 2023-07-27
- … 1 more at https://npm.io/package/@gridql/kafka-event-consumer/versions

## README

# Kafka Event Consumer

The grid is made up of multiple event stores. We have two primary ways of those events being generated:

- user action
  - HTTP Request via the REST API
- system reaction
  - Taking events from a queue

This modules focuses on the latter.

In principle _all_ we have to do is:

- Take event from queue
- Discriminate based on operation type
- Forward to RestAPI

## TODO

### Features

- [x] Basic happy path
  - [x] CREATE
  - [x] DELETE
  - [x] UPDATE
- [x] Work with any field as "ID"
- [x] Split message out of envelope
- [ ] Bulk changes
- [x] Default to picking up where the group left off
- [ ] Sad path
  - [ ] Dead letter queue
  - [x] validation of message
  - [ ] Handling network outages

### NFRs

- [ ] Performance tests
- [ ] Integration test

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