I use MQTT.js. Is it possible to define a different callback per topic?
For example, I subscribe to topics a, b, and c and create an on message callback per topic like so:
client.on('message', 'a', cb)
client.on('message', 'b', cb)
client.on('message', 'b', cb)
If not, how can I work this around? Any solution is welcome.