{"id":15014323,"url":"https://github.com/thingsboard/tbmq","last_synced_at":"2025-05-15T11:02:53.402Z","repository":{"id":177227438,"uuid":"315620558","full_name":"thingsboard/tbmq","owner":"thingsboard","description":"Open-source, scalable, and fault-tolerant MQTT broker able to handle 4M+ concurrent client connections, supporting at least 3M messages per second throughput per single cluster node with low latency delivery. The cluster mode supports more than 100M concurrently connected clients.","archived":false,"fork":false,"pushed_at":"2025-05-14T14:19:50.000Z","size":19423,"stargazers_count":650,"open_issues_count":7,"forks_count":64,"subscribers_count":15,"default_branch":"main","last_synced_at":"2025-05-15T11:02:22.658Z","etag":null,"topics":["broker","iot","java","kafka","mqtt","mqtt-broker","netty","platform","postgresql","redis","thingsboard"],"latest_commit_sha":null,"homepage":"https://thingsboard.io/products/mqtt-broker/","language":"Java","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/thingsboard.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":"security.md","support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2020-11-24T12:08:48.000Z","updated_at":"2025-05-15T00:48:01.000Z","dependencies_parsed_at":"2023-12-21T13:13:37.022Z","dependency_job_id":"c378a3c9-a03e-483b-9bdd-83839ffab7cb","html_url":"https://github.com/thingsboard/tbmq","commit_stats":{"total_commits":1869,"total_committers":7,"mean_commits":267.0,"dds":0.5446762974852862,"last_synced_commit":"a3ab5929a3749fad1a10904149e7a65bc2807c3a"},"previous_names":["thingsboard/tbmq"],"tags_count":10,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thingsboard%2Ftbmq","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thingsboard%2Ftbmq/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thingsboard%2Ftbmq/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thingsboard%2Ftbmq/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/thingsboard","download_url":"https://codeload.github.com/thingsboard/tbmq/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254328385,"owners_count":22052632,"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":["broker","iot","java","kafka","mqtt","mqtt-broker","netty","platform","postgresql","redis","thingsboard"],"created_at":"2024-09-24T19:45:28.389Z","updated_at":"2025-05-15T11:02:53.395Z","avatar_url":"https://github.com/thingsboard.png","language":"Java","funding_links":[],"categories":["Brokers"],"sub_categories":["Talks"],"readme":"# TBMQ\n\n[![Slack](https://img.shields.io/badge/Slack-TBMQ-1F8B4D?logo=slack)](https://join.slack.com/t/tbmq/shared_invite/zt-31kk3315e-5jtPw8YAKskq1KkUqTrTyQ)\n[![Join the chat at https://gitter.im/tbmq/chat](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/tbmq/chat?utm_source=badge\u0026utm_medium=badge\u0026utm_campaign=pr-badge\u0026utm_content=badge)\n[![TBMQ Builds Server Status](https://img.shields.io/teamcity/build/e/TBMQ_Build?label=TB%20builds%20server\u0026server=https%3A%2F%2Fbuilds.thingsboard.io\u0026logo=data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEAAAABACAYAAACqaXHeAAAACXBIWXMAAALzAAAC8wHS6QoqAAAAGXRFWHRTb2Z0d2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176qxO7hwE3ALq/PfuyVXhdXt4r8+QHyK7K2cXWCMLiTOPqODwTh2IDdD2CP12LwCnUKMankO8kfiAySd2SKgjCEfEEQ+nznsZc7eyLJA9zddPKZIx0c2NcHgMsL5MZhr83XULiTeCSXAEcG2m4PjPCXsEWWBdhbZ/4h6knN4u07Mxv4MbCojtxo7DW6RTRwopMFxt0xeoCJAblLvCDdlWpzRAG42CO2sET2UUfuVbetsYPF9mKq8zwg6Q8lsm7bRJxt8N0cAPdar5FUupYU9X03B2C782wknVUi+0nneacxZk9rXBpGABO8RXA72demJ7fcWyvubIe/TQN2y11MuJ6wA5v3z8HeMbjba+8n5StwJCDb9lYUEI/Fde3mEQ1svnBKRvp32K/LEPYQd1z3XQJfsG3/Sw/gKElLZev8tb8rnizpBEmF1SDZ06ZbJN0saa+kayQtV77qi6QnJF1njFnXdOebAcIXssvQB3yfcGrcCZwEnAfMC8mMKGArNUVT28VubF4/nyZflx8Jr8BVkr4tm83tzn5ek/S8pM2SnpT0gv8H283C/wGTFfhGtexQwQAAAABJRU5ErkJggg==\u0026labelColor=305680)](https://builds.thingsboard.io/viewType.html?buildTypeId=TBMQ_Build\u0026guest=1)\n[![Docker Pulls](https://img.shields.io/docker/pulls/thingsboard/tbmq-node?label=Docker%20Pulls\u0026style=flat\u0026color=4C92F7)](https://hub.docker.com/r/thingsboard/tbmq-node)\n\nTBMQ represents an open-source MQTT message broker with the capacity to handle **4M+** concurrent client\nconnections, supporting a minimum\nof [3M messages per second throughput](https://thingsboard.io/docs/mqtt-broker/reference/3m-throughput-single-node-performance-test/)\nper single cluster node with low latency delivery.\nIn the cluster mode, its capabilities are further enhanced, enabling it to support more than [100M\nconcurrently connected clients](https://thingsboard.io/docs/mqtt-broker/reference/100m-connections-performance-test/).\n\nAt ThingsBoard, we've gained a lot of experience in building scalable IoT applications, which has helped us identify\nthree main scenarios for MQTT-based solutions.\n\n* In the first scenario, numerous devices generate a large volume of messages that are consumed by specific\n  applications, resulting in a **fan-in** pattern.\n  Normally, a few applications are set up to handle these lots of incoming data. It must be ensured that they do not\n  miss any single message.\n\n\u003cp align=\"center\"\u003e\n  \u003cimg src=\"https://github.com/user-attachments/assets/bbc92bcf-c09b-4141-b71d-d5e469ceeec2\" \n       alt=\"Diagram showing fan-in communication pattern\" \n       width=\"600\"\u003e\n\u003c/p\u003e\n\n* The second scenario involves numerous devices subscribing to specific updates or notifications that must be delivered.\n  This leads to a few incoming requests that cause a high volume of outgoing data.\n  This case is known as a **fan-out (broadcast)** pattern.\n\n\u003cp align=\"center\"\u003e\n  \u003cimg src=\"https://github.com/user-attachments/assets/85fe89da-ae81-4bef-8d50-c0c21e60b60f\" \n       alt=\"Diagram showing fan-out communication pattern\" \n       width=\"600\"\u003e\n\u003c/p\u003e\n\n* The third scenario, **point-to-point (P2P)** communication, is a targeted messaging pattern, primarily used for\n  one-to-one communication.\n  Ideal for use cases such as private messaging or command-based interactions where messages are routed between a single\n  publisher and a specific subscriber through uniquely defined topics.\n\n\u003cp align=\"center\"\u003e\n  \u003cimg src=\"https://github.com/user-attachments/assets/88ce216d-891a-4232-9b4a-8590ded2cdfc\" \n       alt=\"Diagram showing p2p communication pattern\" \n       width=\"600\"\n       style=\"margin-left: 10px;\"\u003e\n\u003c/p\u003e\n\n\u003e In all scenarios, persistent clients with a Quality of Service (QoS) level set to 1 or 2 are often utilized to ensure\n\u003e reliable message delivery, even when they're temporarily offline due to restarts or upgrades.\n\nAcknowledging these scenarios, we intentionally designed TBMQ to be exceptionally well-suited for all three.\n\nOur design principles focused on ensuring the broker’s fault tolerance and high availability. Thus, we deliberately\navoided reliance on master or coordinated processes. We ensured the same functionality across all nodes within the\ncluster.\n\nWe prioritized supporting distributed processing, allowing for effortless horizontal scalability as our operations grow.\nWe wanted our broker to support high-throughput and guarantee low-latency delivery of messages to clients. Ensuring data\ndurability and replication was crucial in our design. We aimed for a system where once the broker acknowledges receiving\na message, it remains safe and won’t be lost.\n\nTBMQ provides full compatibility with both MQTT v3.x and v5.0 protocols.\nLast but not least, it had been running in production for more than a year before being open-sourced.\n\n[![TBMQ Home](./img/tbmq-home.png \"TBMQ Home\")](https://thingsboard.io/docs/mqtt-broker/user-guide/ui/monitoring/)\n\n[![TBMQ Sessions](./img/tbmq-sessions.png \"TBMQ Sessions\")](https://thingsboard.io/docs/mqtt-broker/user-guide/ui/sessions/)\n\n## Supported features:\n\n- All MQTT v3.x features\n- All MQTT v5.0 features\n- Multi-node cluster support\n- X.509 certificate chain authentication support\n- Access control (ACL) based on client ID, username, or X.509 certificate chain\n- REST query support for clients’ sessions and subscriptions\n- Rate limits of message processing\n- Cluster and clients' metrics monitoring\n- Unauthorized clients\n- MQTT WebSocket client\n- Integrations with external systems (HTTP, MQTT, Kafka)\n- Kafka topics and consumer groups monitoring\n- Proxy protocol\n\n## Documentation\n\nTBMQ documentation is hosted on [thingsboard.io](https://thingsboard.io/docs/mqtt-broker/).\n\n## Getting Started\n\nConnect clients and Publish your IoT data in minutes by following\nthis [guide](https://thingsboard.io/docs/mqtt-broker/getting-started/).\n\n## Installation\n\nReview different TBMQ installation options by\nfollowing [this link](https://thingsboard.io/docs/mqtt-broker/install/installation-options/).\n\n## Licenses\n\nThis project is released under [Apache 2.0 License](./LICENSE).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fthingsboard%2Ftbmq","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fthingsboard%2Ftbmq","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fthingsboard%2Ftbmq/lists"}