Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/jcosentino11/mqtt-client
A simple MQTT Client, written in C++
https://github.com/jcosentino11/mqtt-client
cpp mqtt-client
Last synced: about 5 hours ago
JSON representation
A simple MQTT Client, written in C++
- Host: GitHub
- URL: https://github.com/jcosentino11/mqtt-client
- Owner: jcosentino11
- License: apache-2.0
- Created: 2024-05-30T06:13:50.000Z (5 months ago)
- Default Branch: main
- Last Pushed: 2024-06-07T18:33:37.000Z (5 months ago)
- Last Synced: 2024-06-08T08:27:29.894Z (5 months ago)
- Topics: cpp, mqtt-client
- Language: C++
- Homepage: https://josephcosentino.me/posts/mqtt-client/
- Size: 53.7 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# MQTT Client
Bare-bones MQTT CLI for Mac and Linux.
This project is a personal learning exercise, for diving into MQTT internals and network programming. You can read more about my experience [on my website](https://josephcosentino.me/posts/mqtt-client/).
## Publish to a topic
```
mqtt pub -t hello/topic -a localhost:1883 -c clientId '{"hello": "world"}'
``````
-c
Usage: mqtt pub [-v] -t -a
Options:
-t, --topic Specify the topic to publish to (required)
-a, --address [:] address to connect to (required)
-c, --client-id Client identifier
-v, --verbose Enable verbose output
-h, --help Show this help message
```## Subscribe to a topic
```
mqtt sub -t hello/topic -a localhost:1883 -c clientId
``````
-c
Usage: mqtt sub [-v] -t -a
Options:
-t, --topic Specify the topic to publish to (required)
-a, --address [:] address to connect to (required)
-c, --client-id Client identifier
-v, --verbose Enable verbose output
-h, --help Show this help message
```## Features
| | Supported | Planned |
|-------------------------|-----------|---------|
| MQTT3 | x | |
| MQTT5 | | x |
| QOS0 | x | |
| QOS1 | x | |
| QOS2 | | x |
| PUBLISH | x | |
| SUBSCRIBE | x | |
| Various CONNECT options | | x |
| SSL | | x |## Related Projects
Here are some real-world MQTT clients to check out:
* [MQTTX](https://mqttx.app/cli)
* [mosquitto_pub/sub](https://mosquitto.org/man/)