This is an interface package for MQTT Messaging. See the documentation for more information.
You will need to use a MQTT backend to connect to a broker. This Package is intended to make it easier for developers to integrate with MQTT without locking themselves into the syntax of a specific MQTT Backend.
using AWSCRT
using MQTT
mqttconnection = ...
using MQTTClient
using MQTT
broker = "192.168.1.100" # address to mqtt broker
port = 1883
mqttconnection = MQTT.MQTTConnection(MQTTClient.MakeConnection(broker, port))
connect!(mqttconnection)
subscribe!(mqttconnection, "foo/test", EXACTLY_ONCE) do (topic, payload)
println("MQTT[$topic]: $payload")
end
publish!(mqttconnection, "foo/test", "bar", EXACTLY_ONCE)
unsubscribe!(mqttconnection, "foo/test")
disconnect!(mqttconnection)
If you would like to contribute to the project, please submit a PR. All contributions are welcomed and appreciated.
If there is an MQTT package that you would like to see included please submit an issue. Or even better create the extension for it and submit a PR!
- add tests
- check if other clients can integrate
- register in Julia General
- general doctrings for interface functions