storm-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From David Luu <>
Subject Have a node.js storm bolt, etc. reading storm topology config?
Date Wed, 13 Apr 2016 20:16:17 GMT
I notice the storm.js base classes initialize with some storm config

We have some python bolts that pull storm config info defined in the
topology like this:

class SomeBolt (storm.BasicBolt):

def _configure(self, stormconf):
        self.some_param = stormconf.get('some.param', DEFAULT_VALUE)
def initialize(self, stormconf, context):

How to do the same for node.js? (Asking as I'm so far the lone node.js
storm user at my organization).

I'm thinking something like below, but I could be mistaken. Please
confirm/clarify, thanks.

SomeBolt.prototype = Object.create(BasicBolt.prototype);
SomeBolt.prototype.constructor = SomeBolt;

function SomeBolt(conf) {;
  this.someParam = conf.someParam; //or conf['someParam']

View raw message