dependencies
limit the maximum payload size
debug('constructor()');
for options see: https://github.com/mcollina/aedes#aedesopts
authorizeSubscribe It will be called when a client publishes a message. see: https://github.com/mcollina/aedes#instanceauthorizesubscribeclient-pattern-doneerr-pattern
subscribe -t connect/<device-id>/+
subscribe -t message/<from-client-id>/<to-channel-id>/#
To negate a subscription, set the subscription to null
authorizePublish It will be called when a client publishes a message. see: https://github.com/mcollina/aedes#instanceauthorizesubscribeclient-pattern-doneerr-pattern
publish -t connect/<to-device-id>/<from-client-id>
publish -t message/<from-client-id>/<to-channel-id>
initialize done
for event descriptions see https://github.com/mcollina/aedes#aedesopts
packet.payload.toString()
init mqtt event handlers
app.listen(port, [hostname], [backlog], [callback])
this.httpServer.unref(); Stops the server from accepting new connections and keeps existing connections. This function is asynchronous, the server is finally closed when all connections are ended and the server emits a 'close' event. The optional callback will be called once the 'close' event occurs. Unlike that event, it will be called with an Error as its only argument if the server was not open when it was closed. see: https://nodejs.org/dist/latest-v6.x/docs/api/net.html#net_server_close_callback
MqttReqResBroker