{"id":13582509,"url":"https://github.com/fhmq/hmq","last_synced_at":"2025-05-14T04:07:09.591Z","repository":{"id":37412406,"uuid":"101005917","full_name":"fhmq/hmq","owner":"fhmq","description":"High performance mqtt broker","archived":false,"fork":false,"pushed_at":"2025-05-06T01:39:57.000Z","size":38277,"stargazers_count":1349,"open_issues_count":53,"forks_count":278,"subscribers_count":55,"default_branch":"master","last_synced_at":"2025-05-06T02:33:44.283Z","etag":null,"topics":["acl","bridge","broker","cluster","go","golang","iot","kafka","mqtt","performance-mqtt-broker","websocket"],"latest_commit_sha":null,"homepage":"","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/fhmq.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,"zenodo":null}},"created_at":"2017-08-22T01:08:22.000Z","updated_at":"2025-05-06T01:40:00.000Z","dependencies_parsed_at":"2023-11-06T02:26:01.702Z","dependency_job_id":"3be5ca65-d17b-438f-a7a9-5134096a0bfb","html_url":"https://github.com/fhmq/hmq","commit_stats":{"total_commits":220,"total_committers":44,"mean_commits":5.0,"dds":0.6681818181818182,"last_synced_commit":"5d8c4bee668b44beb5e1c340ceb813771e548c4c"},"previous_names":[],"tags_count":15,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fhmq%2Fhmq","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fhmq%2Fhmq/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fhmq%2Fhmq/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fhmq%2Fhmq/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/fhmq","download_url":"https://codeload.github.com/fhmq/hmq/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254067729,"owners_count":22009245,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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":["acl","bridge","broker","cluster","go","golang","iot","kafka","mqtt","performance-mqtt-broker","websocket"],"created_at":"2024-08-01T15:02:46.919Z","updated_at":"2025-05-14T04:07:04.563Z","avatar_url":"https://github.com/fhmq.png","language":"Go","funding_links":[],"categories":["Go","Repositories"],"sub_categories":[],"readme":"\nFree and High Performance MQTT Broker \n============\n\n## About\nGolang MQTT Broker, Version 3.1.1, and Compatible\nfor [eclipse paho client](https://github.com/eclipse?utf8=%E2%9C%93\u0026q=mqtt\u0026type=\u0026language=) and mosquitto-client\n\n## RUNNING\n```bash\n$ go get github.com/fhmq/hmq\n$ cd $GOPATH/github.com/fhmq/hmq\n$ go run main.go\n```\n\n## Usage of hmq:\n~~~\nUsage: hmq [options]\n\nBroker Options:\n    -w,  --worker \u003cnumber\u003e            Worker num to process message, perfer (client num)/10. (default 1024)\n    -p,  --port \u003cport\u003e                Use port for clients (default: 1883)\n         --host \u003chost\u003e                Network host to listen on. (default \"0.0.0.0\")\n    -ws, --wsport \u003cport\u003e              Use port for websocket monitoring\n    -wsp,--wspath \u003cpath\u003e              Use path for websocket monitoring\n    -c,  --config \u003cfile\u003e              Configuration file\n\nLogging Options:\n    -d, --debug \u003cbool\u003e                Enable debugging output (default false)\n    -D                                Debug enabled\n\nCluster Options:\n    -r,  --router  \u003crurl\u003e             Router who maintenance cluster info\n    -cp, --clusterport \u003ccluster-port\u003e Cluster listen port for others\n\nCommon Options:\n    -h, --help                        Show this message\n~~~\n\n### hmq.config\n~~~\n{\n\t\"workerNum\": 4096,\n\t\"port\": \"1883\",\n\t\"host\": \"0.0.0.0\",\n\t\"cluster\": {\n\t\t\"host\": \"0.0.0.0\",\n\t\t\"port\": \"1993\"\n\t},\n\t\"router\": \"127.0.0.1:9888\",\n\t\"wsPort\": \"1888\",\n\t\"wsPath\": \"/ws\",\n\t\"wsTLS\": true,\n\t\"tlsPort\": \"8883\",\n\t\"tlsHost\": \"0.0.0.0\",\n\t\"tlsInfo\": {\n\t\t\"verify\": true,\n\t\t\"caFile\": \"tls/ca/cacert.pem\",\n\t\t\"certFile\": \"tls/server/cert.pem\",\n\t\t\"keyFile\": \"tls/server/key.pem\"\n\t},\n\t\"plugins\": {\n\t\t\"auth\": \"authhttp\",\n\t\t\"bridge\": \"kafka\"\n\t}\n}\n~~~\n\n### Features and Future\n\n* Supports QOS 0 and 1\n\n* Cluster Support\n\n* Containerization\n\n* Supports retained messages\n\n* Supports will messages  \n\n* Websocket Support\n\n* TLS/SSL Support\n\n* Auth Support\n\t* Auth Connect\n\t* Auth ACL\n\t* Cache Support\n\n* Kafka Bridge Support\n\t* Action Deliver\n\t* Regexp Deliver\n\n* HTTP API\n\t* Disconnect Connect (future more)\n\n### Share SUBSCRIBE\n~~~\n| Prefix              | Examples                                  | Publish                      |\n| ------------------- |-------------------------------------------|--------------------------- --|\n| $share/\u003cgroup\u003e/topic  | mosquitto_sub -t ‘$share/\u003cgroup\u003e/topic’ | mosquitto_pub -t ‘topic’     |\n~~~\n\n### Cluster\n```bash\n 1, start router for hmq  (https://github.com/fhmq/router.git)\n \t$ go get github.com/fhmq/router\n \t$ cd $GOPATH/github.com/fhmq/router\n \t$ go run main.go\n 2, config router in hmq.config  (\"router\": \"127.0.0.1:9888\")\n \n```\nOther Version Of Cluster Based On gRPC: [click here](https://github.com/fhmq/rhmq)\n\n### Online/Offline Notification\n```bash\n topic:\n     $SYS/broker/connection/clients/\u003cclientID\u003e\n payload:\n\t{\"clientID\":\"client001\",\"online\":true/false,\"timestamp\":\"2018-10-25T09:32:32Z\"}\n```\n\n## Performance\n\n* High throughput\n\n* High concurrency\n\n* Low memory and CPU\n\n\n## License\n\n* Apache License Version 2.0\n\n\n## Reference\n\n* Surgermq.(https://github.com/zentures/surgemq)\n\n## Benchmark Tool\n\n* https://github.com/inovex/mqtt-stresser\n* https://github.com/krylovsk/mqtt-benchmark\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffhmq%2Fhmq","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffhmq%2Fhmq","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffhmq%2Fhmq/lists"}