Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/gobackpack/mqtt

Concurrent MQTT publisher and subscriber
https://github.com/gobackpack/mqtt

concurrency golang mqtt

Last synced: 17 days ago
JSON representation

Concurrent MQTT publisher and subscriber

Awesome Lists containing this project

README

        

![alt Go](https://img.shields.io/github/go-mod/go-version/gobackpack/mqtt)

### ENV variables

| ENV | Default value |
|:---------------|:---------------------:|
| MQTT_HOST | localhost |
| MQTT_PORT | 1883 |
| MQTT_USERNAME | guest |
| MQTT_PASSWORD | guest |
| MQTT_CLIENT_ID | uuid.New().String() |

* **Customize config values (*these are defaults*)**
```go
mqttConfig.KeepAlive = time.Second * 15
mqttConfig.CleanSession = true
mqttConfig.AutoReconnect = true
mqttConfig.MsgChanDept = 100
mqttConfig.PubQoS = 0
mqttConfig.SubQoS = 0
```

* [example/main.go](https://github.com/gobackpack/mqtt/blob/main/example/main.go)