{"id":24854428,"url":"https://github.com/juggernaut/muqtti","last_synced_at":"2026-04-29T08:02:01.258Z","repository":{"id":145803361,"uuid":"232507180","full_name":"juggernaut/muqtti","owner":"juggernaut","description":"Zero-dependency MQTTv5 broker in Java","archived":false,"fork":false,"pushed_at":"2020-10-13T18:42:23.000Z","size":166,"stargazers_count":3,"open_issues_count":1,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-03-26T14:28:34.519Z","etag":null,"topics":["iot","java","java11","mqtt","mqtt-broker"],"latest_commit_sha":null,"homepage":null,"language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/juggernaut.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2020-01-08T07:41:59.000Z","updated_at":"2022-08-02T20:21:31.000Z","dependencies_parsed_at":"2024-03-31T05:46:01.014Z","dependency_job_id":null,"html_url":"https://github.com/juggernaut/muqtti","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/juggernaut/muqtti","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/juggernaut%2Fmuqtti","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/juggernaut%2Fmuqtti/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/juggernaut%2Fmuqtti/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/juggernaut%2Fmuqtti/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/juggernaut","download_url":"https://codeload.github.com/juggernaut/muqtti/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/juggernaut%2Fmuqtti/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32416146,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-29T06:29:02.080Z","status":"ssl_error","status_checked_at":"2026-04-29T06:29:00.631Z","response_time":110,"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":["iot","java","java11","mqtt","mqtt-broker"],"created_at":"2025-01-31T15:37:28.097Z","updated_at":"2026-04-29T08:02:01.241Z","avatar_url":"https://github.com/juggernaut.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"Muqtti\n===\n\nA zero-dependency [MQTT v5.0](https://docs.oasis-open.org/mqtt/mqtt/v5.0/os/mqtt-v5.0-os.html) broker implementation in Java 11.\n\nFeatures\n---\n\n* In-memory storage of QoS 1 messages\n* Certificate-based Mutual TLS\n* Most MQTT v5.0 features like:\n    * Shared subscriptions\n    * Message properties\n    * Flow control\n    * NACK packets\n\nNot Supported\n---\n\n* QoS 2\n* Retained messages\n* AUTH packet\n* Websockets\n\nUse cases\n---\n\n* As a lightweight broker for local development\n* Embedded broker for unit tests (JUnit rule coming soon)\n* Extensible broker for custom authentication schemes\n\n\nGetting Started\n---\n\nYou'll need at least [Java 11](https://openjdk.java.net/projects/jdk/11/) to run Muqtti. The easiest way to get started is to download the [latest release](https://github.com/juggernaut/muqtti/releases/tag/v1.0.0) jar and run it:\n\n```\njava -jar muqtti-1.0.0.jar\n```\n\nMuqtti is a standard maven project, so you can also build from source using:\n```\nmvn -B package\n```\n\nUsage\n---\n\nOnce you have Muqtti running, you can use pub/sub commands bundled with [mosquitto](https://mosquitto.org) as clients to Muqtti.\n\nTo subscribe:\n```\nmosquitto_pub -V 5 -t vehicles/teslas/1 \n```\n\nTo publish:\n```\nmosquitto_pub -V 5 -t vehicles/teslas/1 -m 'wake up'\n```\n\n*NOTE*: You'll need to specify `-V 5` because `mosquitto` tries to connect using MQTT 3.1.1 by default, and Muqtti only supports MQTT v5.0\n\n### Shared subscriptions\n\nAn interesting addition to MQTT v5.0 is the concept of shared subscriptions. With shared subscriptions, you can have multiple clients subscribed\nto the same topic filter and have messages load-balanced among the clients. You can test this feature out by running two separate \n`mosquitto_sub` clients with the command line:\n\n```\nmosquitto_sub -V 5 -t '$share/group1/#'\n```\n\nThen publish messages to any topic - you should see the messages alternate between the clients. You can read more about shared subscriptions in\nthe [spec](https://docs.oasis-open.org/mqtt/mqtt/v5.0/os/mqtt-v5.0-os.html#_Toc3901250)\n\nConfiguration\n---\n\nMuqtti is configured using Java system properties.\n\n### TLS\nTo enable TLS, pass it the following properties:\n\n```\n-Dmuqtti.port=8883 -Dmuqtti.certfile=/path/to/servercert.pem -Dmuqtti.keyfile=/path/to/server.pkcs8.private.key -Dmuqtti.cafile=/path/to/rootcacert.pem\n```\nThese properties are equivalent to the `certfile`, `keyfile` and `cafile` configuration options in [mosquitto](https://mosquitto.org/man/mosquitto-conf-5.html)\n\nNote that only PKCS#8 RSA private keys are supported - if you have keys generated by `openssl` you can converted them to PKCS#8 using:\n\n```\nopenssl pkcs8 -topk8 -nocrypt -in \u003copenssl_generated_key\u003e -out \u003cpkcs8_key\u003e\n```\n\n### Logging\n\nMuqtti uses `java.util.logging` (aka j.u.l) that comes with the JDK. You can specify a custom logging.properties file using:\n\n```\n-Djava.util.logging.config.file=/path/to/custom-logging.properties\n```\n\nA logging configuration file that enables verbose logging is included in the repo as an example (`muqtti-logging-example.properties`)\n\nMotivation\n---\n\nI've written my fair share of networked services professionally. However, all my projects were built on top of open source networking libraries\nlike the excellent [Netty Project](https://netty.io/). My goal was to create a project using only the standard JDK so I could delve into lower\nlevel aspects like protocol encoding/decoding using `ByteBuffer`s and asynchronous I/O using `Selector`s.\n\nIt also demonstrates the power of the Java platform and shows its relevance even when it is losing popularity among the trendier tech demographics. This is not to say that the platform doesn't have its rough edges (hello, `SSLEngine`), but overall, it provides a solid base for  programmers to build software of moderate-to-high complexity without having to tear their hair out. \n\nScale-out MQTT v5.0 broker\n---\n\nIf you're looking for a horizontally scalable, easily deployable (in the cloud or on-prem) MQTT v5.0 broker that plays well with Kubernetes, contact me\nat lokare.ameya@gmail.com\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjuggernaut%2Fmuqtti","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjuggernaut%2Fmuqtti","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjuggernaut%2Fmuqtti/lists"}