1.1.1 • Published 5 years ago
drpcjs v1.1.1
drpcjs
Apache storm DRPC client for Node.js
Install
$ npm i drpcjsUsage
const Drpcjs = require("drpcjs");
const drpc = new Drpcjs(options);options
host: drpc cluster hostnameport: drpc client port, default to 3772timeout: TCP connection timeout time, default to nullkeepAlive: keep connect alive, default to truemaxConnectCounts: the maximum connect counts, if the paramkeepAliveis set true, client will reconnect to storm until the connect counts exceed the maxConnectCounts.
events
errorcloseconnecttimeout
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.