edusperoni / nativescript-mqtt

MQTT 3.1.1 for Nativescript
Apache License 2.0
12 stars 3 forks source link

feat(mqtt): new event onMessageDelivered #6

Closed jmparra closed 5 years ago

jmparra commented 5 years ago

I just added a new event (onMessageDelivered) that is present on the Paho.Client. Now it's possible to publish a message and be notified when the message is successfully delivery to the broker.

example of use:

this.mqtt_client.onMessageDelivered.on((message: Message) => {
    console.log("Message delivered: " + message.payload);
});
edusperoni commented 5 years ago

Thanks for the PR! I'll release it in 1.1.3 shortly.