eclipse / paho.mqtt.javascript

paho.mqtt.javascript
Other
1.14k stars 468 forks source link

Added subscribe/unsunbscribe support for multiple topics #145

Closed svarogg closed 6 years ago

svarogg commented 6 years ago

This pull requests allows to pass an array to subscribe/unsubscribe, to allow subscribing to multiple topics with a single request.

Doesn't break any existing functionality, because subscribe/unsubscribe can still receive a string.

This fixes #18 and #124

jpwsutton commented 6 years ago

Hi @svarogg,

Thank you for the contribution! I've merged it in as well as adding a test case that subscribes and unsubscribes to multiple topics and that all looks good.