A MQTT messaging library for Pharo. It is build on top of MQTT library where you can find more information about MQTT in Pharo.
Evaluate the following code in Playground:
Metacello new
baseline: #MQTTChat;
repository: 'github://JurajKubelka/MQTTChat/repository';
load.
To play with it, you can connect to the IoT Eclipse server. To use a prepared example, execute the following code:
MQTTChat exampleAliceAndPedroIoTEclipse.
“And at any moment Bob can connect to the existing chat.”
MQTTChat exampleBobIOTEclipse.
Similarly, there are examples for a local MQTT server, e.g., mosquitto:
MQTTChat exampleAliceAndPedroLocal.
“And at any moment Bob can connect to the existing chat.”
MQTTChat exampleBobLocal.
The UI is very simple. If you close a window, the chat client is automatically disconnected from the server. The client is automatically reconnected on a network failure. You can open Transcript
in order to see log of network activities.