JSPM

  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 8
  • Score
    100M100P100Q39403F
  • License MIT

Apache storm DRPC client for Node.js

Package Exports

  • drpcjs

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (drpcjs) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

drpcjs

Apache storm DRPC client for Node.js

build npm license

Install

$ npm i drpcjs

Usage

const Drpcjs = require("drpcjs");
const drpc = new Drpcjs(options);

options

  • host: drpc cluster hostname
  • port: drpc client port, default to 3772
  • timeout: TCP connection timeout time, default to null
  • keepAlive: keep connect alive, default to true
  • maxConnectCounts: the maximum connect counts, if the param keepAlive is set true, client will reconnect to storm until the connect counts exceed the maxConnectCounts.

events

  • error
  • close
  • connect
  • timeout

methods

execute(topologyName, JSON.stringify(args));

Example

const drpcjs = require('drpcjs');
const drpc = new drpcjs({ host: '127.0.0.1' });

drpc.execute('reach', JSON.stringify({ a: 'a', b: 7, c: true }).then(console.log).catch(console.error);

Acknowledgements

Based on node-drpc.