{"id":15817224,"url":"https://github.com/tabilzad/mqtt-kotlin-extensions","last_synced_at":"2026-05-18T17:02:26.567Z","repository":{"id":57734957,"uuid":"492946970","full_name":"tabilzad/mqtt-kotlin-extensions","owner":"tabilzad","description":"Provides Kotlin DSL for MQTT Paho client","archived":false,"fork":false,"pushed_at":"2022-05-17T18:50:23.000Z","size":67,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-07-13T20:50:33.782Z","etag":null,"topics":["dsl","kotlin","mqtt","mqtt-client","paho-mqtt-client"],"latest_commit_sha":null,"homepage":"","language":"Kotlin","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/tabilzad.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2022-05-16T18:05:22.000Z","updated_at":"2022-05-16T22:19:45.000Z","dependencies_parsed_at":"2022-08-28T07:51:22.228Z","dependency_job_id":null,"html_url":"https://github.com/tabilzad/mqtt-kotlin-extensions","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/tabilzad/mqtt-kotlin-extensions","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tabilzad%2Fmqtt-kotlin-extensions","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tabilzad%2Fmqtt-kotlin-extensions/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tabilzad%2Fmqtt-kotlin-extensions/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tabilzad%2Fmqtt-kotlin-extensions/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/tabilzad","download_url":"https://codeload.github.com/tabilzad/mqtt-kotlin-extensions/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tabilzad%2Fmqtt-kotlin-extensions/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":33184769,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-18T09:27:30.708Z","status":"ssl_error","status_checked_at":"2026-05-18T09:27:28.300Z","response_time":71,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["dsl","kotlin","mqtt","mqtt-client","paho-mqtt-client"],"created_at":"2024-10-05T05:22:57.124Z","updated_at":"2026-05-18T17:02:26.516Z","avatar_url":"https://github.com/tabilzad.png","language":"Kotlin","funding_links":[],"categories":[],"sub_categories":[],"readme":"# MQTT Kotlin Extensions\n\n## Import\n```kotlin\nrepositories { \n   mavenCentral()\n}\n\nimplementation 'io.github.tabilzad:mqtt-kotlin-extensions:1.0'\n    \n```\n\n## Connection Extensions\n\n```kotlin\n\nimport java.util.UUIDimport\n\nval client = MqttAsyncClient(\"tcp://mqtt.eclipseprojects.io:1883\", UUID.randomUUID().toString())\n\nclient.orchestrate {\n    onConnectComplete { isReconnect, serverURI -\u003e\n        log.info(\"Connected to $serverURI\")\n    }\n    onMessageArrived { topic, message: MqttMessage -\u003e\n        log.info(\"Message arrived on topic $topic\")\n        log.info(message.toString())\n    }\n    onDeliveryComplete {\n        log.info(\"Message delivery of ${it.messageId} complete\")\n    }\n    onConnectionLost { exception -\u003e\n        log.debug(\"MQTT connection lost due to ${exception?.message}\")\n    }\n    catchError { exception -\u003e\n        log.error(\"Failed to connect to broker due to ${exception?.message}\")\n    }\n}\n```\n\n```kotlin\n  client.connect {\n    onSuccess {\n        log.info(\"MQTT Session started\")\n    }\n    onFailure { _, exception -\u003e\n        log.error(\"Failed to connect due to ${exception.message}\")\n    }\n}\n```\n## Action extensions\n```kotlin\nval topic = \"my_topic\"\nclient.subscribe(topic, 1) {\n    onSuccess {\n        log.info(\"Now subscribed to $topic successfully\")\n    }\n    onFailure { _, t -\u003e\n        log.error(\"Failed to subscribe to $topic due to: ${t?.message}\")\n    }\n}\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftabilzad%2Fmqtt-kotlin-extensions","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftabilzad%2Fmqtt-kotlin-extensions","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftabilzad%2Fmqtt-kotlin-extensions/lists"}