Message Boards Message Boards

Use the Channel framework with an external MQTT broker?

I can connect to an external MQTT broker with the MQTTLink` library.

Here below an example using the Mosquito.org testing service:

Get@"MQTTLink`"

imAclientForExternal = CreateClient[];

ConnectClient[imAclientForExternal, "test.mosquitto.org:1883"];

TopicSubscribe[imAclientForExternal, "wolframTest", 
  "MessageReceivedFunction" :> (Print[
      ByteArrayToString[#3["Data"]]] &)];

TopicPublish[imAclientForExternal, 
  "wolframTest" -> "my personal message"];

TopicUnsubscribe[imAclientForExternal, "wolframTest"]

But since this is not a documented library, I was wondering if it is possible, and how, to do exactly the same with the Channel framework.

POSTED BY: Pedro Fonseca
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard

Group Abstract Group Abstract