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
The return type of a SimpleCallback and OrderedCallback is IO (). These IO actions are subsumed in the IO MQTTClient return type of connectURI. However, the user might want to perform different action depeding on the content of a message, e.g. log messages upon receiving malformed messages.
It would be a major overhaul, but very useful, if net-mqtt provided a mechanism for structured error handling and reporting. For example, the MQTTClient type could expose a TChan that callbacks can write to and ambient applications can read from, so that worker threads and the ambient application can exchange messages in a structured way.
The text was updated successfully, but these errors were encountered:
This sounds like what the mqtt-watch callback does. For each inbound message, the message is sent to a tchan where it can be picked up by a thread that logs the message..
The return type of a
SimpleCallback
andOrderedCallback
isIO ()
. TheseIO
actions are subsumed in theIO MQTTClient
return type ofconnectURI
. However, the user might want to perform different action depeding on the content of a message, e.g. log messages upon receiving malformed messages.It would be a major overhaul, but very useful, if net-mqtt provided a mechanism for structured error handling and reporting. For example, the
MQTTClient
type could expose aTChan
that callbacks can write to and ambient applications can read from, so that worker threads and the ambient application can exchange messages in a structured way.The text was updated successfully, but these errors were encountered: