{"id":37097488,"url":"https://github.com/tada/mqtt-nats","last_synced_at":"2026-01-14T11:59:03.532Z","repository":{"id":57524963,"uuid":"252206480","full_name":"tada/mqtt-nats","owner":"tada","description":"The mqtt-nats bridge enables MQTT devices to publish and subscribe to the NATS communication system.","archived":false,"fork":false,"pushed_at":"2020-05-07T11:26:51.000Z","size":8388,"stargazers_count":15,"open_issues_count":1,"forks_count":4,"subscribers_count":4,"default_branch":"master","last_synced_at":"2024-06-20T12:23:34.777Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Go","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/tada.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":"2020-04-01T14:58:13.000Z","updated_at":"2024-05-31T12:08:03.000Z","dependencies_parsed_at":"2022-08-26T03:31:18.632Z","dependency_job_id":null,"html_url":"https://github.com/tada/mqtt-nats","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/tada/mqtt-nats","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tada%2Fmqtt-nats","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tada%2Fmqtt-nats/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tada%2Fmqtt-nats/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tada%2Fmqtt-nats/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/tada","download_url":"https://codeload.github.com/tada/mqtt-nats/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tada%2Fmqtt-nats/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28419272,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-14T10:47:48.104Z","status":"ssl_error","status_checked_at":"2026-01-14T10:46:19.031Z","response_time":107,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6: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":[],"created_at":"2026-01-14T11:59:02.830Z","updated_at":"2026-01-14T11:59:03.520Z","avatar_url":"https://github.com/tada.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"The mqtt-nats bridge enables [MQTT](http://mqtt.org/) devices to publish and subscribe to the [NATS](https://nats.io) communication system.\n\n[![](https://img.shields.io/badge/License-Apache%202.0-blue.svg)](https://opensource.org/licenses/Apache-2.0)\n[![](https://goreportcard.com/badge/github.com/tada/mqtt-nats)](https://goreportcard.com/report/github.com/tada/mqtt-nats)\n[![](https://img.shields.io/badge/godoc-reference-blue.svg)](https://godoc.org/github.com/tada/mqtt-nats)\n[![](https://github.com/tada/mqtt-nats/workflows/MQTT-NATS%20Test/badge.svg)](https://github.com/tada/mqtt-nats/actions)\n[![](https://coveralls.io/repos/github/tada/mqtt-nats/badge.svg?service=github)](https://coveralls.io/github/tada/mqtt-nats)\n\n## Project status\nCurrently under development.\n\n## Getting started\n\n### Obtaining and running the bridge\nYou can install the binary using go get\n```\ngo get github.com/tada/mqtt-nats\n```\nIf you just start using the command `mqtt-nats` it will create an MQTT server on port 1883 that will attempt to connect\nto a NATS server using the default URL \"nats://127.0.0.1:4222\". Use:\n```\nmqtt-nats -help\n```\nto get a list of all configurable options.\n\n### Run the tests\nThe test utilities within this code-base are tagged with the special build tag \"citest\". This flag is required\nfor most of the tests to build and run. I.e. to run all tests, use:\n```\ngo test -tags citest ./...\n```\n\n## Current limitations:\n- Only MQTT 3.1.1 is supported\n- Only QoS levels 0 (at most once) and 1 (at least once)\n- The bridge has no way of knowing when new subscriptions are added in the NATS network and hence, cannot send retained\nmessages in response to such subscriptions.\n\n## Solutions and workarounds\n\n### QoS level 1 is accomplished using the NATS reply-to subject.\nWhen the bridge receives an MQTT publish with QoS = 1 from a client, it forwards that to NATS with a reply-to subject.\nA PUBACK is sent to the MQTT client when the reply arrives. Similarly, if an MQTT client subscribes using desired QoS\n= 1, then a NATS publish with a reply-to will be considered in need of a PUBACK from the MQTT client.\n\n### Retain request from NATS\nAn MQTT client that subscribes to a topic will immediately receive all retained messages for that topic. The same is\nnot true for a NATS client simply because the bridge has no way of knowing when a NATS client subscribes to a topic. To\nmitigate this, the bridge subscribes to a specific \"retained request\" topic (configurable option). A NATS client that\npublishes to this topic with a subscription string as the payload and a reply-to inbox, will get a JSON encoded reply\ncontaining all messages that matches the subcription string.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftada%2Fmqtt-nats","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftada%2Fmqtt-nats","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftada%2Fmqtt-nats/lists"}