You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Mar 10, 2020. It is now read-only.
I'd like to access the qos and messageId properties of the mqtt message received.
At the moment, publish() just gets the topic and payload.
Adding (or replacing) with the packet is likely to change the API.
I'm happy to do the change but should this be an extra arg but which to choose?
I've been thinking into adding this feature for quite a while. I don't have much time to work on this now, but if you want to submit a PR we can discuss about it.
If It's a big refactoring, though I can provide some guidance.
Moreover, I'm not in favor of specifying the packet, but some options for constructing the packet (e.g. the qos for MQTT), like so:
If you want to take charge of this issue, I think the behavior for this should be putted inside AbstractAscoltatore, in a public publish method that calls a private _publish method that the subclasses implements, which will use 4 parameters.
The only responsibility of the public publish method is to transform a 3-params calls into a 4-params call.
You should also need to pass it to the subscribe callback.
(Remember to check if your code lints, through the make jshint task)
I'd like to access the qos and messageId properties of the mqtt message received.
At the moment, publish() just gets the topic and payload.
Adding (or replacing) with the packet is likely to change the API.
I'm happy to do the change but should this be an extra arg but which to choose?
Now: publish(topic, message, done)
Just pass packet: publish(packet, done)
Add packet: publish(topic, message, packet, done)
Backwards compatible: publish(topic, message, done, packet)
?
The text was updated successfully, but these errors were encountered: