mqtt-client
Version, currently 0.1.81 version
- 0.1.8latestMar 17, 2022
github.com/cloudamqp/mqtt-client.cr
MQTT client built in Crystal
6 stars
0 dependents
License: MIT
Installation
# Add this to your shard.yml
dependencies:
mqtt-client:
github: cloudamqp/mqtt-client.cr
version: ~> 0.1.8Then run:
shards installshard.yml
- Crystal
1.1.1- License
- MIT
- Authors
- Carl Hörberg <carl@84codes.com>, Jon Börjesson <jon@84codes.com>
Dependencies
This version declares no dependencies.
README
# MQTT-Client
A MQTT client built in Crystal.
## Installation
1. Add the dependency to your `shard.yml`:
```yaml
dependencies:
mqtt-client:
github: 84codes/mqtt-client.cr
```
2. Run `shards install`
## Usage
```crystal
require "mqtt-client"
mqtt = MQTT::Client.new("localhost", 1883)
mqtt.on_message do |msg|
puts "Got a message, on topic #{msg.topic}: #{String.new(msg.body)}"
end
mqtt.subscribe("foo", qos: 1)
mqtt.publish("foo", "bar", qos: 1)
mqtt.close
```
Documentation
Built from the current release. The first visit to a release nobody has asked for starts its build.
Links
This release
- Version
0.1.8- Tagged
- Mar 17, 2022
- Commit
be5eacdaf642- Crystal
1.1.1- Indexed
- yes
Dependents
No indexed shard depends on this one yet.
Repository
github.com/cloudamqp/mqtt-client.cr
Metadata
- Created
- Aug 12, 2026
- Updated
- Aug 14, 2026
- Synced
- Aug 14, 2026
- Versions
- 1