AI prompts
base on 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. # TBMQ
[![Join the chat at https://gitter.im/tbmq/chat](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/tbmq/chat?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)
[![TBMQ Builds Server Status](https://img.shields.io/teamcity/build/e/TBMQ_Build?label=TB%20builds%20server&server=https%3A%2F%2Fbuilds.thingsboard.io&logo=data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEAAAABACAYAAACqaXHeAAAACXBIWXMAAALzAAAC8wHS6QoqAAAAGXRFWHRTb2Z0d2FyZQB3d3cuaW5rc2NhcGUub3Jnm+48GgAAB9FJREFUeJzVm3+MXUUVx7+zWwqEtnRLWisQ2lKVUisIQmsqYCohpUhpEGsFKSJJTS0qGiGIISJ/8CNGYzSaEKBQEZUiP7RgVbCVdpE0xYKBWgI2rFLZJZQWtFKobPfjH3Pfdu7s3Pvmzntv3/JNNr3bOXPO+Z6ZO3PumVmjFgEYJWmWpDmSZks6VtIESV3Zv29LWmGMubdVPgw7gEOBJcAaYC/18fd2+zyqngAwXdL7M9keSduMMXgyH5R0laRPSRpbwf62CrLDB8AAS4HnAqP2EvA1YBTwPuBnwP46I70H+DPwALAS+B5wBTCu3VyHIJvG98dMX+B/BW1vAvcAnwdmAp3t5hWFbORXR5AvwmPARcCYdnNJAnCBR+gd7HQ9HZgLfAt4PUB8AzCv3f43DGCTQ6o/RAo43gtCL2Da4W9TAUwEBhxiPymRvcabAR8eTl+biQ7neYokdyTXlvR7xPt9etM8GmZ0FDxL+WD42FdBdkTDJd0jyU1wzi7pd473e0+qA8AM4AbgkrK1BDgOWAc8ChyTaq+eM5ud93ofcHpAZiY2sanhZaDDaTfAZ7HJUmlWCJzm6bqLQM6QBanXkfthcxgPNbTEW9z2AT8AzgTmANdikxwXX/d0XOi0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v4b1iWZ/o3zw5kpaS+SFDGCq8jPguUQ/CmsCZfi403dhwjv/AHAQMAl41mvbGBMEhq4/c1PJTwmQr1f7u97pfzj5EnwUead/KAg/ivD7Zkf+HSBpFwiRfwibI3SXkOj29PgEivAggdU+C8JWR+6+CN9dm1tSyHcBLwbIj87ax1Kcxe0DJmVyY4CdEeR/TXnVeRLwc+C3wHF1fP+Qp/uGlABc6Cl5mPziVi8IzwDfAZ6KIN9LyhQt9v1GT/+sFCXTOVBBXuOTd+TGkp+eqWjKSTBwMPAvR+9TjSibjK35l93mWIxdZFKOxPzFseEgAJd7Olt6v+AC8jdIqwRhLbZM758HRH3tYa/vnoqtKZ4JHIk99tvh6HqNVl3RLSB/JfBEBPnBwxXsJ2uf176qxO7hwE3ALq/PfuyVXhdXt4r8+QHyK7K2cXWCMLiTOPqODwTh2IDdD2CP12LwCnUKMankO8kfiAySd2SKgjCEfEEQ+nznsZc7eyLJA9zddPKZIx0c2NcHgMsL5MZhr83XULiTeCSXAEcG2m4PjPCXsEWWBdhbZ/4h6knN4u07Mxv4MbCojtxo7DW6RTRwopMFxt0xeoCJAblLvCDdlWpzRAG42CO2sET2UUfuVbetsYPF9mKq8zwg6Q8lsm7bRJxt8N0cAPdar5FUupYU9X03B2C782wknVUi+0nneacxZk9rXBpGABO8RXA72demJ7fcWyvubIe/TQN2y11MuJ6wA5v3z8HeMbjba+8n5StwJCDb9lYUEI/Fde3mEQ1svnBKRvp32K/LEPYQd1z3XQJfsG3/Sw/gKElLZev8tb8rnizpBEmF1SDZ06ZbJN0saa+kayQtV77qi6QnJF1njFnXdOebAcIXssvQB3yfcGrcCZwEnAfMC8mMKGArNUVT28VubF4/nyZflx8Jr8BVkr4tm83tzn5ek/S8pM2SnpT0gv8H283C/wGTFfhGtexQwQAAAABJRU5ErkJggg==&labelColor=305680)](https://builds.thingsboard.io/viewType.html?buildTypeId=TBMQ_Build&guest=1)
TBMQ represents an open-source MQTT message broker with the capacity to handle **4M+** concurrent client
connections, supporting a minimum
of [3M messages per second throughput](https://thingsboard.io/docs/mqtt-broker/reference/3m-throughput-single-node-performance-test/)
per single cluster node with low latency delivery.
In the cluster mode, its capabilities are further enhanced, enabling it to support more than [100M
concurrently connected clients](https://thingsboard.io/docs/mqtt-broker/reference/100m-connections-performance-test/).
At ThingsBoard, we've gained a lot of experience in building scalable IoT applications, which has helped us identify
three main scenarios for MQTT-based solutions.
* In the first scenario, numerous devices generate a large volume of messages that are consumed by specific
applications, resulting in a **fan-in** pattern.
Normally, a few applications are set up to handle these lots of incoming data. It must be ensured that they do not
miss any single message.
<p align="center">
<img src="https://github.com/user-attachments/assets/bbc92bcf-c09b-4141-b71d-d5e469ceeec2"
alt="Diagram showing fan-in communication pattern"
width="600">
</p>
* The second scenario involves numerous devices subscribing to specific updates or notifications that must be delivered.
This leads to a few incoming requests that cause a high volume of outgoing data.
This case is known as a **fan-out (broadcast)** pattern.
<p align="center">
<img src="https://github.com/user-attachments/assets/85fe89da-ae81-4bef-8d50-c0c21e60b60f"
alt="Diagram showing fan-out communication pattern"
width="600">
</p>
* The third scenario, **point-to-point (P2P)** communication, is a targeted messaging pattern, primarily used for
one-to-one communication.
Ideal for use cases such as private messaging or command-based interactions where messages are routed between a single
publisher and a specific subscriber through uniquely defined topics.
<p align="center">
<img src="https://github.com/user-attachments/assets/88ce216d-891a-4232-9b4a-8590ded2cdfc"
alt="Diagram showing p2p communication pattern"
width="600"
style="margin-left: 10px;">
</p>
> In all scenarios, persistent clients with a Quality of Service (QoS) level set to 1 or 2 are often utilized to ensure
> reliable message delivery, even when they're temporarily offline due to restarts or upgrades.
Acknowledging these scenarios, we intentionally designed TBMQ to be exceptionally well-suited for all three.
Our design principles focused on ensuring the broker’s fault tolerance and high availability. Thus, we deliberately
avoided reliance on master or coordinated processes. We ensured the same functionality across all nodes within the
cluster.
We prioritized supporting distributed processing, allowing for effortless horizontal scalability as our operations grow.
We wanted our broker to support high-throughput and guarantee low-latency delivery of messages to clients. Ensuring data
durability and replication was crucial in our design. We aimed for a system where once the broker acknowledges receiving
a message, it remains safe and won’t be lost.
TBMQ provides full compatibility with both MQTT v3.x and v5.0 protocols.
Last but not least, it had been running in production for more than a year before being open-sourced.
[![TBMQ Home](./img/tbmq-home.png "TBMQ Home")](https://thingsboard.io/docs/mqtt-broker/user-guide/ui/monitoring/)
[![TBMQ Sessions](./img/tbmq-sessions.png "TBMQ Sessions")](https://thingsboard.io/docs/mqtt-broker/user-guide/ui/sessions/)
## Supported features:
- All MQTT v3.x features
- All MQTT v5.0 features
- Multi-node cluster support
- X.509 certificate chain authentication support
- Access control (ACL) based on client ID, username, or X.509 certificate chain
- REST query support for clients’ sessions and subscriptions
- Rate limits of message processing
- Cluster and clients' metrics monitoring
- Unauthorized clients
- MQTT WebSocket client
- Kafka topics and consumer groups monitoring
## Documentation
TBMQ documentation is hosted on [thingsboard.io](https://thingsboard.io/docs/mqtt-broker/).
## Getting Started
Connect clients and Publish your IoT data in minutes by following
this [guide](https://thingsboard.io/docs/mqtt-broker/getting-started/).
## Installation
Review different TBMQ installation options by
following [this link](https://thingsboard.io/docs/mqtt-broker/install/installation-options/).
## Licenses
This project is released under [Apache 2.0 License](./LICENSE).
", Assign "at most 3 tags" to the expected json: {"id":"6157","tags":[]} "only from the tags list I provide: [{"id":77,"name":"3d"},{"id":89,"name":"agent"},{"id":17,"name":"ai"},{"id":54,"name":"algorithm"},{"id":24,"name":"api"},{"id":44,"name":"authentication"},{"id":3,"name":"aws"},{"id":27,"name":"backend"},{"id":60,"name":"benchmark"},{"id":72,"name":"best-practices"},{"id":39,"name":"bitcoin"},{"id":37,"name":"blockchain"},{"id":1,"name":"blog"},{"id":45,"name":"bundler"},{"id":58,"name":"cache"},{"id":21,"name":"chat"},{"id":49,"name":"cicd"},{"id":4,"name":"cli"},{"id":64,"name":"cloud-native"},{"id":48,"name":"cms"},{"id":61,"name":"compiler"},{"id":68,"name":"containerization"},{"id":92,"name":"crm"},{"id":34,"name":"data"},{"id":47,"name":"database"},{"id":8,"name":"declarative-gui "},{"id":9,"name":"deploy-tool"},{"id":53,"name":"desktop-app"},{"id":6,"name":"dev-exp-lib"},{"id":59,"name":"dev-tool"},{"id":13,"name":"ecommerce"},{"id":26,"name":"editor"},{"id":66,"name":"emulator"},{"id":62,"name":"filesystem"},{"id":80,"name":"finance"},{"id":15,"name":"firmware"},{"id":73,"name":"for-fun"},{"id":2,"name":"framework"},{"id":11,"name":"frontend"},{"id":22,"name":"game"},{"id":81,"name":"game-engine "},{"id":23,"name":"graphql"},{"id":84,"name":"gui"},{"id":91,"name":"http"},{"id":5,"name":"http-client"},{"id":51,"name":"iac"},{"id":30,"name":"ide"},{"id":78,"name":"iot"},{"id":40,"name":"json"},{"id":83,"name":"julian"},{"id":38,"name":"k8s"},{"id":31,"name":"language"},{"id":10,"name":"learning-resource"},{"id":33,"name":"lib"},{"id":41,"name":"linter"},{"id":28,"name":"lms"},{"id":16,"name":"logging"},{"id":76,"name":"low-code"},{"id":90,"name":"message-queue"},{"id":42,"name":"mobile-app"},{"id":18,"name":"monitoring"},{"id":36,"name":"networking"},{"id":7,"name":"node-version"},{"id":55,"name":"nosql"},{"id":57,"name":"observability"},{"id":46,"name":"orm"},{"id":52,"name":"os"},{"id":14,"name":"parser"},{"id":74,"name":"react"},{"id":82,"name":"real-time"},{"id":56,"name":"robot"},{"id":65,"name":"runtime"},{"id":32,"name":"sdk"},{"id":71,"name":"search"},{"id":63,"name":"secrets"},{"id":25,"name":"security"},{"id":85,"name":"server"},{"id":86,"name":"serverless"},{"id":70,"name":"storage"},{"id":75,"name":"system-design"},{"id":79,"name":"terminal"},{"id":29,"name":"testing"},{"id":12,"name":"ui"},{"id":50,"name":"ux"},{"id":88,"name":"video"},{"id":20,"name":"web-app"},{"id":35,"name":"web-server"},{"id":43,"name":"webassembly"},{"id":69,"name":"workflow"},{"id":87,"name":"yaml"}]" returns me the "expected json"