https://github.com/matthewdargan/mqtt-clients-showcase
Publish and subscribe on MQTT room sensor data
https://github.com/matthewdargan/mqtt-clients-showcase
go golang mqtt
Last synced: 4 days ago
JSON representation
Publish and subscribe on MQTT room sensor data
- Host: GitHub
- URL: https://github.com/matthewdargan/mqtt-clients-showcase
- Owner: matthewdargan
- License: apache-2.0
- Created: 2023-09-28T18:08:53.000Z (almost 2 years ago)
- Default Branch: main
- Last Pushed: 2023-09-29T04:14:08.000Z (almost 2 years ago)
- Last Synced: 2025-01-29T09:29:08.075Z (6 months ago)
- Topics: go, golang, mqtt
- Language: Go
- Homepage:
- Size: 10.7 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# MQTT Clients Showcase
[](https://github.com/matthewdargan/mqtt-clients-showcase/actions/workflows/go-ci.yml)
[](https://goreportcard.com/report/github.com/matthewdargan/mqtt-clients-showcase)
[](LICENSE)The MQTT Clients Showcase simulates an MQTT publisher and subscriber for room sensor data.
## Installation
In order to use the MQTT Clients Showcase, install [Go](https://go.dev/doc/install) on your operating system.
## Running the MQTT Clients
The showcase includes two main components: `pub` and `sub`, which simulate the MQTT publisher and subscriber services, respectively.
### Running the MQTT Publisher (`pub`)
To run the MQTT publisher, run the following command in the project root directory:
```sh
go run pub/main.go
```### Running the MQTT Subscriber (`sub`)
To run the MQTT subscriber, run the following command in the project root directory:
```sh
go run sub/main.go
```## Testing
To run automated unit and integration tests, use the following command:
```sh
go test ./...
```