# ibm-iis-kafka

> Re-usable functions for interacting with IBM InfoSphere Information Server's Kafka event mechanism

Latest version **0.3.1** (published 2018-10-03) · Apache-2.0 license · 0 weekly downloads

## Install

```sh
npm install ibm-iis-kafka
pnpm add ibm-iis-kafka
yarn add ibm-iis-kafka
bun add ibm-iis-kafka
```

## Health

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

Positive: no vulnerabilities.

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

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.3.1 |
| Published | 2018-10-03 |
| First published | 2017-01-11 |
| Weekly downloads | 0 |
| License | Apache-2.0 |
| TypeScript types | none |
| Module format | CommonJS |
| Node | >=4.2.4 |
| Dependencies | 1 |
| Unpacked size | 40.5 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | IBM Corp. |
| Maintainers | cgrote |
| Keywords | ibm, iis, infosphere, information server, kafka |

## Links

- npm: https://www.npmjs.com/package/ibm-iis-kafka
- Repository: https://github.com/cmgrote/ibm-iis-kafka
- Issues: https://github.com/cmgrote/ibm-iis-kafka/issues
- npm.io page: https://npm.io/package/ibm-iis-kafka

## Dependencies (1)

- [kafka-node](https://npm.io/package/kafka-node.md) >=3.0.0

## Alternatives

- [mobx-react](https://npm.io/package/mobx-react.md) — 2.8M weekly downloads
- [rc-tree](https://npm.io/package/rc-tree.md) — 2.6M weekly downloads
- [@react-oauth/google](https://npm.io/package/@react-oauth/google.md) — 1.3M weekly downloads
- [@wagmi/connectors](https://npm.io/package/@wagmi/connectors.md) — 877.0K weekly downloads
- [vee-validate](https://npm.io/package/vee-validate.md) — 836.4K weekly downloads

## Recent versions

- 0.3.1 (latest) — 2018-10-03
- 0.2.2 — 2017-01-13
- 0.2.1 — 2017-01-11

## README

# README

<!-- Generated by documentation.js. Update this documentation by updating the source code. -->

## ibm-iis-kafka

Re-usable functions for interacting with IBM InfoSphere Information Server's Kafka event mechanism

**Examples**

```javascript
const iiskafka = require('ibm-iis-kafka');
const infosphereEventEmitter = new iiskafka.InfosphereEventEmitter('zookeeper-host:2181', 'asset-object-handler', false);
infosphereEventEmitter.on('IGC_DATABASESGROUP_EVENT', function(infosphereEvent, eventCtx, commitCallback) {
  console.log("Processing a change to a Database object:");
  console.log("  ... type (display name): " + infosphereEvent.ASSET_TYPE);
  console.log("  ... unique ID (RID)    : " + infosphereEvent.ASSET_RID);
  console.log("  ... parent identity    : " + infosphereEvent.ASSET_CONTEXT);
  console.log("  ... asset identity     : " + infosphereEvent.ASSET_NAME);
  console.log("  ... action taken       : " + infosphereEvent.ACTION);
  console.log("Full event: " + JSON.stringify(infosphereEvent));
  commitCallback(eventCtx); // tell Kafka we've successfully consumed this event
});
```

**Meta**

-   **license**: Apache-2.0

## InfosphereEventEmitter

Connects to Kafka on the specified system and emits any events raised, based on the specified parameter

**Parameters**

-   `zookeeperConnection` **[string](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String)** the hostname of the domain (services) tier of the Information Server environment and port number to connect to Zookeeper service (e.g. hostname:52181)
-   `handlerId` **[string](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String)** a unique identity for the handler (allowing multiple handlers to consume the same events)
-   `bFromBeginning` **[boolean](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Boolean)?** if true, process all events from the beginning of tracking in Information Server
-   `topic` **[string](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String)?** name of the topic for which to emit events (optional, default `'InfosphereEvents'`)

## eventCommitCallback

This callback is invoked as in order to commit that an event was successfully consumed from Kafka

Type: [Function](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/function)

**Parameters**

-   `eventCtx` **[Object](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object)** the context of the Kafka event that was consumed

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