Coder Social home page Coder Social logo

cmgrote / ibm-iis-kafka Goto Github PK

View Code? Open in Web Editor NEW
0.0 2.0 0.0 33 KB

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

Home Page: https://www.npmjs.com/package/ibm-iis-kafka

License: Apache License 2.0

JavaScript 100.00%

ibm-iis-kafka's Introduction

README

ibm-iis-kafka

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

Examples

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 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 a unique identity for the handler (allowing multiple handlers to consume the same events)
  • bFromBeginning boolean? if true, process all events from the beginning of tracking in Information Server
  • topic 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

Parameters

  • eventCtx Object the context of the Kafka event that was consumed

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.