Noiseless Praying Mantis

    ibm-iis-kafka

    0.3.1 • Public • Published

    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

    Install

    npm i ibm-iis-kafka

    DownloadsWeekly Downloads

    0

    Version

    0.3.1

    License

    Apache-2.0

    Unpacked Size

    41.5 kB

    Total Files

    4

    Last publish

    Collaborators

    • cgrote