All Projects → FluuxIO → Mqtt

FluuxIO / Mqtt

Licence: bsd-3-clause
Native Go MQTT Library

Programming Languages

go
31211 projects - #10 most used programming language
golang
3204 projects

Labels

Projects that are alternatives of or similar to Mqtt

Ejabberd
Robust, Ubiquitous and Massively Scalable Messaging Platform (XMPP, MQTT, SIP Server)
Stars: ✭ 5,077 (+33746.67%)
Mutual labels:  mqtt, iot
Inchat
一个轻量级、高效率的支持多端(应用与硬件Iot)的可分布式、异步网络应用通讯框架
Stars: ✭ 654 (+4260%)
Mutual labels:  mqtt, iot
Hassio Zigbee2mqtt
Hass.io add-on for zigbee2mqtt
Stars: ✭ 547 (+3546.67%)
Mutual labels:  mqtt, iot
Esp Mqtt
ESP32 mqtt component
Stars: ✭ 403 (+2586.67%)
Mutual labels:  mqtt, iot
Thingsboard Gateway
Open-source IoT Gateway - integrates devices connected to legacy and third-party systems with ThingsBoard IoT Platform using Modbus, CAN bus, BACnet, BLE, OPC-UA, MQTT, ODBC and REST protocols
Stars: ✭ 796 (+5206.67%)
Mutual labels:  mqtt, iot
Redmatic
Node-RED packaged as Addon for the Homematic CCU3 and RaspberryMatic 🤹‍♂️
Stars: ✭ 407 (+2613.33%)
Mutual labels:  mqtt, iot
Convention
🏡 The Homie Convention: a lightweight MQTT convention for the IoT
Stars: ✭ 582 (+3780%)
Mutual labels:  mqtt, iot
Groza
开源物联网平台 - 物联网解决方案的设备管理,数据收集,处理
Stars: ✭ 364 (+2326.67%)
Mutual labels:  mqtt, iot
Sitewhere
SiteWhere is an industrial strength open-source application enablement platform for the Internet of Things (IoT). It provides a multi-tenant microservice-based infrastructure that includes device/asset management, data ingestion, big-data storage, and integration through a modern, scalable architecture. SiteWhere provides REST APIs for all system functionality. SiteWhere provides SDKs for many common device platforms including Android, iOS, Arduino, and any Java-capable platform such as Raspberry Pi rapidly accelerating the speed of innovation.
Stars: ✭ 788 (+5153.33%)
Mutual labels:  mqtt, iot
Volantmq
High-Performance MQTT Server
Stars: ✭ 785 (+5133.33%)
Mutual labels:  mqtt, iot
Hivemq Mqtt Client
HiveMQ MQTT Client is an MQTT 5.0 and MQTT 3.1.1 compatible and feature-rich high-performance Java client library with different API flavours and backpressure support
Stars: ✭ 402 (+2580%)
Mutual labels:  mqtt, iot
Mqttx
MQTT X - Elegant MQTT 5.0 Client Tool of Cross-platform
Stars: ✭ 892 (+5846.67%)
Mutual labels:  mqtt, iot
Jetlinks
JetLinks Core
Stars: ✭ 380 (+2433.33%)
Mutual labels:  mqtt, iot
Dorita980
Unofficial iRobot Roomba and Braava (i7/i7+, 980, 960, 900, e5, 690, 675, m6, etc) node.js library (SDK) to control your robot
Stars: ✭ 523 (+3386.67%)
Mutual labels:  mqtt, iot
Kubeedge
Kubernetes Native Edge Computing Framework (project under CNCF)
Stars: ✭ 4,582 (+30446.67%)
Mutual labels:  mqtt, iot
Hivemq Community Edition
HiveMQ CE is a Java-based open source MQTT broker that fully supports MQTT 3.x and MQTT 5. It is the foundation of the HiveMQ Enterprise Connectivity and Messaging Platform
Stars: ✭ 562 (+3646.67%)
Mutual labels:  mqtt, iot
Freedomotic
Open IoT Framework
Stars: ✭ 354 (+2260%)
Mutual labels:  mqtt, iot
Mqtt Smarthome
Smart home automation with MQTT as the central message bus - Architectural proposal
Stars: ✭ 356 (+2273.33%)
Mutual labels:  mqtt, iot
Arduino Mqtt
MQTT library for Arduino
Stars: ✭ 685 (+4466.67%)
Mutual labels:  mqtt, iot
Paho.mqtt.embedded C
Paho MQTT C client library for embedded systems. Paho is an Eclipse IoT project (https://iot.eclipse.org/)
Stars: ✭ 887 (+5813.33%)
Mutual labels:  mqtt, iot

Native Go MQTT Library

Codeship Status for FluuxIO/mqtt GoDoc GoReportCard codecov

Fluux MQTT is a MQTT v3.1.1 client library written in Go.

The library has been tested with the following MQTT servers:

Features

  • MQTT v3.1.1, QOS 0
  • Client manager to support auto-reconnect with exponential backoff.
  • TLS Support

Short term tasks

Implement support for QOS 1 and 2 (with storage backend interface and default backends).

Running tests

You can launch unit tests with:

go test ./...

Testing with Fluux public MQTT server

We encourage you to experiment and test on a public Fluux test server. It is available on mqtt.fluux.io (on ports 1883 for cleartext and 8883 for TLS).

Here is example code for a simple client:

package main

import (
	"log"
	"time"

	"gosrc.io/mqtt"
)

func main() {
	client := mqtt.NewClient("tls://mqtt.fluux.io:8883")
	client.ClientID = "MQTT-Sub"
	log.Printf("Connecting on: %s\n", client.Address)

	messages := make(chan mqtt.Message)
	client.Messages = messages

	postConnect := func(c *mqtt.Client) {
		log.Println("Connected")
		name := "/mremond/test-topic-1"
		topic := mqtt.Topic{Name: name, QOS: 0}
		c.Subscribe(topic)
	}

	cm := mqtt.NewClientManager(client, postConnect)
	cm.Start()

	for m := range messages {
		log.Printf("Received message from MQTT server on topic %s: %+v\n", m.Topic, m.Payload)
	}
}

Setting Mosquitto on OSX for testing

If you want to test Go MQTT library locally, you can install Mosquitto.

Mosquitto can be installed from homebrew:

brew install mosquitto
...
mosquitto has been installed with a default configuration file.
You can make changes to the configuration by editing:
    /usr/local/etc/mosquitto/mosquitto.conf

To have launchd start mosquitto at login:
  ln -sfv /usr/local/opt/mosquitto/*.plist ~/Library/LaunchAgents
Then to load mosquitto now:
  launchctl load ~/Library/LaunchAgents/homebrew.mxcl.mosquitto.plist
Or, if you don't want/need launchctl, you can just run:
  mosquitto -c /usr/local/etc/mosquitto/mosquitto.conf

Default config file can be customized in /usr/local/etc/mosquitto/mosquitto.conf. However, default config file should be ok for testing

You can launch Mosquitto broker with command:

/usr/local/sbin/mosquitto -c /usr/local/etc/mosquitto/mosquitto.conf

The following command can be use to subscribe a client:

mosquitto_sub -v -t 'test/topic'

You can publish a payload payload on a topic with:

mosquitto_pub -t "test/topic" -m "message payload" -q 1

Setting Mosquitto for testing on Windows 10

After you have install official Mosquitto build from main site, you can run the broker with command:

.\mosquitto.exe -v -c .\mosquitto.conf

You can subscribe with:

.\mosquitto_sub.exe -h 127.0.0.1 -v -t 'test/topic'

You can test publish with:

.\mosquitto_pub.exe -h 127.0.0.1 -t "test/topic" -m "message payload" -q 1
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].