https://github.com/datenhahn/easymqtt-kotlin
A kotlin paho wrapper with easy to use interface.
https://github.com/datenhahn/easymqtt-kotlin
Last synced: about 1 year ago
JSON representation
A kotlin paho wrapper with easy to use interface.
- Host: GitHub
- URL: https://github.com/datenhahn/easymqtt-kotlin
- Owner: datenhahn
- License: mit
- Created: 2018-03-17T10:24:22.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2018-03-17T11:16:50.000Z (over 8 years ago)
- Last Synced: 2025-02-23T22:28:17.392Z (over 1 year ago)
- Language: Kotlin
- Size: 17.6 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: Readme.md
- License: LICENSE
Awesome Lists containing this project
README
# EasyMqtt

A kotlin paho wrapper with easy to use interface.
[](https://opensource.org/licenses/MIT)
## Add to your project
### Gradle
```
allprojects {
repositories {
...
maven { url 'https://jitpack.io' }
}
}
```
```
dependencies {
compile 'com.github.datenhahn:easymqtt-kotlin:-SNAPSHOT'
}
```
### Maven
```
jitpack.io
https://jitpack.io
```
```
com.github.datenhahn
easymqtt-kotlin
-SNAPSHOT
```
## Example
See also: https://github.com/datenhahn/easymqtt-kotlin-example
```kotlin
package de.datenhahn.easymqtt
import com.github.sylvek.embbededmosquitto.Mosquitto
fun main(args: Array) {
println("Starting example server")
Mosquitto.getInstance().start()
val client = EasyMqtt()
client.subscribe("easymqtt/example", onMessage = { topic, message -> println(topic + " | " + message) })
client.publish("easymqtt/example", "MQTT is easy!")
client.disconnect()
}
```
## Todo
- [ ] add SSL example and tests
- [ ] stabilize API and tag stable version
## Logo
Based on
https://openclipart.org/detail/34159/tango-mail-forward
https://openclipart.org/detail/223782/smile