MQTT.jl

Julia MQTT umbrella interface. Provides generic structure for MQTT systems to follow to help provide broker agnostic compatibility.
Author JuliaMessaging
Popularity
3 Stars
Updated Last
6 Months Ago
Started In
July 2023

MQTT

Stable Dev Build Status Coverage Code Style: Blue PkgEval ColPrac: Contributor's Guide on Collaborative Practices for Community Packages

This is an interface package for MQTT Messaging. See the documentation for more information.

This is an interface package, it contains no functionality by itself.

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.

Example Useage

AWSCRT.jl

using AWSCRT
using MQTT

mqttconnection = ...

MQTTClient.jl

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)

Contributing

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!

TODO

  • add tests
  • check if other clients can integrate
  • register in Julia General
  • general doctrings for interface functions