code: function setupMsgStream() {
  	if (!mmrpNode.isClient) {
  		return;
  	}
  
  	logger.verbose('Setting up HTTP message stream communication');
  
  	stream = new MsgStream(cfgMsgStream);
  
  	stream.bindToHttpServer(mage.core.httpServer);
  
  	stream.on('connect', function (address, clusterId, disconnects) {
  		exports.connect(address, clusterId, disconnects);
  	});
  
  	stream.on('disconnect', function (address, clusterId) {
  		exports.disconnect(address, clusterId);
  	});
  
  	stream.on('confirm', function (address, clusterId, msgIds) {
  		exports.confirm(address, clusterId, msgIds);
  	});
  
  	mmrpNode.on('delivery.msgServer.messagepack', function (envelope) {
  		var address = String(envelope.messages[0]);
  
  		if (address && stream) {
  			logger.verbose('Delivering message pack to address', address);
  
  			stream.deliver(address, envelope.messages.slice(1));
  			envelope.consumeRoute();
  		}
  	});
  
  	mmrpNode.on('delivery.msgServer.hostGone', function (envelope) {
  		var address = String(envelope.messages[0]);
  
  		if (address && stream) {
  			logger.verbose('Announcing host disappeared for address', address);
  
  			stream.hostGone(address);
  			envelope.consumeRoute();
  		}
  	});
  
  	mmrpNode.on('delivery.mmrp.sendError', function (envelope) {
  		var originalType = String(envelope.messages[1]);
  		if (['msgServer.connect', 'msgServer.send'].indexOf(originalType) < 0) {
  			return;
  		}
  
  		var address = String(envelope.messages[2]);
  
  		if (address && stream) {
  			logger.verbose('Announcing host disappeared for address', address);
  
  			stream.hostGone(address);
  			envelope.consumeRoute();
  		}
  	});
  }
docs: Message Stream setup -------------------------------------------------------------- 
  Sets up the message stream which connects the message server with client SDKs.