index.js
function subscribe(event, callback) {
	/*jshint validthis: true */
	if (DEBUG_DISPATCHER) log.info('SUBSCRIBE: ' + event);
	if (!event || !callback) {
		return this;
	}
	if (this._callbacks[event]) {
		this._callbacks[event].push(callback);
	}
	else {
		this._callbacks[event] = [ callback ];
	}

	this._client.subscribe(event);

	return this;
}
function subscribe(event, callback) {
	/*jshint validthis: true */
	if (DEBUG_DISPATCHER) log.info('SUBSCRIBE: ' + event);
	if (!event || !callback) {
		return this;
	}
	if (this._callbacks[event]) {
		this._callbacks[event].push(callback);
	}
	else {
		this._callbacks[event] = [ callback ];
	}

	this._client.subscribe(event);

	return this;
}
function subscribe ( event , callback ) { /*jshint validthis: true */ if ( DEBUG_DISPATCHER ) log . info ( 'SUBSCRIBE: ' + event ) ; if ( ! event || ! callback ) { return this ; } if ( this . _callbacks [ event ] ) { this . _callbacks [ event ] . push ( callback ) ; } else { this . _callbacks [ event ] = [ callback ] ; } this . _client . subscribe ( event ) ; return this ; }
Subscribes to a particular event. Anytime this event is published to a dispatcher, on any node in the system, the callback will be
executed shortly thereafter.
@param event A string name for an event, such as "org_14301" to be notified whenever that org is updated.
@param callback A callback to be executed when the event is published.
@returns {*} The context, for fluent calls.
Subscribes to a particular event . Anytime this event is published to a dispatcher on any node in the system the callback will be executed shortly thereafter .