this.client.subscribe(topic, {
onSuccess: this.subscribeSuccess,
onFailure: this.subscribeFailure,
qos: Number(qos)
});
subscribeSuccess(context){
console.info('Successfully subscribed to ' + topic);
}
Something like the following would do it:
var that=this;
this.client.subscribe(topic, {
onSuccess: function() { that.subscribeSuccess(topic) },
onFailure: this.subscribeFailure,
qos: Number(qos)
});
--
To learn more about MQTT please visit http://mqtt.org
---
You received this message because you are subscribed to the Google Groups "MQTT" group.
To unsubscribe from this group and stop receiving emails from it, send an email to mqtt+uns...@googlegroups.com.
To post to this group, send email to mq...@googlegroups.com.
Visit this group at http://groups.google.com/group/mqtt.
For more options, visit https://groups.google.com/d/optout.
(Replying from a moving train on my phone, so take what I posted as a hint rather than something that will definitely work out of he box)