# kafka-fantasy

> Functional wrapper around kafka-node. Based on fantasyland spec.

Latest version **1.0.2** (published 2015-08-05) · MIT license · 0 weekly downloads

## Install

```sh
npm install kafka-fantasy
pnpm add kafka-fantasy
yarn add kafka-fantasy
bun add kafka-fantasy
```

## 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.2 |
| Published | 2015-08-05 |
| First published | 2015-08-05 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 6 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | Trevor Basinger |
| Maintainers | trevorbasinger |
| Keywords | fantasyland, functional, kafka |

## Links

- npm: https://www.npmjs.com/package/kafka-fantasy
- Repository: https://github.com/Flogistix/kafka-fantasy
- Homepage: https://github.com/Flogistix/kafka-fantasy#readme
- Issues: https://github.com/Flogistix/kafka-fantasy/issues
- npm.io page: https://npm.io/package/kafka-fantasy

## Dependencies (6)

- [ramda](https://npm.io/package/ramda.md) ^0.17.1
- [baconjs](https://npm.io/package/baconjs.md) ^0.7.70
- [data.task](https://npm.io/package/data.task.md) ^3.0.0
- [fantasy-io](https://npm.io/package/fantasy-io.md) 0.0.1
- [kafka-node](https://npm.io/package/kafka-node.md) ^0.2.27
- [control.monads](https://npm.io/package/control.monads.md) ^0.6.0

## Recent versions

- 1.0.2 (latest) — 2015-08-05
- 1.0.1 — 2015-08-05
- 1.0.0 — 2015-08-05

## README

#Data

    data ProducerRequest = ProducerRequest { topic :: String
                                           , messages :: [String]
                                           , partition :: Int
                                           , attributes :: 2 }

    data FetchRequest = FetchRequest { topic :: String, offset :: Int }

    data ConsumerOptions = ConsumerOptions { groupId :: String
                                           , autoCommit :: Boolean
                                           , autoCommitIntervalMs :: Int
                                           , fetchMaxWaitMs :: Int
                                           , fetchMinBytes :: Int
                                           , fromOffset :: Boolean
                                           , encoding :: String }

#Functions

    mkClient :: String -> String -> Client

    closeClient :: Producer -> Task Unit

    mkProducer :: Client -> Producer

    producerOnReady :: Producer -> Int -> Task Unit

    createTopics :: Producer -> [String] -> Task Unit

    closeProducer :: Producer -> Task Unit

    mkProducerRequest :: Topic -> Int -> [String] -> Payload

    send :: Producer -> [ProducerRequest] -> Task Unit

    mkConsumer :: Client -> [FetchRequest] -> ConsumerOptions -> Consumer

    mkFetchRequest :: String -> Int -> FetchRequest

    mkStreamFromTopic :: Consumer -> String -> EventStream

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