diff --git a/_config.yml b/_config.yml index cf04a291d2..b6809723f4 100644 --- a/_config.yml +++ b/_config.yml @@ -100,6 +100,9 @@ release: pe_flutter_app_ver: 1.6.0 ce_dart_client_ver: 4.0.0 pe_dart_client_ver: 4.0.0 + # >>> TBMQ broker_full_ver: 2.2.0 broker_branch: release-2.2.0 + pe_broker_full_ver: 2.2.0PE + # <<< TBMQ trendz_ver: 1.14.0 diff --git a/_data/installation-options/installation-options-mqtt-broker-helm-cluster-upgrading-options.yml b/_data/installation-options/installation-options-mqtt-broker-helm-cluster-upgrading-options.yml index 22283ed3da..3897e3141e 100644 --- a/_data/installation-options/installation-options-mqtt-broker-helm-cluster-upgrading-options.yml +++ b/_data/installation-options/installation-options-mqtt-broker-helm-cluster-upgrading-options.yml @@ -1,7 +1,7 @@ mqttBrokerHelm: 0: title: Minikube - description: This guide will help you to set up TBMQ Cluster using the official Helm chart. Minikube used as the reference environment for the self-hosted kubernetes deployment. + description: This guide will help you set up TBMQ Cluster using the official Helm chart. Minikube is used as the reference environment for the self-hosted Kubernetes deployment. link: /docs/mqtt-broker/install/cluster/helm-cluster-setup-minikube/#upgrading icon: /images/install/cluster/minikube.svg alt: Minikube logo @@ -10,7 +10,7 @@ mqttBrokerHelm: imageHeight: 36 1: title: Amazon EKS - description: This guide will help you to set up TBMQ Cluster using the official Helm chart on AWS using Elastic Kubernetes Service (EKS). + description: This guide will help you set up TBMQ Cluster using the official Helm chart on AWS using Elastic Kubernetes Service (EKS). link: /docs/mqtt-broker/install/cluster/helm-cluster-setup-aws/#upgrading icon: /images/install/cloud/eks.svg alt: Amazon EKS logo @@ -19,7 +19,7 @@ mqttBrokerHelm: imageHeight: 36 2: title: Azure - description: This guide will help you to set up TBMQ Cluster using the official Helm chart on Azure using Azure Kubernetes Service (AKS). + description: This guide will help you set up TBMQ Cluster using the official Helm chart on Azure using Azure Kubernetes Service (AKS). link: /docs/mqtt-broker/install/cluster/helm-cluster-setup-azure/#upgrading icon: /images/install/cloud/azure.svg alt: Microsoft Azure logo @@ -28,10 +28,10 @@ mqttBrokerHelm: imageHeight: 36 3: title: Google Cloud Platform - description: This guide will help you to set up TBMQ Cluster using the official Helm chart on Google Cloud Platform (GCP) using Google Kubernetes Engine (GKE). + description: This guide will help you set up TBMQ Cluster using the official Helm chart on Google Cloud Platform (GCP) using Google Kubernetes Engine (GKE). link: /docs/mqtt-broker/install/cluster/helm-cluster-setup-gcp/#upgrading icon: /images/install/cloud/gcp.svg alt: Google Cloud Platform logo imageTitleAttribute: Deploy TBMQ Cluster using Helm on GKE cluster imageWidth: 40 - imageHeight: 36 \ No newline at end of file + imageHeight: 36 diff --git a/_data/installation-options/installation-options-mqtt-broker-helm.yml b/_data/installation-options/installation-options-mqtt-broker-helm.yml index 222a1d10d5..9321b97281 100644 --- a/_data/installation-options/installation-options-mqtt-broker-helm.yml +++ b/_data/installation-options/installation-options-mqtt-broker-helm.yml @@ -1,7 +1,7 @@ mqttBrokerHelm: 0: title: Minikube - description: This guide will help you to set up TBMQ Cluster using the official Helm chart. Minikube used as the reference environment for the self-hosted kubernetes deployment. + description: This guide will help you set up TBMQ Cluster using the official Helm chart. Minikube is used as the reference environment for the self-hosted Kubernetes deployment. link: /docs/mqtt-broker/install/cluster/helm-cluster-setup-minikube/ icon: /images/install/cluster/minikube.svg alt: Minikube logo @@ -10,7 +10,7 @@ mqttBrokerHelm: imageHeight: 36 1: title: Amazon EKS - description: This guide will help you to set up TBMQ Cluster using the official Helm chart on AWS using Elastic Kubernetes Service (EKS). + description: This guide will help you set up TBMQ Cluster using the official Helm chart on AWS using Elastic Kubernetes Service (EKS). link: /docs/mqtt-broker/install/cluster/helm-cluster-setup-aws/ icon: /images/install/cloud/eks.svg alt: Amazon EKS logo @@ -19,7 +19,7 @@ mqttBrokerHelm: imageHeight: 36 2: title: Azure - description: This guide will help you to set up TBMQ Cluster using the official Helm chart on Azure using Azure Kubernetes Service (AKS). + description: This guide will help you set up TBMQ Cluster using the official Helm chart on Azure using Azure Kubernetes Service (AKS). link: /docs/mqtt-broker/install/cluster/helm-cluster-setup-azure/ icon: /images/install/cloud/azure.svg alt: Microsoft Azure logo @@ -28,10 +28,10 @@ mqttBrokerHelm: imageHeight: 36 3: title: Google Cloud Platform - description: This guide will help you to set up TBMQ Cluster using the official Helm chart on Google Cloud Platform (GCP) using Google Kubernetes Engine (GKE). + description: This guide will help you set up TBMQ Cluster using the official Helm chart on Google Cloud Platform (GCP) using Google Kubernetes Engine (GKE). link: /docs/mqtt-broker/install/cluster/helm-cluster-setup-gcp/ icon: /images/install/cloud/gcp.svg alt: Google Cloud Platform logo imageTitleAttribute: Deploy TBMQ Cluster using Helm on GKE cluster imageWidth: 40 - imageHeight: 36 \ No newline at end of file + imageHeight: 36 diff --git a/_data/installation-options/installation-options-mqtt-broker-upgrade-instructions.yml b/_data/installation-options/installation-options-mqtt-broker-upgrade-instructions.yml index ead73f2aaa..9630f29f40 100644 --- a/_data/installation-options/installation-options-mqtt-broker-upgrade-instructions.yml +++ b/_data/installation-options/installation-options-mqtt-broker-upgrade-instructions.yml @@ -1,7 +1,7 @@ mqttBrokerUpgradeInstructions: 0: title: Docker (Linux or Mac OS) - description: This guide will help you to install and start standalone TBMQ using Docker on Linux or macOS. + description: This guide will help you install and start standalone TBMQ using Docker on Linux or macOS. link: /docs/mqtt-broker/install/docker/#upgrading icon: /images/install/platform/docker-linux-macos.svg alt: Docker logo with Linux and macOS icons @@ -10,7 +10,7 @@ mqttBrokerUpgradeInstructions: imageHeight: 36 1: title: Docker (Windows) - description: This guide will help you to install and start standalone TBMQ using Docker on Windows. + description: This guide will help you install and start standalone TBMQ using Docker on Windows. link: /docs/mqtt-broker/install/docker-windows/#upgrading icon: /images/install/platform/docker-windows.svg alt: Docker logo with Windows icon @@ -19,7 +19,7 @@ mqttBrokerUpgradeInstructions: imageHeight: 36 2: title: Docker Cluster setup - description: This guide will help you to set up TBMQ in cluster mode using Docker Compose. + description: This guide will help you set up TBMQ in cluster mode using Docker Compose. link: /docs/mqtt-broker/install/cluster/docker-compose-setup/#upgrading icon: /images/install/cluster/docker-compose.svg alt: Docker Compose logo @@ -28,7 +28,7 @@ mqttBrokerUpgradeInstructions: imageHeight: 36 3: title: Minikube - description: This guide will help you to set up TBMQ in cluster mode using Minikube. + description: This guide will help you set up TBMQ in cluster mode using Minikube. link: /docs/mqtt-broker/install/cluster/minikube-cluster-setup/#upgrading icon: /images/install/cluster/minikube.svg alt: Minikube logo @@ -37,7 +37,7 @@ mqttBrokerUpgradeInstructions: imageHeight: 36 4: title: Amazon EKS - description: This guide will help you to set up TBMQ in AWS EKS. + description: This guide will help you set up TBMQ in AWS EKS. link: /docs/mqtt-broker/install/cluster/aws-cluster-setup/#upgrading icon: /images/install/cloud/eks.svg alt: Amazon EKS logo @@ -46,7 +46,7 @@ mqttBrokerUpgradeInstructions: imageHeight: 36 5: title: Azure - description: This guide will help you to set up TBMQ in Azure AKS. + description: This guide will help you set up TBMQ in AKS. link: /docs/mqtt-broker/install/cluster/azure-cluster-setup/#upgrading icon: /images/install/cloud/azure.svg alt: Microsoft Azure logo @@ -55,7 +55,7 @@ mqttBrokerUpgradeInstructions: imageHeight: 36 6: title: Google Cloud Platform - description: This guide will help you to setup TBMQ in microservices mode in GKE. + description: This guide will help you set up TBMQ in GKE. link: /docs/mqtt-broker/install/cluster/gcp-cluster-setup/#upgrading icon: /images/install/cloud/gcp.svg alt: Google Cloud Platform logo @@ -64,10 +64,10 @@ mqttBrokerUpgradeInstructions: imageHeight: 36 7: title: Helm - description: Kubernetes environment options for TBMQ cluster setup using Helm + description: Kubernetes environment options for TBMQ cluster setup using Helm. link: /docs/mqtt-broker/install/cluster/helm-cluster-upgrading-options/ icon: /images/install/cluster/helm.svg alt: Helm logo imageTitleAttribute: Cluster setup with Helm Chart imageWidth: 40 - imageHeight: 36 \ No newline at end of file + imageHeight: 36 diff --git a/_data/installation-options/installation-options-mqtt-broker.yml b/_data/installation-options/installation-options-mqtt-broker.yml index a7bc9ad4b7..c50ac2dd95 100644 --- a/_data/installation-options/installation-options-mqtt-broker.yml +++ b/_data/installation-options/installation-options-mqtt-broker.yml @@ -1,7 +1,7 @@ mqttBroker: 0: title: Docker (Linux or Mac OS) - description: This guide will help you to install and start standalone TBMQ using Docker on Linux or macOS. + description: This guide will help you install and start standalone TBMQ using Docker on Linux or macOS. link: /docs/mqtt-broker/install/docker/ icon: /images/install/platform/docker-linux-macos.svg alt: Docker logo with Linux and macOS icons @@ -10,7 +10,7 @@ mqttBroker: imageHeight: 36 1: title: Docker (Windows) - description: This guide will help you to install and start standalone TBMQ using Docker on Windows. + description: This guide will help you install and start standalone TBMQ using Docker on Windows. link: /docs/mqtt-broker/install/docker-windows/ icon: /images/install/platform/docker-windows.svg alt: Docker logo with Windows icon @@ -19,7 +19,7 @@ mqttBroker: imageHeight: 36 2: title: Building from sources - description: This guide will help you to download and build TBMQ from sources. + description: This guide will help you download and build TBMQ from sources. link: /docs/mqtt-broker/install/building-from-source/ icon: /images/install/platform/sources.svg alt: Maven logo @@ -28,7 +28,7 @@ mqttBroker: imageHeight: 36 3: title: Docker Cluster setup - description: This guide will help you to set up TBMQ in cluster mode using Docker Compose. + description: This guide will help you set up TBMQ in cluster mode using Docker Compose. link: /docs/mqtt-broker/install/cluster/docker-compose-setup/ icon: /images/install/cluster/docker-compose.svg alt: Docker Compose logo @@ -37,7 +37,7 @@ mqttBroker: imageHeight: 36 4: title: Minikube - description: This guide will help you to set up TBMQ in cluster mode using Minikube. + description: This guide will help you set up TBMQ in cluster mode using Minikube. link: /docs/mqtt-broker/install/cluster/minikube-cluster-setup/ icon: /images/install/cluster/minikube.svg alt: Minikube logo @@ -46,7 +46,7 @@ mqttBroker: imageHeight: 36 5: title: Amazon EKS - description: This guide will help you to set up TBMQ in AWS EKS. + description: This guide will help you set up TBMQ in AWS EKS. link: /docs/mqtt-broker/install/cluster/aws-cluster-setup/ icon: /images/install/cloud/eks.svg alt: Amazon EKS logo @@ -55,7 +55,7 @@ mqttBroker: imageHeight: 36 6: title: Azure - description: This guide will help you to set up TBMQ in Azure AKS. + description: This guide will help you set up TBMQ in AKS. link: /docs/mqtt-broker/install/cluster/azure-cluster-setup/ icon: /images/install/cloud/azure.svg alt: Microsoft Azure logo @@ -64,7 +64,7 @@ mqttBroker: imageHeight: 36 7: title: Google Cloud Platform - description: This guide will help you to setup TBMQ in microservices mode in GKE. + description: This guide will help you set up TBMQ in GKE. link: /docs/mqtt-broker/install/cluster/gcp-cluster-setup/ icon: /images/install/cloud/gcp.svg alt: Google Cloud Platform logo @@ -73,10 +73,10 @@ mqttBroker: imageHeight: 36 8: title: Helm - description: Kubernetes environment options for TBMQ cluster setup using Helm + description: Kubernetes environment options for TBMQ cluster setup using Helm. link: /docs/mqtt-broker/install/cluster/helm-cluster-setup-options/ icon: /images/install/cluster/helm.svg alt: Helm logo imageTitleAttribute: Cluster setup with Helm Chart imageWidth: 40 - imageHeight: 36 \ No newline at end of file + imageHeight: 36 diff --git a/_data/installation-options/installation-options-pe-mqtt-broker-helm-cluster-upgrading-options.yml b/_data/installation-options/installation-options-pe-mqtt-broker-helm-cluster-upgrading-options.yml new file mode 100644 index 0000000000..2e339a2dbf --- /dev/null +++ b/_data/installation-options/installation-options-pe-mqtt-broker-helm-cluster-upgrading-options.yml @@ -0,0 +1,37 @@ +mqttBrokerHelm: + 0: + title: Minikube + description: This guide will help you set up TBMQ Cluster using the official Helm chart. Minikube is used as the reference environment for the self-hosted Kubernetes deployment. + link: /docs/pe/mqtt-broker/install/cluster/helm-cluster-setup-minikube/#upgrading + icon: /images/install/cluster/minikube.svg + alt: Minikube logo + imageTitleAttribute: Deploy TBMQ Cluster using Helm in Minikube + imageWidth: 36 + imageHeight: 36 + 1: + title: Amazon EKS + description: This guide will help you set up TBMQ Cluster using the official Helm chart on AWS using Elastic Kubernetes Service (EKS). + link: /docs/pe/mqtt-broker/install/cluster/helm-cluster-setup-aws/#upgrading + icon: /images/install/cloud/eks.svg + alt: Amazon EKS logo + imageTitleAttribute: Deploy TBMQ Cluster using Helm on EKS cluster + imageWidth: 32 + imageHeight: 36 + 2: + title: Azure + description: This guide will help you set up TBMQ Cluster using the official Helm chart on Azure using Azure Kubernetes Service (AKS). + link: /docs/pe/mqtt-broker/install/cluster/helm-cluster-setup-azure/#upgrading + icon: /images/install/cloud/azure.svg + alt: Microsoft Azure logo + imageTitleAttribute: Deploy TBMQ Cluster using Helm on AKS cluster + imageWidth: 123 + imageHeight: 36 + 3: + title: Google Cloud Platform + description: This guide will help you set up TBMQ Cluster using the official Helm chart on Google Cloud Platform (GCP) using Google Kubernetes Engine (GKE). + link: /docs/pe/mqtt-broker/install/cluster/helm-cluster-setup-gcp/#upgrading + icon: /images/install/cloud/gcp.svg + alt: Google Cloud Platform logo + imageTitleAttribute: Deploy TBMQ Cluster using Helm on GKE cluster + imageWidth: 40 + imageHeight: 36 diff --git a/_data/installation-options/installation-options-pe-mqtt-broker-helm.yml b/_data/installation-options/installation-options-pe-mqtt-broker-helm.yml new file mode 100644 index 0000000000..aebf8321c6 --- /dev/null +++ b/_data/installation-options/installation-options-pe-mqtt-broker-helm.yml @@ -0,0 +1,37 @@ +mqttBrokerHelm: + 0: + title: Minikube + description: This guide will help you set up TBMQ Cluster using the official Helm chart. Minikube is used as the reference environment for the self-hosted Kubernetes deployment. + link: /docs/pe/mqtt-broker/install/cluster/helm-cluster-setup-minikube/ + icon: /images/install/cluster/minikube.svg + alt: Minikube logo + imageTitleAttribute: Deploy TBMQ Cluster using Helm in Minikube + imageWidth: 36 + imageHeight: 36 + 1: + title: Amazon EKS + description: This guide will help you set up TBMQ Cluster using the official Helm chart on AWS using Elastic Kubernetes Service (EKS). + link: /docs/pe/mqtt-broker/install/cluster/helm-cluster-setup-aws/ + icon: /images/install/cloud/eks.svg + alt: Amazon EKS logo + imageTitleAttribute: Deploy TBMQ Cluster using Helm on EKS cluster + imageWidth: 32 + imageHeight: 36 + 2: + title: Azure + description: This guide will help you set up TBMQ Cluster using the official Helm chart on Azure using Azure Kubernetes Service (AKS). + link: /docs/pe/mqtt-broker/install/cluster/helm-cluster-setup-azure/ + icon: /images/install/cloud/azure.svg + alt: Microsoft Azure logo + imageTitleAttribute: Deploy TBMQ Cluster using Helm on AKS cluster + imageWidth: 123 + imageHeight: 36 + 3: + title: Google Cloud Platform + description: This guide will help you set up TBMQ Cluster using the official Helm chart on Google Cloud Platform (GCP) using Google Kubernetes Engine (GKE). + link: /docs/pe/mqtt-broker/install/cluster/helm-cluster-setup-gcp/ + icon: /images/install/cloud/gcp.svg + alt: Google Cloud Platform logo + imageTitleAttribute: Deploy TBMQ Cluster using Helm on GKE cluster + imageWidth: 40 + imageHeight: 36 diff --git a/_data/installation-options/installation-options-pe-mqtt-broker-upgrade-instructions.yml b/_data/installation-options/installation-options-pe-mqtt-broker-upgrade-instructions.yml new file mode 100644 index 0000000000..8a9ba0df69 --- /dev/null +++ b/_data/installation-options/installation-options-pe-mqtt-broker-upgrade-instructions.yml @@ -0,0 +1,73 @@ +mqttBrokerUpgradeInstructions: + 0: + title: Docker (Linux or Mac OS) + description: This guide will help you install and start standalone TBMQ using Docker on Linux or macOS. + link: /docs/pe/mqtt-broker/install/docker/#upgrading + icon: /images/install/platform/docker-linux-macos.svg + alt: Docker logo with Linux and macOS icons + imageTitleAttribute: Install TBMQ using Docker on Linux or macOS + imageWidth: 170 + imageHeight: 36 + 1: + title: Docker (Windows) + description: This guide will help you install and start standalone TBMQ using Docker on Windows. + link: /docs/pe/mqtt-broker/install/docker-windows/#upgrading + icon: /images/install/platform/docker-windows.svg + alt: Docker logo with Windows icon + imageTitleAttribute: Install TBMQ using Docker on Windows + imageWidth: 96 + imageHeight: 36 + 2: + title: Docker Cluster setup + description: This guide will help you set up TBMQ in cluster mode using Docker Compose. + link: /docs/pe/mqtt-broker/install/cluster/docker-compose-setup/#upgrading + icon: /images/install/cluster/docker-compose.svg + alt: Docker Compose logo + imageTitleAttribute: Set up TBMQ in cluster mode using Docker Compose + imageWidth: 36 + imageHeight: 36 + 3: + title: Minikube + description: This guide will help you set up TBMQ in cluster mode using Minikube. + link: /docs/pe/mqtt-broker/install/cluster/minikube-cluster-setup/#upgrading + icon: /images/install/cluster/minikube.svg + alt: Minikube logo + imageTitleAttribute: Deploy TBMQ cluster using Minikube tool + imageWidth: 36 + imageHeight: 36 + 4: + title: Amazon EKS + description: This guide will help you set up TBMQ in AWS EKS. + link: /docs/pe/mqtt-broker/install/cluster/aws-cluster-setup/#upgrading + icon: /images/install/cloud/eks.svg + alt: Amazon EKS logo + imageTitleAttribute: Deploy TBMQ using Amazon EKS platform + imageWidth: 32 + imageHeight: 36 + 5: + title: Azure + description: This guide will help you set up TBMQ in AKS. + link: /docs/pe/mqtt-broker/install/cluster/azure-cluster-setup/#upgrading + icon: /images/install/cloud/azure.svg + alt: Microsoft Azure logo + imageTitleAttribute: Deploy TBMQ on Microsoft Azure + imageWidth: 123 + imageHeight: 36 + 6: + title: Google Cloud Platform + description: This guide will help you set up TBMQ in GKE. + link: /docs/pe/mqtt-broker/install/cluster/gcp-cluster-setup/#upgrading + icon: /images/install/cloud/gcp.svg + alt: Google Cloud Platform logo + imageTitleAttribute: Deploy TBMQ on Google Cloud infrastructure + imageWidth: 40 + imageHeight: 36 + 7: + title: Helm + description: Kubernetes environment options for TBMQ cluster setup using Helm. + link: /docs/pe/mqtt-broker/install/cluster/helm-cluster-upgrading-options/ + icon: /images/install/cluster/helm.svg + alt: Helm logo + imageTitleAttribute: Cluster setup with Helm Chart + imageWidth: 40 + imageHeight: 36 diff --git a/_data/installation-options/installation-options-pe-mqtt-broker.yml b/_data/installation-options/installation-options-pe-mqtt-broker.yml new file mode 100644 index 0000000000..9a79d1cf92 --- /dev/null +++ b/_data/installation-options/installation-options-pe-mqtt-broker.yml @@ -0,0 +1,73 @@ +mqttBroker: + 0: + title: Docker (Linux or Mac OS) + description: This guide will help you install and start standalone TBMQ using Docker on Linux or macOS. + link: /docs/pe/mqtt-broker/install/docker/ + icon: /images/install/platform/docker-linux-macos.svg + alt: Docker logo with Linux and macOS icons + imageTitleAttribute: Install TBMQ using Docker on Linux or macOS + imageWidth: 170 + imageHeight: 36 + 1: + title: Docker (Windows) + description: This guide will help you install and start standalone TBMQ using Docker on Windows. + link: /docs/pe/mqtt-broker/install/docker-windows/ + icon: /images/install/platform/docker-windows.svg + alt: Docker logo with Windows icon + imageTitleAttribute: Install TBMQ using Docker on Windows + imageWidth: 96 + imageHeight: 36 + 2: + title: Docker Cluster setup + description: This guide will help you set up TBMQ in cluster mode using Docker Compose. + link: /docs/pe/mqtt-broker/install/cluster/docker-compose-setup/ + icon: /images/install/cluster/docker-compose.svg + alt: Docker Compose logo + imageTitleAttribute: Set up TBMQ in cluster mode using Docker Compose + imageWidth: 36 + imageHeight: 36 + 3: + title: Minikube + description: This guide will help you set up TBMQ in cluster mode using Minikube. + link: /docs/pe/mqtt-broker/install/cluster/minikube-cluster-setup/ + icon: /images/install/cluster/minikube.svg + alt: Minikube logo + imageTitleAttribute: Deploy TBMQ cluster using Minikube tool + imageWidth: 36 + imageHeight: 36 + 4: + title: Amazon EKS + description: This guide will help you set up TBMQ in AWS EKS. + link: /docs/pe/mqtt-broker/install/cluster/aws-cluster-setup/ + icon: /images/install/cloud/eks.svg + alt: Amazon EKS logo + imageTitleAttribute: Deploy TBMQ using Amazon EKS platform + imageWidth: 32 + imageHeight: 36 + 5: + title: Azure + description: This guide will help you set up TBMQ in AKS. + link: /docs/pe/mqtt-broker/install/cluster/azure-cluster-setup/ + icon: /images/install/cloud/azure.svg + alt: Microsoft Azure logo + imageTitleAttribute: Deploy TBMQ on Microsoft Azure + imageWidth: 123 + imageHeight: 36 + 6: + title: Google Cloud Platform + description: This guide will help you set up TBMQ in GKE. + link: /docs/pe/mqtt-broker/install/cluster/gcp-cluster-setup/ + icon: /images/install/cloud/gcp.svg + alt: Google Cloud Platform logo + imageTitleAttribute: Deploy TBMQ on Google Cloud infrastructure + imageWidth: 40 + imageHeight: 36 + 7: + title: Helm + description: Kubernetes environment options for TBMQ cluster setup using Helm. + link: /docs/pe/mqtt-broker/install/cluster/helm-cluster-setup-options/ + icon: /images/install/cluster/helm.svg + alt: Helm logo + imageTitleAttribute: Cluster setup with Helm Chart + imageWidth: 40 + imageHeight: 36 diff --git a/_data/mqtt-broker-pe/api.yml b/_data/mqtt-broker-pe/api.yml new file mode 100644 index 0000000000..52954cc3e6 --- /dev/null +++ b/_data/mqtt-broker-pe/api.yml @@ -0,0 +1,15 @@ +bigheader: "TBMQ PE API reference" +abstract: "TBMQ PE Clients connectivity and server-side APIs." +toc: +- title: TBMQ PE API reference + path: /docs/pe/mqtt-broker/api/ +- title: REST APIs + section: + - title: Administration REST API + path: /docs/pe/mqtt-broker/rest-api/ + - title: User Management + path: /docs/pe/mqtt-broker/user-management/ + - title: MQTT Client Credentials Management + path: /docs/pe/mqtt-broker/mqtt-client-credentials-management/ + - title: Application Shared Subscriptions Management + path: /docs/pe/mqtt-broker/application-shared-subscription/ diff --git a/_data/mqtt-broker-pe/docs-home.yml b/_data/mqtt-broker-pe/docs-home.yml new file mode 100644 index 0000000000..c510e6d9ab --- /dev/null +++ b/_data/mqtt-broker-pe/docs-home.yml @@ -0,0 +1,124 @@ +bigheader: "TBMQ Professional Edition Documentation" +abstract: "TBMQ PE" +toc: +- title: TBMQ Professional Edition + path: /docs/pe/mqtt-broker/ +- title: What is TBMQ Professional Edition? + path: /docs/pe/mqtt-broker/getting-started-guides/what-is-thingsboard-mqtt-broker/ +- title: Configuration + section: + - title: TBMQ PE + path: /docs/pe/mqtt-broker/install/config/ + - title: TBMQ PE Integration Executor + path: /docs/pe/mqtt-broker/install/ie-config/ +- title: Security + section: + - title: Overview + path: /docs/pe/mqtt-broker/security/overview/ + - title: MQTT over SSL + path: /docs/pe/mqtt-broker/security/mqtts/ + - title: MQTT Listeners + path: /docs/pe/mqtt-broker/security/listeners/ + - title: Authentication + section: + - title: Basic + path: /docs/pe/mqtt-broker/security/authentication/basic/ + - title: X.509 Certificate Chain + path: /docs/pe/mqtt-broker/security/authentication/x509/ + - title: JWT + new: true + path: /docs/pe/mqtt-broker/security/authentication/jwt/ + - title: SCRAM + path: /docs/pe/mqtt-broker/security/authentication/scram/ + - title: Enable HTTPS + path: /docs/pe/mqtt-broker/security/https/ + - title: OAuth 2.0 + path: /docs/pe/mqtt-broker/security/oauth-2-support/ + - title: Domains + path: /docs/pe/mqtt-broker/security/domains/ + - title: RBAC + path: /docs/pe/mqtt-broker/security/rbac/ +- title: Integration with ThingsBoard + path: /docs/pe/mqtt-broker/user-guide/integrations/how-to-connect-thingsboard-to-tbmq/ +- title: MQTT Features + section: + - title: MQTT protocol + path: /docs/pe/mqtt-broker/user-guide/mqtt-protocol/ + - title: MQTT broker + path: /docs/pe/mqtt-broker/user-guide/mqtt-broker/ + - title: Topics & Wildcards + path: /docs/pe/mqtt-broker/user-guide/topics/ + - title: Quality of Service (QoS) + path: /docs/pe/mqtt-broker/user-guide/qos/ + - title: MQTT over WebSocket + path: /docs/pe/mqtt-broker/user-guide/mqtt-over-ws/ + - title: Shared Subscriptions + path: /docs/pe/mqtt-broker/user-guide/shared-subscriptions/ + - title: Retained Messages + path: /docs/pe/mqtt-broker/user-guide/retained-messages/ + - title: Last Will & Testament + path: /docs/pe/mqtt-broker/user-guide/last-will/ + - title: Keep Alive + path: /docs/pe/mqtt-broker/user-guide/keep-alive/ +- title: Other Features + new: true + section: + - title: TBMQ Client Type + path: /docs/pe/mqtt-broker/user-guide/mqtt-client-type/ + - title: Blocked Clients + path: /docs/pe/mqtt-broker/other/blocked-client/ + - title: Backpressure + path: /docs/pe/mqtt-broker/user-guide/backpressure/ + - title: Msg Delivery Strategies + path: /docs/pe/mqtt-broker/other/msg-delivery-strategy/ + - title: PROXY Protocol + path: /docs/pe/mqtt-broker/other/proxy-protocol/ + - title: Health API + path: /docs/pe/mqtt-broker/other/health/ +- title: Integrations + new: true + section: + - title: Overview + path: /docs/pe/mqtt-broker/integrations/ + - title: HTTP + path: /docs/pe/mqtt-broker/integrations/http/ + - title: MQTT + path: /docs/pe/mqtt-broker/integrations/mqtt/ + - title: Kafka + path: /docs/pe/mqtt-broker/integrations/kafka/ +- title: Administration UI + section: + - title: Monitoring + path: /docs/pe/mqtt-broker/user-guide/ui/monitoring/ + - title: Sessions + path: /docs/pe/mqtt-broker/user-guide/ui/sessions/ + - title: Subscriptions + path: /docs/pe/mqtt-broker/user-guide/ui/subscriptions/ + - title: Unauthorized Clients + path: /docs/pe/mqtt-broker/user-guide/ui/unauthorized-clients/ + - title: MQTT Client Credentials + path: /docs/pe/mqtt-broker/user-guide/ui/mqtt-client-credentials/ + - title: WebSocket Client + path: /docs/pe/mqtt-broker/user-guide/ui/websocket-client/ + - title: Application Shared Subscriptions + path: /docs/pe/mqtt-broker/user-guide/ui/shared-subscriptions/ + - title: Users + path: /docs/pe/mqtt-broker/user-guide/ui/users/ + - title: Settings + path: /docs/pe/mqtt-broker/user-guide/ui/settings/ +- title: White Labeling + section: + - title: Overview + path: /docs/pe/mqtt-broker/white-labeling/ + - title: Image gallery + path: /docs/pe/mqtt-broker/image-gallery/ +- title: Subscriptions + path: /docs/pe/mqtt-broker/subscription/ +- title: Need Help? + path: /docs/pe/mqtt-broker/help/ +- title: Troubleshooting + path: /docs/pe/mqtt-broker/troubleshooting/ +- title: Release Notes + path: /docs/pe/mqtt-broker/releases/ +- title: Roadmap + path: /docs/pe/mqtt-broker/roadmap/ diff --git a/_data/mqtt-broker-pe/faq.yml b/_data/mqtt-broker-pe/faq.yml new file mode 100644 index 0000000000..484ae451b7 --- /dev/null +++ b/_data/mqtt-broker-pe/faq.yml @@ -0,0 +1,6 @@ +bigheader: "Frequently Asked Questions" +abstract: "frequently asked questions" +hidetoc: "true" +toc: +- title: FAQ + path: /docs/pe/mqtt-broker/faq/ diff --git a/_data/mqtt-broker-pe/getting-started.yml b/_data/mqtt-broker-pe/getting-started.yml new file mode 100644 index 0000000000..426459e910 --- /dev/null +++ b/_data/mqtt-broker-pe/getting-started.yml @@ -0,0 +1,6 @@ +bigheader: "Getting Started" +abstract: "Getting Started with PE TBMQ." +hidetoc: "true" +toc: + - title: Getting Started + path: /docs/pe/mqtt-broker/getting-started/ diff --git a/_data/mqtt-broker-pe/globals.yml b/_data/mqtt-broker-pe/globals.yml new file mode 100644 index 0000000000..809efdb91e --- /dev/null +++ b/_data/mqtt-broker-pe/globals.yml @@ -0,0 +1,20 @@ +tocs: + - docs-home + - getting-started + - installation + - reference + - api + - faq +docs-header: + - toc: getting-started + title: Getting Started + - toc: docs-home + title: Documentation + - toc: installation + title: Installation + - toc: reference + title: Architecture + - toc: api + title: API + - toc: faq + title: FAQ diff --git a/_data/mqtt-broker-pe/installation.yml b/_data/mqtt-broker-pe/installation.yml new file mode 100644 index 0000000000..d09cc8daec --- /dev/null +++ b/_data/mqtt-broker-pe/installation.yml @@ -0,0 +1,23 @@ +bigheader: "Installation" +abstract: "Documentation for installation and configuration of TBMQ PE." +toc: + - title: Installation options + path: /docs/pe/mqtt-broker/install/installation-options/ + - title: Docker (Linux or Mac OS) + path: /docs/pe/mqtt-broker/install/docker/ + - title: Docker (Windows) + path: /docs/pe/mqtt-broker/install/docker-windows/ + - title: Cluster using Docker Compose + path: /docs/pe/mqtt-broker/install/cluster/docker-compose-setup/ + - title: Cluster on Minikube (Kubernetes) + path: /docs/pe/mqtt-broker/install/cluster/minikube-cluster-setup/ + - title: Cluster on AWS (Kubernetes) + path: /docs/pe/mqtt-broker/install/cluster/aws-cluster-setup/ + - title: Cluster on Azure (Kubernetes) + path: /docs/pe/mqtt-broker/install/cluster/azure-cluster-setup/ + - title: Cluster on GCP (Kubernetes) + path: /docs/pe/mqtt-broker/install/cluster/gcp-cluster-setup/ + - title: Cluster using Helm + path: /docs/pe/mqtt-broker/install/cluster/helm-cluster-setup-options/ + - title: Upgrade instructions + path: /docs/pe/mqtt-broker/install/upgrade-instructions/ diff --git a/_data/mqtt-broker-pe/reference.yml b/_data/mqtt-broker-pe/reference.yml new file mode 100644 index 0000000000..1f1f54a0fb --- /dev/null +++ b/_data/mqtt-broker-pe/reference.yml @@ -0,0 +1,19 @@ +bigheader: "Architecture" +abstract: "Design docs, deployment scenarios and performance" +toc: +- title: Architecture Overview + path: /docs/pe/mqtt-broker/architecture/ +- title: Architecture Details + section: + - title: "Persistent DEVICE Client" + path: /docs/pe/mqtt-broker/architecture-details/persistent-device-client/ + - title: "Persistent APPLICATION Client" + path: /docs/pe/mqtt-broker/architecture-details/persistent-app-client/ +- title: Performance Tests + section: + - title: "Point-to-point: 1M Msg/sec Throughput" + path: /docs/pe/mqtt-broker/reference/1m-throughput-p2p-performance-test/ + - title: "Fan-out: 3M Msg/sec Throughput" + path: /docs/pe/mqtt-broker/reference/3m-throughput-single-node-performance-test/ + - title: "Fan-in: 100M MQTT Connections" + path: /docs/pe/mqtt-broker/reference/100m-connections-performance-test/ diff --git a/_data/mqtt-broker/docs-home.yml b/_data/mqtt-broker/docs-home.yml index 6b26b00835..10c226691a 100644 --- a/_data/mqtt-broker/docs-home.yml +++ b/_data/mqtt-broker/docs-home.yml @@ -32,6 +32,15 @@ toc: path: /docs/mqtt-broker/security/authentication/scram/ - title: Enable HTTPS path: /docs/mqtt-broker/security/https/ + - title: OAuth 2.0 + pe: true + path: /docs/pe/mqtt-broker/security/oauth-2-support/ + - title: Domains + pe: true + path: /docs/pe/mqtt-broker/security/domains/ + - title: RBAC + pe: true + path: /docs/pe/mqtt-broker/security/rbac/ - title: Integration with ThingsBoard path: /docs/mqtt-broker/user-guide/integrations/how-to-connect-thingsboard-to-tbmq/ - title: MQTT Features @@ -100,6 +109,13 @@ toc: path: /docs/mqtt-broker/user-guide/ui/users/ - title: Settings path: /docs/mqtt-broker/user-guide/ui/settings/ +- title: White Labeling + pe: true + section: + - title: Overview + path: /docs/pe/mqtt-broker/white-labeling/ + - title: Image gallery + path: /docs/pe/mqtt-broker/image-gallery/ - title: Subscriptions path: /docs/mqtt-broker/subscription/ - title: Need Help? diff --git a/_data/mqtt-broker/installation.yml b/_data/mqtt-broker/installation.yml index 5948a788be..7815ef9bbf 100644 --- a/_data/mqtt-broker/installation.yml +++ b/_data/mqtt-broker/installation.yml @@ -3,23 +3,22 @@ abstract: "Documentation for installation and configuration of TBMQ." toc: - title: Installation options path: /docs/mqtt-broker/install/installation-options/ - - title: Installing TBMQ using Docker (Linux or Mac OS) + - title: Docker (Linux or Mac OS) path: /docs/mqtt-broker/install/docker/ - - title: Installing TBMQ using Docker (Windows) + - title: Docker (Windows) path: /docs/mqtt-broker/install/docker-windows/ - - title: Cluster setup with Docker Compose + - title: Cluster using Docker Compose path: /docs/mqtt-broker/install/cluster/docker-compose-setup/ - - title: Cluster setup with Kubernetes on Minikube + - title: Cluster on Minikube (Kubernetes) path: /docs/mqtt-broker/install/cluster/minikube-cluster-setup/ - - title: Cluster setup with Kubernetes on AWS + - title: Cluster on AWS (Kubernetes) path: /docs/mqtt-broker/install/cluster/aws-cluster-setup/ - - title: Cluster setup with Kubernetes on Azure + - title: Cluster on Azure (Kubernetes) path: /docs/mqtt-broker/install/cluster/azure-cluster-setup/ - - title: Cluster setup with Kubernetes on GCP + - title: Cluster on GCP (Kubernetes) path: /docs/mqtt-broker/install/cluster/gcp-cluster-setup/ - - title: Cluster setup with Helm Chart + - title: Cluster using Helm path: /docs/mqtt-broker/install/cluster/helm-cluster-setup-options/ - new: true - title: Building from sources path: /docs/mqtt-broker/install/building-from-source/ - title: Upgrade instructions diff --git a/_data/pages_info.yml b/_data/pages_info.yml index 8e0c056b23..cc51effbfc 100644 --- a/_data/pages_info.yml +++ b/_data/pages_info.yml @@ -3487,6 +3487,260 @@ "/docs/pe/mobile-center/mobile-center/": url: "/docs/pe/mobile-center/mobile-center/" redirect_from: [] +"/docs/pe/mqtt-broker/api/": + url: "/docs/pe/mqtt-broker/api/" + redirect_from: [] +"/docs/pe/mqtt-broker/application-shared-subscription/": + url: "/docs/pe/mqtt-broker/application-shared-subscription/" + redirect_from: [] +"/docs/pe/mqtt-broker/architecture-details/persistent-app-client/": + url: "/docs/pe/mqtt-broker/architecture-details/persistent-app-client/" + redirect_from: [] +"/docs/pe/mqtt-broker/architecture-details/persistent-device-client/": + url: "/docs/pe/mqtt-broker/architecture-details/persistent-device-client/" + redirect_from: [] +"/docs/pe/mqtt-broker/architecture/": + url: "/docs/pe/mqtt-broker/architecture/" + redirect_from: [] +"/docs/pe/mqtt-broker/faq/": + url: "/docs/pe/mqtt-broker/faq/" + redirect_from: [] +"/docs/pe/mqtt-broker/getting-started-guides/what-is-thingsboard-mqtt-broker/": + url: "/docs/pe/mqtt-broker/getting-started-guides/what-is-thingsboard-mqtt-broker/" + redirect_from: [] +"/docs/pe/mqtt-broker/getting-started/": + url: "/docs/pe/mqtt-broker/getting-started/" + redirect_from: [] +"/docs/pe/mqtt-broker/help/": + url: "/docs/pe/mqtt-broker/help/" + redirect_from: [] +"/docs/pe/mqtt-broker/image-gallery/": + url: "/docs/pe/mqtt-broker/image-gallery/" + redirect_from: + - "/docs/mqtt-broker/image-gallery/" +"/docs/pe/mqtt-broker/": + url: "/docs/pe/mqtt-broker/" + redirect_from: [] +"/docs/pe/mqtt-broker/install/cluster/aws-cluster-setup/": + url: "/docs/pe/mqtt-broker/install/cluster/aws-cluster-setup/" + redirect_from: [] +"/docs/pe/mqtt-broker/install/cluster/azure-cluster-setup/": + url: "/docs/pe/mqtt-broker/install/cluster/azure-cluster-setup/" + redirect_from: [] +"/docs/pe/mqtt-broker/install/cluster/docker-compose-setup/": + url: "/docs/pe/mqtt-broker/install/cluster/docker-compose-setup/" + redirect_from: [] +"/docs/pe/mqtt-broker/install/cluster/gcp-cluster-setup/": + url: "/docs/pe/mqtt-broker/install/cluster/gcp-cluster-setup/" + redirect_from: [] +"/docs/pe/mqtt-broker/install/cluster/helm-cluster-setup-aws/": + url: "/docs/pe/mqtt-broker/install/cluster/helm-cluster-setup-aws/" + redirect_from: [] +"/docs/pe/mqtt-broker/install/cluster/helm-cluster-setup-azure/": + url: "/docs/pe/mqtt-broker/install/cluster/helm-cluster-setup-azure/" + redirect_from: [] +"/docs/pe/mqtt-broker/install/cluster/helm-cluster-setup-gcp/": + url: "/docs/pe/mqtt-broker/install/cluster/helm-cluster-setup-gcp/" + redirect_from: [] +"/docs/pe/mqtt-broker/install/cluster/helm-cluster-setup-minikube/": + url: "/docs/pe/mqtt-broker/install/cluster/helm-cluster-setup-minikube/" + redirect_from: [] +"/docs/pe/mqtt-broker/install/cluster/helm-cluster-setup-options/": + url: "/docs/pe/mqtt-broker/install/cluster/helm-cluster-setup-options/" + redirect_from: [] +"/docs/pe/mqtt-broker/install/cluster/helm-cluster-upgrading-options/": + url: "/docs/pe/mqtt-broker/install/cluster/helm-cluster-upgrading-options/" + redirect_from: [] +"/docs/pe/mqtt-broker/install/cluster/minikube-cluster-setup/": + url: "/docs/pe/mqtt-broker/install/cluster/minikube-cluster-setup/" + redirect_from: [] +"/docs/pe/mqtt-broker/install/cluster/resources/upgrade-options/docker-compose-upgrade-tbmq-with-from-version/": + url: "/docs/pe/mqtt-broker/install/cluster/resources/upgrade-options/docker-compose-upgrade-tbmq-with-from-version/" + redirect_from: [] +"/docs/pe/mqtt-broker/install/cluster/resources/upgrade-options/docker-compose-upgrade-tbmq-without-from-version/": + url: "/docs/pe/mqtt-broker/install/cluster/resources/upgrade-options/docker-compose-upgrade-tbmq-without-from-version/" + redirect_from: [] +"/docs/pe/mqtt-broker/install/cluster/resources/upgrade-options/k8s-upgrade-tbmq-with-from-version/": + url: "/docs/pe/mqtt-broker/install/cluster/resources/upgrade-options/k8s-upgrade-tbmq-with-from-version/" + redirect_from: [] +"/docs/pe/mqtt-broker/install/config/": + url: "/docs/pe/mqtt-broker/install/config/" + redirect_from: [] +"/docs/pe/mqtt-broker/install/docker-windows/": + url: "/docs/pe/mqtt-broker/install/docker-windows/" + redirect_from: [] +"/docs/pe/mqtt-broker/install/docker/": + url: "/docs/pe/mqtt-broker/install/docker/" + redirect_from: [] +"/docs/pe/mqtt-broker/install/ie-config/": + url: "/docs/pe/mqtt-broker/install/ie-config/" + redirect_from: [] +"/docs/pe/mqtt-broker/install/installation-options/": + url: "/docs/pe/mqtt-broker/install/installation-options/" + redirect_from: [] +"/docs/pe/mqtt-broker/install/upgrade-instructions/": + url: "/docs/pe/mqtt-broker/install/upgrade-instructions/" + redirect_from: [] +"/docs/pe/mqtt-broker/integrations/http/": + url: "/docs/pe/mqtt-broker/integrations/http/" + redirect_from: [] +"/docs/pe/mqtt-broker/integrations/": + url: "/docs/pe/mqtt-broker/integrations/" + redirect_from: [] +"/docs/pe/mqtt-broker/integrations/kafka/": + url: "/docs/pe/mqtt-broker/integrations/kafka/" + redirect_from: [] +"/docs/pe/mqtt-broker/integrations/mqtt/": + url: "/docs/pe/mqtt-broker/integrations/mqtt/" + redirect_from: [] +"/docs/pe/mqtt-broker/mqtt-client-credentials-management/": + url: "/docs/pe/mqtt-broker/mqtt-client-credentials-management/" + redirect_from: [] +"/docs/pe/mqtt-broker/other/blocked-client/": + url: "/docs/pe/mqtt-broker/other/blocked-client/" + redirect_from: [] +"/docs/pe/mqtt-broker/other/health/": + url: "/docs/pe/mqtt-broker/other/health/" + redirect_from: [] +"/docs/pe/mqtt-broker/other/msg-delivery-strategy/": + url: "/docs/pe/mqtt-broker/other/msg-delivery-strategy/" + redirect_from: [] +"/docs/pe/mqtt-broker/other/proxy-protocol/": + url: "/docs/pe/mqtt-broker/other/proxy-protocol/" + redirect_from: [] +"/docs/pe/mqtt-broker/reference/100m-connections-performance-test/": + url: "/docs/pe/mqtt-broker/reference/100m-connections-performance-test/" + redirect_from: [] +"/docs/pe/mqtt-broker/reference/1m-throughput-p2p-performance-test/": + url: "/docs/pe/mqtt-broker/reference/1m-throughput-p2p-performance-test/" + redirect_from: [] +"/docs/pe/mqtt-broker/reference/3m-throughput-single-node-performance-test/": + url: "/docs/pe/mqtt-broker/reference/3m-throughput-single-node-performance-test/" + redirect_from: [] +"/docs/pe/mqtt-broker/releases/": + url: "/docs/pe/mqtt-broker/releases/" + redirect_from: [] +"/docs/pe/mqtt-broker/rest-api/": + url: "/docs/pe/mqtt-broker/rest-api/" + redirect_from: [] +"/docs/pe/mqtt-broker/roadmap/": + url: "/docs/pe/mqtt-broker/roadmap/" + redirect_from: [] +"/docs/pe/mqtt-broker/search/": + url: "/docs/pe/mqtt-broker/search/" + redirect_from: [] +"/docs/pe/mqtt-broker/security/authentication/basic/": + url: "/docs/pe/mqtt-broker/security/authentication/basic/" + redirect_from: [] +"/docs/pe/mqtt-broker/security/authentication/jwt/": + url: "/docs/pe/mqtt-broker/security/authentication/jwt/" + redirect_from: [] +"/docs/pe/mqtt-broker/security/authentication/scram/": + url: "/docs/pe/mqtt-broker/security/authentication/scram/" + redirect_from: [] +"/docs/pe/mqtt-broker/security/authentication/x509/": + url: "/docs/pe/mqtt-broker/security/authentication/x509/" + redirect_from: [] +"/docs/pe/mqtt-broker/security/domains/": + url: "/docs/pe/mqtt-broker/security/domains/" + redirect_from: [] +"/docs/pe/mqtt-broker/security/https/": + url: "/docs/pe/mqtt-broker/security/https/" + redirect_from: [] +"/docs/pe/mqtt-broker/security/listeners/": + url: "/docs/pe/mqtt-broker/security/listeners/" + redirect_from: [] +"/docs/pe/mqtt-broker/security/mqtts/": + url: "/docs/pe/mqtt-broker/security/mqtts/" + redirect_from: [] +"/docs/pe/mqtt-broker/security/oauth-2-support/": + url: "/docs/pe/mqtt-broker/security/oauth-2-support/" + redirect_from: [] +"/docs/pe/mqtt-broker/security/overview/": + url: "/docs/pe/mqtt-broker/security/overview/" + redirect_from: [] +"/docs/pe/mqtt-broker/security/rbac/": + url: "/docs/pe/mqtt-broker/security/rbac/" + redirect_from: [] +"/docs/pe/mqtt-broker/subscription/": + url: "/docs/pe/mqtt-broker/subscription/" + redirect_from: [] +"/docs/pe/mqtt-broker/troubleshooting/": + url: "/docs/pe/mqtt-broker/troubleshooting/" + redirect_from: [] +"/docs/pe/mqtt-broker/user-guide/backpressure/": + url: "/docs/pe/mqtt-broker/user-guide/backpressure/" + redirect_from: [] +"/docs/pe/mqtt-broker/user-guide/integrations/how-to-connect-thingsboard-to-tbmq/": + url: "/docs/pe/mqtt-broker/user-guide/integrations/how-to-connect-thingsboard-to-tbmq/" + redirect_from: [] +"/docs/pe/mqtt-broker/user-guide/keep-alive/": + url: "/docs/pe/mqtt-broker/user-guide/keep-alive/" + redirect_from: [] +"/docs/pe/mqtt-broker/user-guide/last-will/": + url: "/docs/pe/mqtt-broker/user-guide/last-will/" + redirect_from: [] +"/docs/pe/mqtt-broker/user-guide/mqtt-broker/": + url: "/docs/pe/mqtt-broker/user-guide/mqtt-broker/" + redirect_from: [] +"/docs/pe/mqtt-broker/user-guide/mqtt-client-type/": + url: "/docs/pe/mqtt-broker/user-guide/mqtt-client-type/" + redirect_from: [] +"/docs/pe/mqtt-broker/user-guide/mqtt-over-ws/": + url: "/docs/pe/mqtt-broker/user-guide/mqtt-over-ws/" + redirect_from: [] +"/docs/pe/mqtt-broker/user-guide/mqtt-protocol/": + url: "/docs/pe/mqtt-broker/user-guide/mqtt-protocol/" + redirect_from: [] +"/docs/pe/mqtt-broker/user-guide/qos/": + url: "/docs/pe/mqtt-broker/user-guide/qos/" + redirect_from: [] +"/docs/pe/mqtt-broker/user-guide/retained-messages/": + url: "/docs/pe/mqtt-broker/user-guide/retained-messages/" + redirect_from: [] +"/docs/pe/mqtt-broker/user-guide/shared-subscriptions/": + url: "/docs/pe/mqtt-broker/user-guide/shared-subscriptions/" + redirect_from: [] +"/docs/pe/mqtt-broker/user-guide/topics/": + url: "/docs/pe/mqtt-broker/user-guide/topics/" + redirect_from: [] +"/docs/pe/mqtt-broker/user-guide/ui/mail-server/": + url: "/docs/pe/mqtt-broker/user-guide/ui/mail-server/" + redirect_from: [] +"/docs/pe/mqtt-broker/user-guide/ui/monitoring/": + url: "/docs/pe/mqtt-broker/user-guide/ui/monitoring/" + redirect_from: [] +"/docs/pe/mqtt-broker/user-guide/ui/mqtt-client-credentials/": + url: "/docs/pe/mqtt-broker/user-guide/ui/mqtt-client-credentials/" + redirect_from: [] +"/docs/pe/mqtt-broker/user-guide/ui/sessions/": + url: "/docs/pe/mqtt-broker/user-guide/ui/sessions/" + redirect_from: [] +"/docs/pe/mqtt-broker/user-guide/ui/settings/": + url: "/docs/pe/mqtt-broker/user-guide/ui/settings/" + redirect_from: [] +"/docs/pe/mqtt-broker/user-guide/ui/shared-subscriptions/": + url: "/docs/pe/mqtt-broker/user-guide/ui/shared-subscriptions/" + redirect_from: [] +"/docs/pe/mqtt-broker/user-guide/ui/subscriptions/": + url: "/docs/pe/mqtt-broker/user-guide/ui/subscriptions/" + redirect_from: [] +"/docs/pe/mqtt-broker/user-guide/ui/unauthorized-clients/": + url: "/docs/pe/mqtt-broker/user-guide/ui/unauthorized-clients/" + redirect_from: [] +"/docs/pe/mqtt-broker/user-guide/ui/users/": + url: "/docs/pe/mqtt-broker/user-guide/ui/users/" + redirect_from: [] +"/docs/pe/mqtt-broker/user-guide/ui/websocket-client/": + url: "/docs/pe/mqtt-broker/user-guide/ui/websocket-client/" + redirect_from: [] +"/docs/pe/mqtt-broker/user-management/": + url: "/docs/pe/mqtt-broker/user-management/" + redirect_from: [] +"/docs/pe/mqtt-broker/white-labeling/": + url: "/docs/pe/mqtt-broker/white-labeling/" + redirect_from: + - "/docs/mqtt-broker/white-labeling/" "/docs/pe/reference/coap-api/": url: "/docs/pe/reference/coap-api/" redirect_from: diff --git a/_data/pages_redirect_info.yml b/_data/pages_redirect_info.yml index 626c50572a..69f26d13a0 100644 --- a/_data/pages_redirect_info.yml +++ b/_data/pages_redirect_info.yml @@ -203,6 +203,12 @@ "/docs/pe/user-guide/": url: "/docs/pe/guides/" redirect_from: "/docs/pe/user-guide/" +"/docs/mqtt-broker/image-gallery/": + url: "/docs/pe/mqtt-broker/image-gallery/" + redirect_from: "/docs/mqtt-broker/image-gallery/" +"/docs/mqtt-broker/white-labeling/": + url: "/docs/pe/mqtt-broker/white-labeling/" + redirect_from: "/docs/mqtt-broker/white-labeling/" "/docs/pe/reference/coap-api": url: "/docs/pe/reference/coap-api/" redirect_from: "/docs/pe/reference/coap-api" diff --git a/_data/products.yml b/_data/products.yml index 5b5427127f..b2a8e449f4 100644 --- a/_data/products.yml +++ b/_data/products.yml @@ -85,3 +85,10 @@ path: /docs/mqtt-broker/ docsPrefix: /docs/mqtt-broker/ getStarted: /docs/mqtt-broker/getting-started/ +- title: PE MQTT Broker + fulltitle: PE MQTT Broker + description: PE MQTT Broker Documentation + tag: mqtt-broker-pe + icon: /images/tbmq-icon.svg + path: /docs/pe/mqtt-broker/ + docsPrefix: /docs/pe/mqtt-broker/ diff --git a/_includes/docs/mqtt-broker/api.md b/_includes/docs/mqtt-broker/api.md index 3a8a5deb37..a0c406f971 100644 --- a/_includes/docs/mqtt-broker/api.md +++ b/_includes/docs/mqtt-broker/api.md @@ -8,10 +8,10 @@ MQTT client API can be reviewed with the following pages: Server-side API is available as REST API: -* [**Administration REST API**](/docs/mqtt-broker/rest-api) - The server-side core APIs. -* [**Admin User Management**](/docs/mqtt-broker/user-management/) - The server-side APIs for User management. -* [**MQTT Client Credentials Management**](/docs/mqtt-broker/mqtt-client-credentials-management/) - The server-side APIs for MQTT client credentials management. -* [**Application Shared Subscriptions Management**](/docs/mqtt-broker/application-shared-subscription/) - The server-side APIs for Application Shared Subscriptions management. +* [**Administration REST API**](/docs/{{docsPrefix}}mqtt-broker/rest-api) - The server-side core APIs. +* [**Admin User Management**](/docs/{{docsPrefix}}mqtt-broker/user-management/) - The server-side APIs for User management. +* [**MQTT Client Credentials Management**](/docs/{{docsPrefix}}mqtt-broker/mqtt-client-credentials-management/) - The server-side APIs for MQTT client credentials management. +* [**Application Shared Subscriptions Management**](/docs/{{docsPrefix}}mqtt-broker/application-shared-subscription/) - The server-side APIs for Application Shared Subscriptions management. These APIs offer a comprehensive set of tools and functionalities to manage and interact with TBMQ, empowering users to administer, control, and customize their MQTT-based applications effectively. diff --git a/_includes/docs/mqtt-broker/application-shared-subscription.md b/_includes/docs/mqtt-broker/application-shared-subscription.md index 4f96256be3..3857c0cd8d 100644 --- a/_includes/docs/mqtt-broker/application-shared-subscription.md +++ b/_includes/docs/mqtt-broker/application-shared-subscription.md @@ -2,7 +2,7 @@ * TOC {:toc} -The Application Shared Subscription entity provides the capability to leverage the [Shared Subscriptions](/docs/mqtt-broker/user-guide/shared-subscriptions/) +The Application Shared Subscription entity provides the capability to leverage the [Shared Subscriptions](/docs/{{docsPrefix}}mqtt-broker/user-guide/shared-subscriptions/) feature for **APPLICATION** clients. This feature enables multiple clients to subscribe and receive messages from a shared subscription. Upon creating the Application Shared Subscription entity, a corresponding Kafka topic is automatically created. This Kafka topic serves as a repository for all messages pertaining to the shared subscription. diff --git a/_includes/docs/mqtt-broker/architecture-details/persistent-device-client.md b/_includes/docs/mqtt-broker/architecture-details/persistent-device-client.md new file mode 100644 index 0000000000..671190f9b1 --- /dev/null +++ b/_includes/docs/mqtt-broker/architecture-details/persistent-device-client.md @@ -0,0 +1,317 @@ + +* TOC +{:toc} + +In TBMQ 1.x, persistent DEVICE clients relied on PostgreSQL for message persistence and retrieval, +ensuring that messages were delivered when a client reconnected. +While PostgreSQL performed well initially, it had a fundamental limitation — it could only scale vertically. +We anticipated that as the number of persistent MQTT sessions grew, PostgreSQL’s architecture would eventually become a bottleneck. +To address this, we explored more scalable alternatives capable of handling the increasing demands of our MQTT broker. +Redis was quickly chosen as the best fit due to its horizontal scalability, native clustering support, and widespread adoption. + +## Postgres Usage and Limitations + +To fully understand the reasoning behind this shift, it’s important to first examine how MQTT clients operated within the PostgreSQL architecture. This architecture was built around two key tables. + +The `device_session_ctx` table was responsible for maintaining the session state of each persistent MQTT client: + +```postgresql + Table "public.device_session_ctx" + Column | Type | Collation | Nullable | Default +--------------------+------------------------+-----------+----------+--------- + client_id | character varying(255) | | not null | + last_updated_time | bigint | | not null | + last_serial_number | bigint | | | + last_packet_id | integer | | | +Indexes: + "device_session_ctx_pkey" PRIMARY KEY, btree (client_id) +``` + +The key columns are `last_packet_id` and `last_serial_number`, which is used to maintain message order for persistent MQTT clients: + +- `last_packet_id` represents the packet ID of the last MQTT message received. +- `last_serial_number` acts as a continuously increasing counter, preventing message order issues when the MQTT packet ID wraps around after reaching its limit of `65535`. + +The `device_publish_msg` table was responsible for storing messages that must be published to persistent MQTT clients (subscribers). + +```postgresql + Table "public.device_publish_msg" + Column | Type | Collation | Nullable | Default +--------------------------+------------------------+-----------+----------+--------- + client_id | character varying(255) | | not null | + serial_number | bigint | | not null | + topic | character varying | | not null | + time | bigint | | not null | + packet_id | integer | | | + packet_type | character varying(255) | | | + qos | integer | | not null | + payload | bytea | | not null | + user_properties | character varying | | | + retain | boolean | | | + msg_expiry_interval | integer | | | + payload_format_indicator | integer | | | + content_type | character varying(255) | | | + response_topic | character varying(255) | | | + correlation_data | bytea | | | +Indexes: + "device_publish_msg_pkey" PRIMARY KEY, btree (client_id, serial_number) + "idx_device_publish_msg_packet_id" btree (client_id, packet_id) +``` + +The key columns to highlight: + +- `time` – captures the system time (timestamp) when the message is stored. This field is used for periodic cleanup of expired messages. +- `msg_expiry_interval` – represents the expiration time (in seconds) for a message. + This is set only for incoming MQTT 5.0 messages that include an expiry property. + If the expiry property is absent, the message does not have a specific expiration time and remains valid until it is removed by time or size-based cleanup. + +Together, these tables managed message persistence and session state. +The `device_session_ctx` table was designed for fast retrieval of the last MQTT packet ID and serial number stored for each persistent MQTT client. +When messages for a client are received from a shared Kafka topic, the broker queries this table to fetch the latest values. +These values are incremented sequentially and assigned to each message before being saved to the `device_publish_msg` table. + +While this design ensured reliable message delivery, it also introduced performance constraints. +Based on the TimescaleDB blog [post](https://www.timescale.com/blog/postgresql-timescaledb-1000x-faster-queries-90-data-compression-and-much-more#ingest-performance) +vanilla PostgreSQL can handle up to 300k inserts per second under ideal conditions. +However, this performance depends on factors such as hardware, workload, and table schema. +While vertical scaling can provide some improvement, PostgreSQL’s per-table insert throughput eventually reaches a hard limit. + +## Redis as a Scalable Alternative + +Our decision to migrate to Redis was driven by its ability to address the core performance bottlenecks encountered with PostgreSQL. +Unlike PostgreSQL, which relies on disk-based storage and vertical scaling, Redis operates primarily in memory, significantly reducing read and write latency. +Additionally, Redis’s distributed architecture allows TBMQ to scale horizontally, keeping the retrieval and delivery of persistent messages efficient even as the number of client sessions and stored messages grows. + +With these benefits in mind, we started our migration process with an evaluation of data structures that could preserve the functionality of the PostgreSQL approach +while aligning with Redis Cluster constraints to enable efficient horizontal scaling. +This also presented an opportunity to improve certain aspects of the original design, such as periodic cleanups, by leveraging Redis features like built-in expiration mechanisms. + +### Redis Cluster Constraints + +When migrating from PostgreSQL to Redis, we recognized that replicating the existing data model would require multiple Redis data structures to efficiently handle message persistence and ordering. +This, in turn, meant using multiple keys for each persistent MQTT Client session. + +{% include images-gallery.html imageCollection="redis-cluster-constraints" %} + +Redis Cluster distributes data across multiple slots to enable horizontal scaling. +However, multi-key operations must access keys within the same slot. +If the keys reside in different slots, the operation triggers a cross-slot error, preventing the command from executing. +We used the persistent MQTT client ID as a [hash tag](https://redis.io/docs/latest/operate/oss_and_stack/reference/cluster-spec/#hash-tags) in our key names to address this. +By enclosing the client ID in curly braces `{}`, Redis ensures that all keys for the same client are hashed to the same slot. +This guarantees that related data for each client stays together, allowing multi-key operations to proceed without errors. + +### Atomic Operations via Lua Scripts + +Consistency is critical in a high-throughput environment like TBMQ, where many messages can arrive simultaneously for the same MQTT client. +Hashtagging helps to avoid cross-slot errors, but without atomic operations, there is a risk of race conditions or partial updates. +This could lead to message loss or incorrect ordering. It is important to make sure that operations updating the keys for the same MQTT client are atomic. + +Redis is designed to execute individual commands atomically. +However, in our case, we need to update multiple data structures as part of a single operation for each MQTT client. +Executing these sequentially without atomicity opens the door to inconsistencies if another process modifies the same data in between commands. +That’s where [Lua scripting](https://redis.io/docs/latest/develop/interact/programmability/eval-intro/) comes in. Lua script executes as a single, isolated unit. +During script execution, no other commands can run concurrently, ensuring that the operations inside the script happen atomically. + +Based on this information, we decided that for any operation, such as saving messages or retrieving undelivered messages upon reconnection, we will execute a separate Lua script. +This ensures that all operations within a single Lua script reside in the same hash slot, maintaining atomicity and consistency. + +### Redis Data Structures + +One of the key requirements of the migration was maintaining message order, a task previously handled by the `serial_number` column in PostgreSQL’s `device_publish_msg` table. +After evaluating various Redis data structures, we determined that [sorted sets](https://redis.io/docs/latest/develop/data-types/sorted-sets/) (ZSETs) were the ideal replacement. + +Redis sorted sets naturally organize data by score, enabling quick retrieval of messages in ascending or descending order. +While sorted sets provided an efficient way to maintain message order, storing full message payloads directly in sorted sets led to excessive memory usage. +Redis does not support per-member TTL within sorted sets. As a result, messages persisted indefinitely unless explicitly removed. +Similar to PostgreSQL, we had to perform periodic cleanups using `ZREMRANGEBYSCORE` to delete expired messages. +This operation carries a complexity of `O(log N + M)`, where `M` is the number of elements removed. +To overcome this limitation, we decided to store message payloads using strings data structure while storing in the sorted set references to these keys. + +{% include images-gallery.html imageCollection="redis-data-structures" %} + +In the image above, you can see that each key follows the pattern `{client_id}_messages`, +where `client_id` is a placeholder for the actual client ID, +while the curly braces `{}` around it are added to create a hashtag. +Also, you may notice that the score continues to grow even when the MQTT packet ID wraps around. + +Let’s take a closer look at the details illustrated in this image. +At first, the reference for the message with the MQTT packet ID equal to `65534` was added to the sorted set: + +```bash +ZADD {client_id}_messages 65534 {client_id}_messages_65534 +``` +{: .copy-code} + +Here, `{client_id}_messages` is the sorted set key name, where `{client_id}` acts as a hashtag derived from the persistent MQTT client’s unique ID. +The suffix `_messages` is a constant added to each sorted set key name for consistency. +Following the sorted set key name, the score value `65534` corresponds to the MQTT packet ID of the message received by the client. +Finally, we see the reference key that points to the actual payload of the MQTT message. +Similar to the sorted set key, the message reference key uses the MQTT client’s ID as a hashtag, followed by the `_messages` suffix and the MQTT packet ID value. + +In the next iteration, we add the message reference for the MQTT message with a packet ID equal to `65535` into the sorted set. This is the maximum packet ID, as the range is limited to `65535`. + +```bash +ZADD {client_id}_messages 65535 {client_id}_messages_65535 +``` +{: .copy-code} + +So at the next iteration MQTT packet ID should be equal to `1`, while the score should continue to grow and be equal to `65536`. + +```bash +ZADD {client_id}_messages 65536 {client_id}_messages_1 +``` +{: .copy-code} + +This approach ensures that the message’s references will be properly ordered in the sorted set regardless of the packet ID’s limited range. + +Message payloads are stored as string values with `SET` commands that support expiration `(EX)`, providing `O(1)` complexity for writes and `TTL` applications: + +```bash +SET {client_id}_messages_1 "{ + \"packetType\":\"PUBLISH\", + \"payload\":\"eyJkYXRhIjoidGJtcWlzYXdlc29tZSJ9\", + \"time\":1736333110026, + \"clientId\":\"client\", + \"retained\":false, + \"packetId\":1, + \"topicName\":\"europe/ua/kyiv/client/0\", + \"qos\":1 +}" EX 600 +``` +{: .copy-code} + +Another benefit aside from efficient updates and `TTL` applications is that the message payloads can be retrieved: + +```bash +GET {client_id}_messages_1 +``` +{: .copy-code} + +or removed: + +```bash +DEL {client_id}_messages_1 +``` +{: .copy-code} + +with constant complexity `O(1)` without affecting the sorted set structure. + +Another very important element of our Redis architecture is the use of a string key to store the last MQTT packet ID processed: + +```bash +GET {client_id}_last_packet_id +"1" +``` +{: .copy-code} + +This approach serves the same purpose as in the PostgreSQL solution. +When a client reconnects, the server must determine the correct packet ID to assign to the next message that will be saved in Redis. +Initially, we considered using the sorted set’s highest score as a reference. +However, since there are scenarios where the sorted set could be empty or completely removed, +we concluded that the most reliable solution is to store the last packet ID separately. + +### Managing Sorted Set Size Dynamically + +This hybrid approach, leveraging sorted sets and string data structures, eliminates the need for periodic cleanups based on time, as per-message TTLs are now applied. +In addition, following the PostgreSQL design we needed to address somehow the cleanup of the sorted set based on the messages limit set in the configuration. + +```yaml +# Maximum number of PUBLISH messages stored for each persisted DEVICE client +limit: "${MQTT_PERSISTENT_SESSION_DEVICE_PERSISTED_MESSAGES_LIMIT:10000}" +``` +{: .copy-code} + +This limit is an important part of our design, allowing us to control and predict the memory allocation required for each persistent MQTT client. +For example, a client might connect, triggering the registration of a persistent session, and then rapidly disconnect. +In such scenarios, it is essential to ensure that the number of messages stored for the client (while waiting for a potential reconnection) remains within the defined limit, preventing unbounded memory usage. + +```java +if (messagesLimit > 0xffff) { + throw new IllegalArgumentException("Persisted messages limit can't be greater than 65535!"); +} +``` +{: .copy-code} + +To reflect the natural constraints of the MQTT protocol, the maximum number of persisted messages for individual clients is set to `65535`. + +To handle this within the Redis solution, we implemented dynamic management of the sorted set’s size. +When new messages are added, the sorted set is trimmed to ensure the total number of messages remains within the desired limit, and the associated strings are also cleaned up to free up memory. + +```lua +-- Get the number of elements to be removed +local numElementsToRemove = redis.call('ZCARD', messagesKey) - maxMessagesSize +-- Check if trimming is needed +if numElementsToRemove > 0 then + -- Get the elements to be removed (oldest ones) + local trimmedElements = redis.call('ZRANGE', messagesKey, 0, numElementsToRemove - 1) + -- Iterate over the elements and remove them + for _, key in ipairs(trimmedElements) do + -- Remove the message from the string data structure + redis.call('DEL', key) + -- Remove the message reference from the sorted set + redis.call('ZREM', messagesKey, key) + end +end +``` +{: .copy-code} + +### Message Retrieval and Cleanup + +Our design not only ensures dynamic size management during the persistence of new messages but also supports cleanup during message retrieval, +which occurs when a device reconnects to process undelivered messages. +This approach keeps the sorted set clean by removing references to expired messages. + +```lua +-- Define the sorted set key +local messagesKey = KEYS[1] +-- Define the maximum allowed number of messages +local maxMessagesSize = tonumber(ARGV[1]) +-- Get all elements from the sorted set +local elements = redis.call('ZRANGE', messagesKey, 0, -1) +-- Initialize a table to store retrieved messages +local messages = {} +-- Iterate over each element in the sorted set +for _, key in ipairs(elements) do + -- Check if the message key still exists in Redis + if redis.call('EXISTS', key) == 1 then + -- Retrieve the message value from Redis + local msgJson = redis.call('GET', key) + -- Store the retrieved message in the result table + table.insert(messages, msgJson) + else + -- Remove the reference from the sorted set if the key does not exist + redis.call('ZREM', messagesKey, key) + end +end +-- Return the retrieved messages +return messages +``` +{: .copy-code} + +By leveraging Redis’ sorted sets and strings, along with Lua scripting for atomic operations, our new design achieves efficient message persistence and retrieval, as well as dynamic cleanup. +This design addresses the scalability limitations of the PostgreSQL-based solution. + +## Migration from Jedis to Lettuce + +To validate the scalability of the new Redis-based architecture for persistent message storage, we selected a point-to-point (P2P) MQTT communication pattern as a performance testing scenario. +Unlike fan-in (many-to-one) or fan-out (one-to-many) scenarios, the P2P pattern typically involves one-to-one communication and creates a new persistent session for each communicating pair. +This makes it well-suited for evaluating how the system scales as the number of sessions grows. + +Before starting large-scale tests, we conducted a prototype test that revealed the limit of 30k msg/s throughput when using PostgreSQL for persistence message storage. +At the moment of migration to Redis, we used the Jedis library for Redis interactions, primarily for cache management. +As a result, we initially decided to extend Jedis to handle message persistence for persistent MQTT clients. +However, the initial results of the Redis implementation with Jedis were unexpected. +While we anticipated Redis would significantly outperform PostgreSQL, the performance improvement was modest, reaching only 40k msg/s throughput compared to the 30k msg/s limit with PostgreSQL. + +This led us to investigate the bottlenecks, where we discovered that Jedis was a limiting factor. +While reliable, Jedis operate synchronously, processing each Redis command sequentially. +This forces the system to wait for one operation to complete before executing the next. +In high-throughput environments, this approach significantly limited Redis’s potential, preventing the full utilization of system resources. +To overcome this limitation, we migrated to [Lettuce](https://github.com/redis/lettuce), an asynchronous Redis client built on top of [Netty](https://github.com/netty/netty). +With Lettuce, our throughput increased to 60k msg/s, demonstrating the benefits of non-blocking operations and improved parallelism. + +{% include images-gallery.html imageCollection="jedis-to-lettuce" %} + +Lettuce allows multiple commands to be sent and processed in parallel, fully exploiting Redis’s capacity for concurrent workloads. +Ultimately, the migration unlocked the performance gains we expected from Redis, paving the way for successful P2P testing at scale. +For a deep dive into the testing architecture, methodology, and results, check out our detailed performance testing [article](/docs/{{docsPrefix}}mqtt-broker/reference/1m-throughput-p2p-performance-test). diff --git a/_includes/docs/mqtt-broker/architecture.md b/_includes/docs/mqtt-broker/architecture.md new file mode 100644 index 0000000000..0b4e4601d9 --- /dev/null +++ b/_includes/docs/mqtt-broker/architecture.md @@ -0,0 +1,335 @@ +* TOC +{:toc} + +## Introduction + +This article explains the architectural structure of TBMQ, breaking down how data moves between different components and outlining the core architectural choices. +TBMQ is designed with great care to implement the following attributes: + +* **Scalability**: it is a horizontally scalable platform constructed using cutting-edge open-source technologies; +* **Fault tolerance**: no single point of failure; each broker (node) within the cluster is identical in terms of functionality; +* **Robustness and efficiency**: can manage millions of clients and process millions of messages per second; +* **Durability**: provides high message durability, ensuring that data is never lost. + +### Architecture diagram + +The following diagram shows the pivotal parts of the broker and the route of message transmission. + +![image](/images/mqtt-broker/architecture/tbmq-architecture.png) + +## Motivation + +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. + +* 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. + +* 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. + +> 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. + +To ensure the fulfillment of the above requirements and prevent message loss in the case of clients or some of the broker instances failures, +TBMQ uses the powerful capabilities of [Kafka](https://kafka.apache.org/) as its underlying infrastructure. + +## How does TBMQ work in a nutshell? + +Kafka plays a crucial role in various stages of the MQTT message processing. +All unprocessed published messages, client sessions, and subscriptions are stored within dedicated Kafka topics. +A comprehensive list of Kafka topics used within TBMQ is available [here](#kafka-topics). +All broker nodes can readily access the most up-to-date state of client sessions and subscriptions by utilizing these topics. +They maintain local copies of sessions and subscriptions for efficient message processing and delivery. +When a client loses connection to a specific broker node, other nodes can seamlessly continue operations based on the latest state. +Additionally, newly added broker nodes to the cluster get this vital information upon their activation. + +Client subscriptions hold significant importance within the MQTT publish/subscribe pattern. +TBMQ employs the [Trie](#subscriptions-trie) data structure to optimize performance, +enabling efficient persistence of client subscriptions in memory and facilitating swift access to relevant topic patterns. + +Upon a publisher client sending a _PUBLISH_ message, it is stored in the initial Kafka topic, **tbmq.msg.all**. +Once Kafka acknowledges the message’s persistence, +the broker promptly responds to the publisher with either a _PUBACK/PUBREC_ message or no response at all, depending on the chosen QoS level. + +Subsequently, separate threads, functioning as Kafka consumers, retrieve messages from the mentioned Kafka topic and +utilize the Subscription Trie data structure to identify the intended recipients. +Depending on the client type (**DEVICE** or **APPLICATION**) and the persistence options described below, +the broker either redirects the message to another specific Kafka topic or directly delivers it to the recipient. + +### Non-persistent client + +![image](/images/mqtt-broker/architecture/tbmq-non-persistent-dev.png) + +A client is classified as a non-persistent one when the following conditions are met in the _CONNECT_ packet: + +For **MQTT v3.x**: +* `clean_session` flag is set to _true_. + +For **MQTT v5**: +* `clean_start` flag is set to _true_ and `sessionExpiryInterval` is set to _0_ or not specified. + +In the case of non-persistent clients, all messages intended for them are published directly without undergoing additional persistence. +It is important to note that non-persistent clients can only be of type **DEVICE**. + +**Non-persistent DEVICE processing in cluster mode** + +![image](/images/mqtt-broker/architecture/tbmq-non-persist-dev-cluster.png) + +In cluster mode, multiple TBMQ nodes can operate together, each running Kafka consumers in the same consumer group for the **tbmq.msg.all** topic. +This approach ensures efficient load balancing and message distribution across nodes. +However, it can result in scenarios where a published message is processed by one TBMQ node while the intended subscriber is connected to another. +To handle this, **downlink.basic** Kafka topic is used for communication between TBMQ nodes. +This ensures that the node processing the message forwards it to the target node, which then delivers it to the subscriber via the established connection. + +### Persistent client + +MQTT clients that do not meet the non-persistent conditions mentioned above are categorized as persistent clients. +Let's delve into the conditions for persistent clients: + +For **MQTT v3.x**: +* `clean_session` flag is set to _false_. + +For **MQTT v5 clients**: +* `sessionExpiryInterval` is greater than _0_ (regardless of the `clean_start` flag). +* `clean_start` flag is set to _false_ and `sessionExpiryInterval` is set to _0_ or not specified. + +Building on our knowledge within the IoT ecosystem and the successful implementation of numerous IoT use cases, we have classified MQTT clients into two distinct categories: + +* The _DEVICE_ clients primarily engaged in publishing a significant volume of messages while subscribing to a limited number of topics with relatively low message rates. + These clients are typically associated with IoT devices or sensors. + +* The _APPLICATION_ clients specialize in subscribing to topics with high message rates. + They often require messages to be persisted when the client is offline with later delivery, ensuring the availability of crucial data. + These clients are commonly used for real-time analytics, data processing, or other application-level functionalities. + +Consequently, we made a strategic decision to optimize performance by separating the processing flow for these two types of clients. + +#### Persistent DEVICE client + +![image](/images/mqtt-broker/architecture/tbmq-persistent-dev.png) + +For DEVICE persistent clients, we use the **tbmq.msg.persisted** Kafka topic as a means of processing published messages that are extracted from the **tbmq.msg.all** topic. +This design separates the handling of persistent messages from other message types, ensuring a clear and efficient workflow. +Dedicated threads, functioning as Kafka consumers, retrieve these messages and store them in a [Redis](#redis) database utilized for persistence storage. +This method is particularly suitable for DEVICE clients, as they typically do not require extensive message reception. +This approach helps us recover stored messages smoothly when a client reconnects. At the same time, it ensures great performance for scenarios involving a moderate incoming message rate. + +A detailed breakdown of how we use Redis as persistent message storage for DEVICE clients is available [here](/docs/{{docsPrefix}}mqtt-broker/architecture-details/persistent-device-client/). + +**Persistent DEVICE processing in cluster mode** + +![image](/images/mqtt-broker/architecture/tbmq-persist-dev-cluster.png) + +Similarly to non-persistent clients, TBMQ nodes in cluster mode operate together, running Kafka consumers in the same group for the **tbmq.msg.persisted** topic. +To handle cases where a message is processed by one node but the subscriber is connected to another, **downlink.persisted** Kafka topic is used to forward the message to the appropriate node. +This ensures seamless delivery to the subscriber via its established connection. + +#### Persistent APPLICATION client + +![image](/images/mqtt-broker/architecture/tbmq-app.png) + +The number of APPLICATION clients corresponds to the number of Kafka topics used. +The latest version of Kafka can handle millions of topics, making this design suitable even for the largest enterprise use cases. + +Any message read from the **tbmq.msg.all** topic meant for a specific APPLICATION client is then stored in the corresponding Kafka topic. +A separate thread (Kafka consumer) is assigned to each APPLICATION. +These threads retrieve messages from the corresponding Kafka topics and deliver them to the respective clients. +This approach significantly improves performance by ensuring efficient message delivery. +Additionally, the nature of the Kafka consumer group makes the [MQTT 5 shared subscription](/docs/{{docsPrefix}}mqtt-broker/user-guide/shared-subscriptions/#application-client-type) feature extremely efficient for APPLICATION clients. + +APPLICATION clients can handle a large volume of received messages, reaching millions per second. +It is important to note that APPLICATION clients can only be classified as [persistent](#persistent-client). + +> For both types of clients, we provide configurable instruments to control the persistence of messages per client and the duration for which they are stored. +> You can refer to the following environment variables to adjust these settings: +>* TB_KAFKA_APP_PERSISTED_MSG_TOPIC_PROPERTIES; +>* MQTT_PERSISTENT_SESSION_DEVICE_PERSISTED_MESSAGES_LIMIT; +>* MQTT_PERSISTENT_SESSION_DEVICE_PERSISTED_MESSAGES_TTL. +> +> For more detailed information, please refer to the configurations provided in the following [documentation](/docs/{{docsPrefix}}mqtt-broker/install/config/). + +**Persistent APPLICATION processing in cluster mode** + +![image](/images/mqtt-broker/architecture/tbmq-app-cluster.png) + +APPLICATION clients function the same way in cluster mode as in standalone setup, eliminating the need for internode communication. +The processing of the message occurs directly on the target node, as a dedicated consumer for the APPLICATION client is created there once the client connects. +This design ensures seamless and rapid message delivery. +By avoiding additional message transmission steps, this approach ensures significantly improved performance, even as the system scales horizontally. + +### Kafka topics + +Below is a comprehensive list of Kafka topics used within TBMQ, along with their respective descriptions. + +* **tbmq.msg.all** - topic to store all published messages to the broker from MQTT clients. +* **tbmq.msg.app. + ${client_id}** - topic to store messages the APPLICATION client should receive based on its subscriptions. +* **tbmq.msg.app.shared. + ${topic_filter}** - topic to store messages the APPLICATION clients should receive based on their common shared subscription. +* **tbmq.msg.persisted** - topic to store messages the DEVICE persistent clients should receive based on their subscriptions. +* **tbmq.msg.retained** - topic to store all retained messages. Related to MQTT Retain messages feature. +* **tbmq.client.session** - topic to store sessions of all clients. +* **tbmq.client.subscriptions** - topic to store subscriptions of all clients. +* **tbmq.client.session.event.request** - topic to store events like _CONNECTION_REQUEST_, _DISCONNECTION_REQUEST_, _CLEAR_SESSION_REQUEST_, etc. for sessions of all clients. +* **tbmq.client.session.event.response. + ${service_id}** - topic to store responses to events of the previous topic sent to specific broker node where target client is connected. +* **tbmq.client.disconnect. + ${service_id}** - topic to store force client disconnection events (by admin request from UI/API or on sessions conflicts). +* **tbmq.msg.downlink.basic. + ${service_id}** - topic used to send messages from one broker node to another to which the DEVICE subscriber is currently connected. +* **tbmq.msg.downlink.persisted. + ${service_id}** - topic used to send messages from one broker node to another to which the DEVICE persistent subscriber is currently connected. +* **tbmq.sys.app.removed** - topic for events to process removal of APPLICATION client topic. Used when the client changes its type from APPLICATION to DEVICE. +* **tbmq.sys.historical.data** - topic for historical data statistics (e.g., number of incoming messages, outgoing messages, etc.) published from each broker node in the cluster to calculate the total values per cluster. +* **tbmq.client.blocked** - topic used to distribute and store the list of blocked clients, preventing them from establishing connections to the broker. +* **tbmq.sys.internode.notifications + ${service_id}** - topic for system-level notifications sent between broker nodes to synchronize authentication provider settings, authentication admin settings, and to trigger local client session cache cleanup. + +### Redis + +[Redis](https://redis.io/) is a powerful, in-memory data store that excels in scenarios requiring low-latency and high-throughput data access, making it an ideal choice for storing real-time data. + +In TBMQ, we utilize Redis to store messages for DEVICE persistent clients, allowing us to achieve high performance when handling the message persistence and delivery for these clients. +Redis's ability to manage large datasets in memory with lightning-fast read and write operations, combined with the scalability of Redis Cluster, +ensures that persistent messages can be retrieved and delivered efficiently, even as the volume of stored messages grows and system demands increase. +This scalability allows Redis to seamlessly handle larger workloads by distributing data across multiple nodes, maintaining high performance and reliability. + +{% capture tbmq-redis-postgresql %} +Before TBMQ v2.0, PostgreSQL was used for saving messages for DEVICE persistent clients. +We migrated to Redis in v2.0 to provide a more scalable and performant solution for message persistence due to PostgreSQL limitations in terms of handling a high volume of write operations. +This migration to Redis enables us to handle much higher throughput while ensuring fast, reliable message storage and delivery for DEVICE persistent clients. +{% endcapture %} +{% include templates/info-banner.md content=tbmq-redis-postgresql %} + +### PostgreSQL database + +TBMQ uses a [PostgreSQL](https://www.postgresql.org/) database to store different entities such as users, user credentials, MQTT client credentials, statistics, +WebSocket connections, WebSocket subscriptions, and others. + +PostgreSQL, known for its reliability, robustness, and flexibility, is a powerful open-source relational database management system that ensures data integrity while supporting high transaction throughput. +In TBMQ, PostgreSQL serves as the primary storage layer for persisting critical metadata about the system. +Given the nature of MQTT applications, which involve high message volumes and frequent read/write operations, +PostgreSQL's transaction management and ACID compliance provide strong consistency guarantees, +ensuring that important data is safely stored and retrievable in any scenarios. + +### Web UI + +TBMQ offers a user-friendly and lightweight graphical user interface (GUI) +that simplifies the administration of the broker in an intuitive and efficient manner. +This GUI provides several key features to facilitate broker management: + +* MQTT Client Credential Management: users can easily manage MQTT client credentials through the GUI, allowing for the creation, modification, and deletion of client credentials as needed. +* Client Session and Subscriptions Control: the GUI enables administrators to monitor and control the state of client sessions, including terminating, and managing active client connections. + It also provides functionality to manage client subscriptions, allowing for the addition, removal, and modification of subscriptions. +* Shared Subscription Management: the GUI includes tools for managing shared subscriptions. + Administrators can create and manage Application shared subscription entities, facilitating efficient message distribution to multiple subscribed clients of type APPLICATION. +* Retained Message Management: the GUI allows administrators to manage retained messages, which are messages that are saved by the broker and delivered to new subscribers. +* WebSocket Client: The GUI provides support for WebSocket client, allowing administrators to establish, monitor, and manage WebSocket connections. + This feature allows users to interact with TBMQ via MQTT over WebSocket, enabling them to efficiently debug and test their connections and message flows in real-time. + +In addition to these administrative features, the GUI provides monitoring dashboards that offer comprehensive statistics and insights into the broker's performance. +These dashboards provide key metrics and visualizations to facilitate real-time monitoring of essential broker statistics, +enabling administrators to gain a better understanding of the system's health and performance. + +The combination of these features makes the GUI an invaluable tool for managing, configuring, and monitoring TBMQ in a user-friendly and efficient manner. + +### Netty + +In our pursuit of leveraging cutting-edge technologies, we selected [Netty](https://netty.io/) for implementing the TCP server that facilitates the MQTT protocol, owing to its proven performance and flexibility. + +Netty is a high-performance, asynchronous event-driven network framework well-suited for building scalable and robust network applications, making it an excellent fit for handling MQTT traffic in TBMQ. +One of the primary reasons for choosing Netty is its efficient handling of large numbers of simultaneous connections. +In IoT environments, where thousands or even millions of devices are constantly connected and exchanging data, Netty's ability to handle concurrent connections with low resource consumption is invaluable. + +Netty uses non-blocking I/O (NIO), allowing it to efficiently manage resources without needing a dedicated thread for each connection, greatly reducing overhead. +This approach ensures high throughput and low-latency communication, even under heavy loads, making it ideal for the high demands of an MQTT broker like TBMQ. + +Netty is highly flexible, allowing developers to customize the networking stack to meet specific protocol requirements. +With its modular design, Netty provides the building blocks to easily implement protocol handling, message parsing, and connection management, while offering TLS encryption options, making it secure and extensible for future needs. + +### Actor system + +TBMQ utilizes an Actor System as the underlying mechanism for implementing actors responsible for handling MQTT clients. +The adoption of the Actor model enables efficient and concurrent processing of messages received from clients, thereby ensuring high-performance operation. + +The broker uses its own custom implementation of an Actor System, specifically designed to meet the requirements of TBMQ. +Within this system, two distinct types of actors are present: + +* **Client Actors**: for every connected MQTT client, a corresponding Client actor is created. + These actors are responsible for processing the main message types, such as _CONNECT_, _SUBSCRIBE_, _UNSUBSCRIBE_, _PUBLISH_, and others. + The Client actors handle the interactions with the MQTT clients and help the execution of the associated message operations. +* **Persisted Device Actors**: in addition to the Client actors, an extra Persisted Device actor is created for all DEVICE clients that are categorized as persistent. + These actors are specifically designated to manage the persistence-related operations and handle the storage and retrieval of messages for persistent DEVICE clients. + +With the Actor System and various actor types, TBMQ efficiently processes messages concurrently, ensuring optimal performance and quick responses when dealing with client interactions. + +For further insights into the Actor model, you can refer to the provided [link](https://en.wikipedia.org/wiki/Actor_model). + +### Message dispatcher service + +The Message dispatcher service is another core component of TBMQ's architecture, responsible for managing the flow of messages between publisher clients and Kafka, +ensuring safe processing, persistence, and efficient delivery to the appropriate subscribers. + +The primary role of the Message dispatcher service begins once the message from the publisher is received via the Actor system. +The service takes this message and publishes it to Kafka, ensuring that it is durably stored for safe processing and persistence. +This step guarantees that messages are not lost, even in the event of node failures or temporary disconnections, making Kafka a reliable backbone for handling high volumes of MQTT traffic. + +Once Kafka confirms the message is stored, the Message dispatcher service retrieves the message and leverages the [Subscription Trie](#subscriptions-trie) to analyze which subscribers are eligible to receive it. +After identifying the appropriate subscribers, the Message dispatcher service determines how to handle the message based on the type of subscriber: + +* [DEVICE Non-Persistent Client](#non-persistent-client): The message can be immediately delivered to the client. +* [DEVICE Persistent Client](#persistent-device-client): The message is published to DEVICE clients Kafka topic and later stored in Redis. +* [APPLICATION Persistent Client](#persistent-application-client): The message is published to dedicated Application Kafka topic. + +Once the appropriate handling route is determined and done for each subscriber, the message is passed to Netty, which manages the actual network transmission, +ensuring the message is delivered to the appropriate online clients. + +### Subscriptions Trie + +The Trie data structure is highly efficient for fast lookups due to its hierarchical organization and prefix-based matching. +It allows for quick identification of matching topics by storing common prefixes only once, which minimizes search space and reduces memory usage. +Its predictable time complexity, which depends on the length of the topic rather than the number of topics, ensures consistent and fast lookups even in large-scale environments with millions of subscriptions. + +Within TBMQ, all client subscriptions are consumed from a Kafka topic and stored in a Trie data structure in the memory. +The Trie organizes the topic filters hierarchically, with each node representing a level in the topic filter. + +When a _PUBLISH_ message is read from Kafka, the broker needs to identify all clients with relevant subscriptions for the topic name of the published message to ensure they receive the message. +The Trie data structure enables efficient retrieval of client subscriptions based on the topic name. +Once the relevant subscriptions are identified, a copy of the message is forwarded to each respective client. + +This approach ensures high-performance message processing as it allows for quick and precise determination of the clients that need to receive a specific message. +However, it is worth noting that this method requires increased memory consumption by the broker due to the storage of the Trie data structure. + +For more detailed information on the Trie data structure, you can refer to the provided [link](https://en.wikipedia.org/wiki/Trie). + +## Standalone vs cluster mode + +TBMQ is designed to be horizontally scalable, allowing for the addition of new broker nodes to the cluster automatically. +All nodes within the cluster are identical and share the overall load, ensuring a balanced distribution of client connections and message processing. + +The design of the broker eliminates the need for "master" or "coordinator" processes, as there is no hierarchy or central node responsible for managing the others. +This decentralized approach removes the presence of a single point of failure, enhancing the system's overall robustness and fault tolerance. + +To handle client connection requests, a load balancer of your choice can be used. +The load balancer distributes incoming client connections across all available TBMQ nodes, +evenly distributing the workload and maximizing resource utilization. + +In the event that a client loses its connection with a specific broker node (e.g., due to node shutdown, removal, or network failure), +it can easily reconnect to any other healthy node within the cluster. +This seamless reconnection capability ensures continuous operation and uninterrupted service for connected clients, +as they can establish connections with any available node in the cluster. + +By leveraging horizontal scalability, load balancing, and automatic discovery of new nodes, +TBMQ provides a highly scalable and resilient architecture for handling MQTT communication in large-scale deployments. + +## Programming languages + +The back end of TBMQ is implemented in Java 17. The front end of TBMQ is developed as a SPA using the Angular 19 framework. \ No newline at end of file diff --git a/_includes/docs/mqtt-broker/faq.md b/_includes/docs/mqtt-broker/faq.md index 0ab054b4ee..501095e33c 100644 --- a/_includes/docs/mqtt-broker/faq.md +++ b/_includes/docs/mqtt-broker/faq.md @@ -1,61 +1,374 @@ * TOC {:toc} +## Getting Started -## What is TBMQ? +{% if docsPrefix == null %} -TBMQ represents an open-source software product developed by ThingsBoard, designed to facilitate communication between MQTT clients. -This particular product is freely available for both personal and commercial purposes, with the added flexibility of being deployable in any desired location. -For individuals new to utilizing the broker, we suggest consulting the comprehensive resources, namely the -[what-is-tbmq](/docs/mqtt-broker/getting-started-guides/what-is-thingsboard-mqtt-broker/) and the -[getting started guide](/docs/mqtt-broker/getting-started/), in order to gain a thorough understanding of its functionality. -Further details can be found on the dedicated page, providing a wealth of additional information. +### What is TBMQ Community Edition (CE)? -## How do I get started? +TBMQ is a high-performance MQTT broker developed by ThingsBoard. +It enables efficient, reliable, and scalable communication between MQTT clients and IoT applications. +TBMQ supports **MQTT 3.x** and **MQTT 5.0**, ensuring compatibility with a wide range of devices and industry use cases. -We recommend [installing](/docs/mqtt-broker/install/installation-options/) TBMQ locally on your laptop or PC using Docker -and follow the [getting started guide](/docs/mqtt-broker/getting-started/). +The broker is available in two editions: **Community Edition (CE)** and **Professional Edition (PE)**. -## What can I do with TBMQ? +The **Community Edition** is a **free and open-source** version, ideal for developers and teams who want to explore, prototype, and test MQTT-based solutions without licensing costs. +It provides a robust MQTT broker that can be deployed locally, on-premises, or in the cloud. +CE delivers all the essential features for reliable messaging, scalability, and monitoring — making it a perfect starting point for both learning and production-scale use cases. -TBMQ enables seamless communication between MQTT clients, ensuring reliable data exchange. -It provides robust support for MQTT versions 3.x and 5.0, ensuring compatibility with a wide range of clients. -TBMQ enhances both functionality and scalability, making it suitable for IoT deployments of any size. +If this is your first experience with TBMQ, we recommend reviewing the [What is TBMQ](/docs/{{docsPrefix}}mqtt-broker/getting-started-guides/what-is-thingsboard-mqtt-broker/) and [Getting Started Guide](/docs/{{docsPrefix}}mqtt-broker/getting-started/) to learn more about its architecture, setup, and key capabilities. -## Where can I host TBMQ? +{% endif %} -The hosting options for TBMQ are highly flexible, allowing you to choose from cloud-based environments, on-premises setups, -or even running it locally on your personal laptop or PC. -For initiating the setup process, we advise opting for the [Docker installation](/docs/mqtt-broker/install/docker/), which offers a streamlined and efficient approach. -If you're interested in configuring a cluster setup, a comprehensive [guide](/docs/mqtt-broker/install/cluster/docker-compose-setup/) is available, specifically designed for Docker Compose setups. +{% if docsPrefix == "pe/" %} -## What about security? +### What is TBMQ Professional Edition (PE)? -TBMQ ensures secure communication by supporting MQTT with SSL/TLS encryption, safeguarding data transmission. -It also allows the creation of client credentials for authentication and authorization, bolstering system security. -With MQTT 5, TBMQ offers enhanced authentication features, enabling more flexible and dynamic client authentication mechanisms. -These measures provide robust protection against unauthorized access and strengthen overall security control in your IoT environment. +TBMQ is a high-performance MQTT broker developed by ThingsBoard. +It enables efficient, reliable, and scalable communication between MQTT clients and IoT applications. +TBMQ supports **MQTT 3.x** and **MQTT 5.0**, ensuring compatibility with a wide range of devices and industry use cases. -## How many clients and messages per second can TBMQ support? +The broker is available in two editions: **Community Edition (CE)** and **Professional Edition (PE)**. -TBMQ boasts horizontal scalability, meaning it can be expanded seamlessly to accommodate growing demands. -Each broker, or node, within the cluster possesses identical capabilities and handles a specific subset of the data. -It's worth noting that the actual performance of the system is contingent upon the specific usage scenario, -with factors such as payload size and message rate playing crucial roles in determining the overall efficiency and throughput of the system. -For a comprehensive understanding of the performance capabilities of TBMQ, we recommend referring to the dedicated -[performance test page](/docs/mqtt-broker/reference/100m-connections-performance-test/). +The **Professional Edition** is the **enterprise-grade** version of TBMQ, designed for **commercial IoT deployments** and large-scale production environments. +It includes all the capabilities of the Community Edition, plus advanced features such as: -## Where does TBMQ store data? +* **White-label branding** and UI customization +* **Advanced security and access control** +* **Enhanced monitoring, analytics, and reporting** +* **Professional support and maintenance** -TBMQ utilizes [Kafka](https://kafka.apache.org/), [Redis](https://redis.io/), and [PostgreSQL](https://www.postgresql.org/) for data storage. -Kafka handles unprocessed PUBLISH messages, persistent messages for Application clients, and stores client sessions and subscriptions, ensuring seamless data flow across broker nodes. -Redis is used for Device persistent clients, providing high-performance message storage and delivery. -PostgreSQL stores essential metadata, including user credentials, MQTT client details, and system statistics, ensuring data reliability and integrity. +PE is built for organizations that require high throughput, operational reliability, and premium management capabilities to run mission-critical IoT infrastructures. -## What license type does TBMQ use? +If this is your first experience with TBMQ, we recommend reviewing the [What is TBMQ](/docs/{{docsPrefix}}mqtt-broker/getting-started-guides/what-is-thingsboard-mqtt-broker/) and [Getting Started Guide](/docs/{{docsPrefix}}mqtt-broker/getting-started/) to understand its features and deployment options in detail. -TBMQ is licensed under Apache 2.0 License. It is free for both personal and commercial usage, and you can deploy it anywhere. - -## How to get support? +{% endif %} -You can use troubleshooting instructions and community resources or [contact us](/docs/contact-us) and learn more about [services](/services/) we provide. +### How do I get started? + +We recommend [installing](/docs/{{docsPrefix}}mqtt-broker/install/installation-options/) TBMQ locally on your laptop or PC using **Docker** and following the [Getting Started Guide](/docs/{{docsPrefix}}mqtt-broker/getting-started/). +The guide walks you through installation, configuration, and initial testing, helping you establish your first MQTT connections quickly and reliably. + +### How do I install TBMQ? + +You can install TBMQ locally or in the cloud using **Docker**, **Kubernetes scripts**, or **Helm**. +Detailed step-by-step guides are available in the [Installation Guide](/docs/{{docsPrefix}}mqtt-broker/install/installation-options/), including configuration of Kafka, Redis, and PostgreSQL dependencies. + +### How can I start TBMQ using Docker or Helm? + +To start TBMQ with **Docker**, run the provided Docker Compose file, which launches all required services (Kafka, Redis, PostgreSQL, and the MQTT broker) in a single command. +For **Kubernetes**, use the official Helm chart to deploy TBMQ as a scalable, fault-tolerant cluster. The Helm chart includes configurable parameters for persistence, resource limits, and monitoring. +Both methods provide a quick way to get TBMQ running in minutes, whether for testing or production. + +### What are the system requirements for TBMQ? + +TBMQ can run on modest hardware for testing or small-scale evaluation. The **minimum requirements** to start TBMQ are: + +* **CPU:** 1 core +* **Memory:** 2 GB RAM + +However, for stable performance and smoother operation in typical environments, the **recommended configuration** is: + +* **CPU:** 4 cores +* **Memory:** 8 GB RAM +* **Storage:** 50 GB of free disk space +* **Operating System:** Linux (x86-64 architecture) + +For clustered or production environments, hardware needs depend on the expected number of clients and message throughput. +High-volume setups should allocate dedicated nodes for **Kafka**, **Redis**, and **PostgreSQL** to ensure optimal scalability and reliability. + +### How can I upgrade TBMQ to a newer version? + +Upgrading TBMQ is straightforward. [The Upgrade Guide](/docs/{{docsPrefix}}mqtt-broker/install/upgrade-instructions/) +provides version-specific instructions and notes about compatibility changes or configuration updates introduced in each release. + + +## Configuration & Deployment + +### How do I configure TBMQ for production use? + +For production environments, TBMQ should be configured for performance, security, and fault tolerance. +It is recommended to: + +* Enable **SSL/TLS** encryption for MQTT and WebSocket connections. +* Configure **authentication providers** for secure client validation. +* Configure an appropriate number of **Kafka partitions** for each topic, tune producer and consumer parameters, and adjust **Redis stateful connection** settings to achieve optimal throughput. +* Tune JVM memory and thread pool settings according to system resources. + +### Can I deploy TBMQ in Kubernetes? + +Yes. TBMQ fully supports **Kubernetes deployments** through the official **Helm chart** or k8s manifests. +This approach provides easy scaling, automatic recovery, and rolling updates. +You can configure node roles, persistence volumes, and monitoring integrations directly through Helm values, making it suitable for cloud or hybrid environments. + +### How do I set up clustering in TBMQ? + +TBMQ supports **horizontal scaling** through clustering. Each node in the cluster handles a portion of MQTT clients and message flow, ensuring reliability and load balancing. +Cluster coordination is achieved using **Kafka** for message routing. +To enable clustering, deploy multiple TBMQ instances connected to the same Kafka, Redis, and PostgreSQL services, and configure a unique broker ID (`TB_SERVICE_ID`) in the environment variables per node. + +### What ports does TBMQ use? + +By default, TBMQ listens on the following ports: + +* **1883** – MQTT (plain TCP) +* **8883** – MQTT over SSL/TLS +* **8084** – MQTT over WebSocket +* **8085** – MQTT over Secure WebSocket (WSS) +* **8083** - HTTP Web UI access + +These ports can be modified in the TBMQ configuration file or via environment variables before startup. +Make sure your firewall or Kubernetes ingress rules allow access to the selected ports. + +### How can I enable TLS/SSL for secure connections? + +You can enable SSL/TLS by providing a valid **server certificate** and **private key** in the TBMQ configuration. +TBMQ supports both server-side encryption and **client certificate authentication (X.509)** for stronger security. +Certificates can be issued by a trusted CA or generated internally for testing. +Once configured, restart the broker to apply the changes. + +### How can I configure authentication providers in TBMQ? + +TBMQ uses a **pluggable authentication model**, allowing you to define how clients are authenticated. +You can choose between: + +* **Basic authentication** (client ID, username, and password) +* **SSL-based authentication** (X.509 certificate chain) +* **JWT authentication** (JSON Web Tokens) +* **Enhanced authentication** (MQTT 5.0) + +Authentication rules are defined in the database and evaluated during each connection attempt. + + +## Connectivity + +### Which MQTT protocol versions are supported? + +TBMQ fully supports **MQTT 3.1.1** and **MQTT 5.0**, ensuring compatibility with all major MQTT clients and libraries. +Support for MQTT 5.0 introduces advanced features such as **shared subscriptions**, **user properties**, **topic aliases**, **enhanced authentication**, and **reason codes**, giving developers greater flexibility and control over client interactions. + +### Does TBMQ support MQTT over WebSocket? + +Yes. TBMQ supports **MQTT over WebSocket** and **Secure WebSocket (WSS)**, allowing browser-based applications and web dashboards to publish and subscribe to topics in real time. +You can enable the WebSocket endpoints by default on: + +* **8084** – MQTT over WebSocket +* **8085** – MQTT over Secure WebSocket (WSS) + +WebSocket support makes it easy to integrate MQTT communication into modern web applications and IoT portals. + +### How can I configure Keep Alive and Clean Start options? + +TBMQ supports **Keep Alive** and **Clean Start** according to the MQTT specification. + +* **Keep Alive** defines the maximum allowed idle time between messages from the client. If no packets are sent within this interval, the broker considers the connection lost. +* **Clean Start** (MQTT 5.0) or **Clean Session** (MQTT 3.1.1) determines whether the broker should maintain the client’s session state after disconnect. + +These options can be configured on the client side. TBMQ automatically handles session persistence and message queuing based on the chosen settings, ensuring reliable reconnect behavior. + + +## Usage and Capabilities + +### What can I do with TBMQ? + +TBMQ enables seamless communication between MQTT clients, ensuring secure and efficient message exchange. +It supports advanced MQTT 5.0 features such as **shared subscriptions**, **enhanced authentication**, **topic aliasing**, and **flow control**, providing flexibility for IoT applications of any scale. +TBMQ is built for performance and scalability — whether you’re running a single instance for testing or a clustered setup serving thousands of clients. + +### Where can I host TBMQ? + +You can host TBMQ in **cloud environments**, **on-premises setups**, or **locally** on your laptop or PC. +For the fastest setup, we recommend using the [Docker installation guide](/docs/{{docsPrefix}}mqtt-broker/install/docker/). +If you plan to deploy TBMQ for production or cluster environments, refer to the [Cluster Setup Guide](/docs/{{docsPrefix}}mqtt-broker/install/cluster/docker-compose-setup/) for step-by-step instructions on configuring multi-node deployments using Docker Compose. + +### Can I replace the default TBMQ logo in the menu? + +{% if docsPrefix == null %} + +The **Community Edition** of TBMQ does not include a built-in white-labeling feature. However, it is technically possible to replace the default logo by modifying the source code and rebuilding the platform. +This approach requires **development experience** and **familiarity with the TBMQ front-end codebase**. + +If you need an easier and fully supported way to customize the interface, consider upgrading to the **Professional Edition**. +It allows you to upload your own **logo** and **favicon**, customize **login** and **system pages**, and adjust **colors and branding palettes** — all directly from the web interface, without any code changes. + +{% endif %} + +{% if docsPrefix == "pe/" %} + +Yes. In the **Professional Edition**, all branding and visual identity settings can be configured directly from the **White Label** page in the user interface — no code changes required. +You can fully adapt the platform to your company’s look and feel with just a few clicks: + +* **Replace** the default TBMQ logo and favicon with your own corporate visuals. +* **Customize** login, dashboard, and system pages to greet users with your brand from the first interaction. +* **Adjust** color palettes, accent tones, logo size, and styling options (including CSS tweaks) to match your identity. +* **Preview** all changes live before publishing them. +* **Configure custom domains** — map your own URL (for example, `portal.company.com`) so users access TBMQ through your branded domain. + +These tools make it easy to deliver a fully branded experience that aligns with your organization’s visual standards. + +{% endif %} + + +## Security and Reliability + +### What about security? + +TBMQ ensures secure message exchange by supporting **MQTT over SSL/TLS encryption**, preventing unauthorized access and data tampering. +It allows creating custom **authentication providers** for validating client credentials, and supports **enhanced authentication (MQTT 5.0)** for more flexible security models. +You can integrate TBMQ with your existing certificate authority or use username/password-based authentication. +These features provide a strong foundation for building secure and reliable IoT communication networks. + +### What authentication methods does TBMQ support? + +TBMQ supports multiple authentication mechanisms to ensure secure and flexible client validation. +The available methods include: + +* **Basic authentication** – verifies client ID, username, and password credentials stored in the database. +* **X.509 certificate chain authentication** – validates clients using SSL/TLS certificates. +* **Enhanced authentication (MQTT 5.0)** – supports SCRAM-based authentication flows defined by the MQTT 5.0 specification. +* **JWT authentication** – enables token-based authentication and integration with external identity systems via the TBMQ authentication API. + +These options allow you to choose the best approach depending on your deployment and security requirements. + +### How can I enable client certificate authentication (SSL)? + +TBMQ supports **SSL/TLS encryption** and **client certificate authentication** (X.509 certificate chain). +To enable this feature: + +1. Provide a valid **server certificate** and **private key** in the configuration file. +2. Enable the **secure MQTT port** (default: `8883`). +3. Configure TBMQ to verify client certificates for mutual authentication using X.509 Certificate Chain credentials. + +This ensures that both the client and server validate each other’s identity before establishing a connection, adding a strong layer of security for IoT and enterprise deployments. + +### Does TBMQ support JWT authentication? + +Yes. TBMQ supports **JWT (JSON Web Token)**–based authentication through authentication providers. +This approach enables clients to connect securely using signed tokens instead of static credentials. +JWT support is ideal for dynamic or short-lived sessions where credentials are issued by an external identity service. + +### How are unauthorized client connections handled? + +TBMQ automatically detects and logs unauthorized connection attempts. +When a client fails authentication, the broker records details such as **client ID**, **IP address**, **username**, and **TLS status**. +This data can be reviewed in the **Unauthorized Clients** dashboard or queried via API for further analysis. + +### How can I monitor and block unauthorized clients? + +TBMQ provides tools to monitor unauthorized clients directly through the web interface or REST API. +Administrators can filter, inspect, and delete recorded entries. +You can also apply blocking rules to reject future connection attempts from known malicious IP addresses or repeated offenders. +This feature helps maintain system integrity and visibility into potential security risks. + + +## Subscriptions & Messaging + +### How does TBMQ manage subscriptions? + +TBMQ manages client subscriptions using a **Trie-based data structure**, which provides fast and memory-efficient topic lookups. +All client subscriptions are consumed from a Kafka topic and stored in memory within the Trie, where each node represents a level in the topic filter hierarchy. + +The Trie structure enables **prefix-based matching**, allowing TBMQ to quickly identify all clients subscribed to topics that match a published message. +When a **PUBLISH** message is read from Kafka, TBMQ uses the Trie to determine the set of clients with relevant subscriptions and forwards the message to each of them. + +This approach ensures **high-performance message routing**, as the lookup time depends on the length of the topic rather than the total number of subscriptions. +It scales efficiently even in large environments with **millions of active subscriptions**. +While this method slightly increases memory usage due to in-memory storage of the Trie, it provides predictable and low-latency message delivery. + +### Does TBMQ support shared subscriptions? + +Yes. TBMQ supports **shared subscriptions** as defined by the MQTT 5.0 specification. +Shared subscriptions allow multiple clients to consume messages from the same topic group in a **load-balanced** manner. +This feature is especially useful for scaling message processing horizontally — for example, distributing telemetry data processing among several backend services. + +### How are retained messages handled in TBMQ? + +TBMQ supports **retained messages**, which ensure that newly connected subscribers immediately receive the most recent message published on a topic. +When a client publishes a retained message, TBMQ stores it and delivers it automatically to any future subscribers of that topic. +If a retained message with an empty payload is received, TBMQ clears the retained message for that topic, following the MQTT specification. + +### What is the difference between persistent and non-persistent sessions? + +A **persistent session** stores the client’s subscriptions and undelivered QoS 1/2 messages, allowing message delivery to resume after reconnecting. +A **non-persistent session** (Clean Start = true) is temporary — all subscriptions and queued messages are discarded when the client disconnects. +TBMQ fully supports both modes and automatically handles session recovery for persistent clients after reconnecting. + +### How does TBMQ handle Last Will and Testament (LWT)? + +TBMQ follows the MQTT standard for **Last Will and Testament (LWT)** messages. +When a client connects, it can specify an LWT message that the broker will publish automatically if the client disconnects unexpectedly. +This feature helps notify other clients or monitoring systems about abnormal disconnections, improving visibility and reliability in IoT systems. + +### How can I monitor the number of messages published and received? + +TBMQ provides detailed metrics on message throughput, including the number of **published**, **received**, and **dropped** messages. +These statistics are available through the built-in **monitoring dashboard**. +Administrators can use these insights to track broker performance and optimize system configuration. + + +## Performance and Scalability + +### How many clients and messages per second can TBMQ support? + +TBMQ offers **horizontal scalability**, meaning it can grow seamlessly with your workload. +Each broker node in a cluster handles a portion of the load, ensuring balanced message processing and uninterrupted performance. +Actual throughput depends on hardware, configuration, and message characteristics (size, QoS level, persistence). +Optimized setups can handle **millions of simultaneous client connections** and **millions of messages per second**. +For detailed metrics and benchmarks, visit the [Performance Test Page](/docs/{{docsPrefix}}mqtt-broker/reference/100m-connections-performance-test/). + +### How can I monitor TBMQ performance? + +TBMQ exposes detailed performance metrics through its **monitoring dashboard** and **Prometheus endpoint**. +You can track key indicators such as: + +* Number of connected clients +* Message publish and receive rates +* Queue sizes and processing latency +* Redis and Kafka performance + +These metrics can be visualized in **Grafana** or other observability platforms to gain real-time insights into system health and throughput trends. + +### How does TBMQ handle backpressure when clients are slow? + +TBMQ implements an internal **backpressure management mechanism** to maintain stable performance when clients are unable to consume messages quickly. +When a client’s network channel becomes non-writable, TBMQ temporarily pauses message delivery for that client. +Once the channel becomes writable again, queued messages are delivered in the correct order. +This design prevents slow consumers from impacting other clients, ensuring consistent throughput across the cluster. + + +## Data Storage and Persistence + +### Where does TBMQ store data? + +TBMQ integrates with [Kafka](https://kafka.apache.org/), [Redis](https://redis.io/), and [PostgreSQL](https://www.postgresql.org/) to ensure reliable, high-performance data storage: + +* **Kafka** – handles unprocessed PUBLISH messages, persistent messages for Application clients, and stores client sessions and subscriptions. +* **Redis** – stores Device persistent messages for fast access and recovery. +* **PostgreSQL** – stores metadata such as user credentials, MQTT client credentials, system statistics, etc. + +This hybrid architecture ensures data durability, high availability, and efficient delivery across distributed systems. + + +## Licensing and Support + +### What license type does TBMQ use? + +{% if docsPrefix == null %} + +TBMQ CE is distributed under the **Apache 2.0 License**, allowing both personal and commercial usage. +You can freely deploy, modify, and distribute it in any environment without additional licensing costs. + +{% endif %} +{% if docsPrefix == "pe/" %} + +TBMQ PE is a commercially licensed version of TBMQ available under a subscription-based license. +It includes additional enterprise-grade features, support services, and maintenance. +Use of the PE version requires a valid license agreement with ThingsBoard, Inc. + +{% endif %} + +### How to get support? + +You can access community-driven troubleshooting guides and documentation, or [contact us](/docs/{{docsPrefix}}mqtt-broker/help) directly for technical assistance. +Learn more about [services](/services/) we provide. diff --git a/_includes/docs/mqtt-broker/getting-started-guides/what-is-thingsboard-mqtt-broker.md b/_includes/docs/mqtt-broker/getting-started-guides/what-is-thingsboard-mqtt-broker.md index 59dd3916e0..69d4e507e9 100644 --- a/_includes/docs/mqtt-broker/getting-started-guides/what-is-thingsboard-mqtt-broker.md +++ b/_includes/docs/mqtt-broker/getting-started-guides/what-is-thingsboard-mqtt-broker.md @@ -1,28 +1,27 @@ +{% include templates/mqtt-broker/pe-tbmq-explore-banner.md %} -**TBMQ** represents an open-source MQTT message broker. It has the capacity to handle more than **4M** concurrent client connections, -supporting a minimum of [3M messages per second throughput](/docs/mqtt-broker/reference/3m-throughput-single-node-performance-test/) per single-node deployment -with low latency delivery. -In the cluster mode, its capabilities are further enhanced, -enabling it to support more than [100M concurrently connected clients](/docs/mqtt-broker/reference/100m-connections-performance-test/). +**TBMQ {{tbmqSuffix}}** is an {{tbmqDefinition}} MQTT message broker designed for massive scalability and high-performance message routing. +It efficiently handles **millions** of concurrent client connections and delivers [millions of messages per second](/docs/{{docsPrefix}}mqtt-broker/reference/3m-throughput-single-node-performance-test/) +with low latency in a single-node setup. +In cluster mode, TBMQ’s capabilities scale even further, enabling it to support [large-scale IoT deployments](/docs/{{docsPrefix}}mqtt-broker/reference/100m-connections-performance-test/) +with exceptional reliability and throughput. -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. +At ThingsBoard, we’ve accumulated extensive experience in building scalable IoT applications, which has allowed us to identify **three key patterns** commonly found in 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. +* **Fan-in pattern:** + In this scenario, a large number of devices generate high message volumes that are consumed by a smaller set of applications. + These applications must process all incoming data streams reliably and without message loss. -* 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. +* **Fan-out (broadcast) pattern:** + Here, numerous devices subscribe to specific updates or notifications that must be delivered efficiently. + A small number of incoming messages can result in a large number of outgoing updates, creating a high-output distribution flow. -* 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. +* **Point-to-point (P2P) pattern:** + This is a targeted one-to-one communication model, ideal for use cases like private messaging or command-response interactions. + Messages are exchanged directly between a single publisher and a specific subscriber through uniquely defined topics. -Acknowledging these scenarios, we intentionally designed TBMQ to be exceptionally well-suited for all three. - -Implemented in Java, this cutting-edge solution is developed utilizing prominent open-source technologies such as Kafka, -which ensures low-latency message delivery, data durability, and horizontal scalability of the platform. - -Commencing in 2018, an active and continuous development process was initiated, leading to the integration of the broker into commercial applications as of 2021. -Following its successful deployment in production environments, it was determined in early 2023 that a public version of the broker should be made available. +Recognizing these common patterns, we designed TBMQ to be exceptionally well-suited for all three. +Developed in **Java**, TBMQ leverages leading open-source technologies, including **Kafka**, to provide low-latency message delivery, data durability, and horizontal scalability across the platform. ## Full MQTT Specification Support @@ -57,6 +56,11 @@ Our implementation ensures reliable performance and compatibility across diverse * Proxy protocol * Blocked clients * MQTT channel backpressure support +{% if docsPrefix == "pe/" %} +* Single Sign-On (SSO) +* Role-Based Access Control (RBAC) +* White labeling +{% endif %} ## Architecture @@ -67,8 +71,8 @@ TBMQ is designed to be: * **robust and efficient**: can manage millions of clients and process millions of messages per second; * **durable**: the broker ensures data durability, preventing data loss. -See [**TBMQ Architecture**](/docs/mqtt-broker/architecture) for more details. +See [**TBMQ Architecture**](/docs/{{docsPrefix}}mqtt-broker/architecture) for more details. ## Ready to get started? -

Hello World Application

+

Hello World Application

diff --git a/_includes/docs/mqtt-broker/getting-started.md b/_includes/docs/mqtt-broker/getting-started.md index 4e58ee527e..abe35dff63 100644 --- a/_includes/docs/mqtt-broker/getting-started.md +++ b/_includes/docs/mqtt-broker/getting-started.md @@ -1,3 +1,4 @@ +{% include templates/mqtt-broker/pe-tbmq-explore-banner.md %} * TOC {:toc} @@ -12,14 +13,14 @@ Through this tutorial, you will gain knowledge and proficiency in the following * Subscribing to topics to receive published messages. * Configuring authentication and authorization mechanisms for MQTT clients. -For more comprehensive information regarding the architecture of TBMQ, navigate to the following [document](/docs/mqtt-broker/architecture/). +For more comprehensive information regarding the architecture of TBMQ, navigate to the following [document](/docs/{{docsPrefix}}mqtt-broker/architecture/). This resource will provide you with detailed insights into the underlying structure and design principles of the broker, allowing you to develop a deeper understanding of its inner functionalities. ## Installing TBMQ To obtain detailed instructions on how to install TBMQ on different platforms, we recommend exploring the -[**Installation options**](/docs/mqtt-broker/install/installation-options) documentation. +[**Installation options**](/docs/{{docsPrefix}}mqtt-broker/install/installation-options) documentation. This resource will provide you with step-by-step guidance tailored to various deployment scenarios. Follow the below instructions depending on your system for quick TBMQ installation. @@ -47,7 +48,7 @@ sysadmin ## Configure client authentication & authorization -In order to secure the connection to the broker, we should [enable Basic authentication](/docs/mqtt-broker/security/authentication/basic/). +In order to secure the connection to the broker, we should [enable Basic authentication](/docs/{{docsPrefix}}mqtt-broker/security/authentication/basic/). Once Basic authentication is enabled, it is necessary to create MQTT Client Credentials of type `Basic` to authenticate and validate the connecting client. @@ -59,7 +60,7 @@ Once Basic authentication is enabled, it is necessary to create MQTT Client Cred {% include images-gallery.html imageCollection="broker-mqtt-creds-creation" %} -A wider range of authentication methods can be found within the [security guide](/docs/mqtt-broker/security/overview/), offering enhanced options for ensuring secure access. +A wider range of authentication methods can be found within the [security guide](/docs/{{docsPrefix}}mqtt-broker/security/overview/), offering enhanced options for ensuring secure access. ## Publishing and Subscribing to Topics @@ -120,7 +121,7 @@ Please follow these steps to generate commands for "Getting Started Credentials" 4. In the opened window, select your operating system and install the necessary client tools. 5. You can copy and run the commands, but do not forget to replace "$YOUR_PASSWORD" with the real password. -You can read more about [Check Connectivity](/docs/mqtt-broker/user-guide/ui/mqtt-client-credentials/#check-connectivity) here. +You can read more about [Check Connectivity](/docs/{{docsPrefix}}mqtt-broker/user-guide/ui/mqtt-client-credentials/#check-connectivity) here. {% include images-gallery.html imageCollection="check-connectivity" %} diff --git a/_includes/docs/mqtt-broker/help.md b/_includes/docs/mqtt-broker/help.md index 66c36f4803..820211acfc 100644 --- a/_includes/docs/mqtt-broker/help.md +++ b/_includes/docs/mqtt-broker/help.md @@ -6,7 +6,7 @@ If you have any questions or run into issues, the TBMQ team is here to help. You
- +
Slack Community
Ask questions and get quick tips from other users and contributors. @@ -15,7 +15,7 @@ If you have any questions or run into issues, the TBMQ team is here to help. You
-
\ No newline at end of file +
diff --git a/_includes/docs/mqtt-broker/index.md b/_includes/docs/mqtt-broker/index.md index 44f835637e..e55efbd2d4 100644 --- a/_includes/docs/mqtt-broker/index.md +++ b/_includes/docs/mqtt-broker/index.md @@ -1,14 +1,17 @@ -**TBMQ** is a highly scalable and fault-tolerant MQTT broker designed for efficient message routing between connected devices using the MQTT protocol. +{% include templates/mqtt-broker/pe-tbmq-explore-banner.md %} -With the ability to manage over **4M** concurrent client connections, TBMQ delivers a minimum [throughput of 3M messages per second](/docs/mqtt-broker/reference/3m-throughput-single-node-performance-test/) -in single-node deployment with low latency. -Its capabilities are further enhanced in the cluster mode, enabling it to support more than [100M concurrently connected clients](/docs/mqtt-broker/reference/100m-connections-performance-test/). +**TBMQ** is a highly scalable and fault-tolerant [MQTT broker](/products/mqtt-broker/){:target="_blank"} designed for efficient and reliable message routing between connected devices and applications using the +MQTT protocol. -You can refer to the TBMQ documentation to set up the broker and understand its primary features, including the MQTT protocol. +Engineered for high performance, TBMQ can handle **millions** of concurrent connections and process [millions of messages per second](/docs/{{docsPrefix}}mqtt-broker/reference/3m-throughput-single-node-performance-test/) +while maintaining exceptionally low latency. +Its distributed **cluster architecture** takes scalability even further, supporting [massive IoT deployments](/docs/{{docsPrefix}}mqtt-broker/reference/100m-connections-performance-test/) and ensuring **high availability** across all nodes. + +For installation instructions and detailed insights into its architecture and MQTT features, refer to the official TBMQ documentation.
- +
What is TBMQ?
- +
Getting started
- +
Installation
- +
FAQ
@@ -48,7 +51,7 @@ You can refer to the TBMQ documentation to set up the broker and understand its
- +
Configuration
- +
API
@@ -68,23 +71,23 @@ You can refer to the TBMQ documentation to set up the broker and understand its
- +
Forward MQTT messages to external systems like HTTP, Kafka, or external MQTT brokers — seamlessly connecting your IoT data to the rest of your infrastructure.
diff --git a/_includes/docs/mqtt-broker/install/building-from-source.md b/_includes/docs/mqtt-broker/install/building-from-source.md new file mode 100644 index 0000000000..735000258b --- /dev/null +++ b/_includes/docs/mqtt-broker/install/building-from-source.md @@ -0,0 +1,135 @@ +* TOC +{:toc} + +This guide will help you download and build TBMQ from sources. Instructions listed below are tested on Ubuntu 20.04 LTS / 22.04 LTS / 24.04 LTS. + +## Required tools + +This section contains installation instructions for build tools. + +### Java + +TBMQ is build using Java 17. Follow these instructions to install OpenJDK 17: + +```bash +sudo apt update +sudo apt install openjdk-17-jdk-headless +``` +{: .copy-code} + +Please don't forget to configure your operating system to use OpenJDK 17 by default. +You can configure which version is the default using the following command: + +```bash +sudo update-alternatives --config java +``` +{: .copy-code} + +You can check the installation using the following command: + +```bash +java -version +``` +{: .copy-code} + +Expected command output is: + +```text +openjdk version "17.0.xx" +OpenJDK Runtime Environment (...) +OpenJDK 64-Bit Server VM (build ...) +``` + +### Maven + +TBMQ build requires Maven 3.6.3+. + +```bash +sudo apt install maven +``` +{: .copy-code} + +**Please note** that maven installation may set Java 7 as a default JVM on certain Linux machines. +Use java installation [instructions](#java) to fix this. + +## Source code + +You can clone source code of the project from the official [GitHub repo](https://github.com/thingsboard/tbmq). + +```bash +git clone -b {{ site.release.broker_branch }} https://github.com/thingsboard/tbmq.git +cd tbmq +``` +{: .copy-code} + +## Build + +Run the following command from the TBMQ folder to build the project: + +```bash +mvn clean install -DskipTests +``` +{: .copy-code} + +## Build local docker images + +Make sure that [Docker](https://docs.docker.com/engine/install/) is installed. + +```bash +mvn clean install -DskipTests -Ddockerfile.skip=false +``` +{: .copy-code} + +## Build artifacts + +You can find debian, rpm and windows packages in the target folder: + +```bash +cd application/target +``` +{: .copy-code} + +## Running tests + +We are using [Docker](https://docs.docker.com/engine/install/) to run all kind of integration and black-box tests. + +Please, manage [Docker as a non-root user](https://docs.docker.com/engine/install/linux-postinstall/#manage-docker-as-a-non-root-user) to run tests properly. + +Main and release branches are already tested, so you can skip tests and avoid installing docker as well. + +Run all unit and integration tests: + +```bash +mvn clean install +``` +{: .copy-code} + +## Tips and tricks + +TBMQ is quite easy to build from sources on a brand-new clear environment. + +Here are some tips and tricks to boost build experience: + +- [clean maven cache](https://www.baeldung.com/maven-clear-cache) + ```bash + rm -rf ~/.m2/repository + ``` + {: .copy-code} + +- clean gradle cache + ```bash + rm -rf ~/.gradle/caches/ + ``` + {: .copy-code} + +- clean node modules + ```bash + rm -rf ui-ngx/node_modules + ``` + {: .copy-code} + +- build in parallel, format headers, build docker images + ```bash + mvn -T 0.8C license:format clean install -DskipTests -Ddockerfile.skip=false + ``` + {: .copy-code} \ No newline at end of file diff --git a/_includes/docs/mqtt-broker/install/cluster/aws-cluster-setup-old.md b/_includes/docs/mqtt-broker/install/cluster/aws-cluster-setup-old.md new file mode 100644 index 0000000000..d628b27023 --- /dev/null +++ b/_includes/docs/mqtt-broker/install/cluster/aws-cluster-setup-old.md @@ -0,0 +1,465 @@ +* TOC +{:toc} + +This guide will help you to set up TBMQ in AWS EKS. + +## Prerequisites + +{% include templates/mqtt-broker/install/aws/eks-prerequisites.md %} + +## Step 1. Open TBMQ K8S scripts repository + +```bash +git clone -b {{ site.release.broker_branch }} https://github.com/thingsboard/tbmq.git +cd tbmq/k8s/aws +``` +{: .copy-code} + +## Step 2. Configure and create EKS cluster + +In the `cluster.yml` file you can find suggested cluster configuration. +Here are the fields you can change depending on your needs: +- `region` - should be the AWS region where you want your cluster to be located (the default value is `us-east-1`) +- `availabilityZones` - should specify the exact IDs of the region's availability zones + (the default value is `[us-east-1a,us-east-1b,us-east-1c]`) +- `instanceType` - the type of the instance with TBMQ node (the default value is `m7a.large`) + +**Note**: If you don't make any changes to `instanceType` and `desiredCapacity` fields, the EKS will deploy 2 nodes of type m7a.large. + +{% capture aws-eks-security %} +In case you want to secure access to the PostgreSQL and MSK, you'll need to configure the existing VPC or create a new one, +set it as the VPC for TBMQ cluster, create security groups for PostgreSQL and MSK, +set them for `managed` node-group in TBMQ cluster and configure the access from TBMQ cluster nodes to PostgreSQL/MSK using another security group. + +You can find more information about configuring VPC for `eksctl` [here](https://eksctl.io/usage/vpc-networking/). +{% endcapture %} +{% include templates/info-banner.md content=aws-eks-security %} + +Command to create AWS cluster: + +```bash +eksctl create cluster -f cluster.yml +``` +{: .copy-code} + +## Step 3. Create AWS load-balancer controller + +Once the cluster is ready you'll need to create AWS load-balancer controller. +You can do it by following [this](https://docs.aws.amazon.com/eks/latest/userguide/aws-load-balancer-controller.html) guide. +The cluster provisioning scripts will create several load balancers: + +* tb-broker-http-loadbalancer - AWS ALB that is responsible for the web UI and REST API; +* tb-broker-mqtt-loadbalancer - AWS NLB that is responsible for the MQTT communication. + +Provisioning of the AWS load-balancer controller is a **very important step** that is required for those load balancers to work properly. + +## Step 4. Amazon PostgreSQL DB Configuration + +You'll need to set up PostgreSQL on Amazon RDS. +One of the ways to do it is by following [this](https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/CHAP_SettingUp.html) guide. + +**Note**: Some recommendations: + +* Make sure your PostgreSQL version is 16.x; +* Use ‘Production’ template for high availability. It enables a lot of useful settings by default; +* Consider creation of custom parameters group for your RDS instance. It will make change of DB parameters easier; +* Consider deployment of the RDS instance into private subnets. This way it will be nearly impossible to accidentally expose it to the internet. +* You may also change `username` field and set or auto-generate `password` field (keep your postgresql password in a safe place). + +**Note**: Make sure your database is accessible from the cluster, one of the way to achieve this is to create +the database in the same VPC and subnets as TBMQ cluster and use +`eksctl-tbmq-cluster-ClusterSharedNodeSecurityGroup-*` security group. See screenshots below. + +{% include images-gallery.html imageCollection="tbmq-rds-set-up" %} + +## Step 5. Amazon MSK Configuration + +You'll need to set up Amazon MSK. +To do so you need to open AWS console, MSK submenu, press `Create cluster` button and choose `Custom create` mode. +You should see the similar image: + +{% include images-gallery.html imageCollection="tbmq-msk-set-up" %} + +**Note**: Some recommendations: + +* Apache Kafka version can be safely set to the 3.7.0 version as TBMQ is fully tested on it; +* Use m5.large or similar instance types; +* Consider creation of custom cluster configuration for your MSK. It will make change of Kafka parameters easier; +* Use default 'Monitoring' settings or enable 'Enhanced topic-level monitoring'. + +**Note**: Make sure your MSK instance is accessible from TBMQ cluster. +The easiest way to achieve this is to deploy the MSK instance in the same VPC. +We also recommend to use private subnets. This way it will be nearly impossible to accidentally expose it to the internet; + +{% include images-gallery.html imageCollection="tbmq-msk-configuration" %} + +At the end, carefully review the whole configuration of the MSK and then finish the cluster creation. + +## Step 6. Amazon ElastiCache (Redis) Configuration + +You need to set up [ElastiCache](https://aws.amazon.com/elasticache/redis/) for Redis. TBMQ uses cache to store messages for [DEVICE persistent clients](/docs/mqtt-broker/architecture/#persistent-device-client), +to improve performance and avoid frequent DB reads (see below for more details). + +It is useful when clients connect to TBMQ with the authentication enabled. +For every connection, the request is made to find MQTT client credentials that can authenticate the client. +Thus, there could be an excessive amount of requests to be processed for a large number of connecting clients at once. + +Please open AWS console and navigate to ElastiCache->Redis clusters->Create Redis cluster. + +**Note**: Some recommendations: + +* Specify Redis Engine version 7.x and node type with at least 1 GB of RAM; +* Make sure your Redis cluster is accessible from the TBMQ cluster. + The easiest way to achieve this is to deploy the Redis cluster in the same VPC. + We also recommend to use private subnets. Use `eksctl-tbmq-cluster-ClusterSharedNodeSecurityGroup-*` security group; +* Disable automatic backups. + +{% include images-gallery.html imageCollection="tbmq-redis-set-up" %} + +## Step 7. Configure links to the Kafka/Postgres/Redis + +### Amazon RDS PostgreSQL + +Once the database switch to the ‘Available’ state, on AWS Console get the `Endpoint` of the RDS PostgreSQL and paste it to +`SPRING_DATASOURCE_URL` in the `tb-broker-db-configmap.yml` instead of `RDS_URL_HERE` part. + +{% include images-gallery.html imageCollection="tbmq-rds-link-configure" %} + +Also, you'll need to set `SPRING_DATASOURCE_USERNAME` and `SPRING_DATASOURCE_PASSWORD` with PostgreSQL `username` and `password` corresponding. + +### Amazon MSK + +Once the MSK cluster switch to the ‘Active’ state, to get the list of brokers execute the next command: +```bash +aws kafka get-bootstrap-brokers --region us-east-1 --cluster-arn $CLUSTER_ARN +``` +{: .copy-code} +Where **$CLUSTER_ARN** is the Amazon Resource Name (ARN) of the MSK cluster: + +{% include images-gallery.html imageCollection="tbmq-msk-link-configure" %} + +You'll need to paste data from the `BootstrapBrokerString` to the `TB_KAFKA_SERVERS` environment variable in the `tb-broker.yml` file. + +Otherwise, click `View client information` seen on the screenshot above. Copy bootstrap server information in plaintext. + +### Amazon ElastiCache + +Once the Redis cluster switch to the ‘Available’ state, open the ‘Cluster details’ and copy `Primary endpoint` without ":6379" port suffix, it`s **YOUR_REDIS_ENDPOINT_URL_WITHOUT_PORT**. + +{% include images-gallery.html imageCollection="tbmq-redis-link-configure" %} + +Edit `tb-broker-cache-configmap.yml` and replace **YOUR_REDIS_ENDPOINT_URL_WITHOUT_PORT**. + +## Step 8. Installation + +Execute the following command to run installation: +```bash +./k8s-install-tbmq.sh +``` +{: .copy-code} + +After this command finish you should see the next line in the console: + +``` +INFO o.t.m.b.i.ThingsboardMqttBrokerInstallService - Installation finished successfully! +``` + +{% capture aws-rds %} + +Otherwise, please check if you set the PostgreSQL URL and PostgreSQL password in the `tb-broker-db-configmap.yml` correctly. + +{% endcapture %} +{% include templates/info-banner.md content=aws-rds %} + +## Step 9. Starting + +Execute the following command to deploy the broker: + +```bash +./k8s-deploy-tbmq.sh +``` +{: .copy-code} + +After a few minutes, you may execute the next command to check the state of all pods. + +```bash +kubectl get pods +``` +{: .copy-code} + +If everything went fine, you should be able to see `tb-broker-0` and `tb-broker-1` pods. Every pod should be in the `READY` state. + +## Step 10. Configure Load Balancers + +### 10.1 Configure HTTP(S) Load Balancer + +Configure HTTP(S) Load Balancer to access web interface of your TBMQ instance. Basically you have 2 possible options of configuration: + +* http - Load Balancer without HTTPS support. Recommended for **development**. The only advantage is simple configuration and minimum costs. May be good option for development server but definitely not suitable for production. +* https - Load Balancer with HTTPS support. Recommended for **production**. Acts as an SSL termination point. You may easily configure it to issue and maintain a valid SSL certificate. Automatically redirects all non-secure (HTTP) traffic to secure (HTTPS) port. + +See links/instructions below on how to configure each of the suggested options. + +#### HTTP Load Balancer + +Execute the following command to deploy plain http load balancer: + +```bash +kubectl apply -f receipts/http-load-balancer.yml +``` +{: .copy-code} + +The process of load balancer provisioning may take some time. You may periodically check the status of the load balancer using the following command: + +```bash +kubectl get ingress +``` +{: .copy-code} + +Once provisioned, you should see similar output: + +```text +NAME CLASS HOSTS ADDRESS PORTS AGE +tb-broker-http-loadbalancer * k8s-thingsbo-tbbroker-000aba1305-222186756.eu-west-1.elb.amazonaws.com 80 3d1h +``` + +#### HTTPS Load Balancer + +Use [AWS Certificate Manager](https://aws.amazon.com/certificate-manager/) to create or import SSL certificate. Note your certificate ARN. + +Edit the load balancer configuration and replace YOUR_HTTPS_CERTIFICATE_ARN with your certificate ARN: + +```bash +nano receipts/https-load-balancer.yml +``` +{: .copy-code} + +Execute the following command to deploy plain https load balancer: + +```bash +kubectl apply -f receipts/https-load-balancer.yml +``` +{: .copy-code} + +### 10.2 Configure MQTT Load Balancer + +Configure MQTT load balancer to be able to use MQTT protocol to connect devices. + +Create TCP load balancer using following command: + +```bash +kubectl apply -f receipts/mqtt-load-balancer.yml +``` +{: .copy-code} + +The load balancer will forward all TCP traffic for ports 1883 and 8883. + +#### One-way TLS + +The simplest way to configure MQTTS is to make your MQTT load balancer (AWS NLB) to act as a TLS termination point. +This way we set up the one-way TLS connection, where the traffic between your devices and load balancers is encrypted, and the traffic between your load balancer and TBMQ is not encrypted. +There should be no security issues, since the ALB/NLB is running in your VPC. +The only major disadvantage of this option is that you can’t use “X.509 certificate” MQTT client credentials, +since information about client certificate is not transferred from the load balancer to the TBMQ. + +To enable the one-way TLS: + +Use [AWS Certificate Manager](https://aws.amazon.com/certificate-manager/) to create or import SSL certificate. Note your certificate ARN. + +Edit the load balancer configuration and replace YOUR_MQTTS_CERTIFICATE_ARN with your certificate ARN: + +```bash +nano receipts/mqtts-load-balancer.yml +``` +{: .copy-code} + +Execute the following command to deploy plain MQTTS load balancer: + +```bash +kubectl apply -f receipts/mqtts-load-balancer.yml +``` +{: .copy-code} + +#### Two-way TLS + +The more complex way to enable MQTTS is to obtain valid (signed) TLS certificate and configure it in the TBMQ. +The main advantage of this option is that you may use it in combination with “X.509 certificate” MQTT client credentials. + +To enable the two-way TLS: + +Follow [this guide](https://thingsboard.io/docs/user-guide/mqtt-over-ssl/) to create a .pem file with the SSL certificate. Store the file as _server.pem_ in the working directory. + +You’ll need to create a config-map with your PEM file, you can do it by calling command: + +```bash +kubectl create configmap tbmq-mqtts-config \ + --from-file=server.pem=YOUR_PEM_FILENAME \ + --from-file=mqttserver_key.pem=YOUR_PEM_KEY_FILENAME \ + -o yaml --dry-run=client | kubectl apply -f - +``` +{: .copy-code} + +* where **YOUR_PEM_FILENAME** is the name of your **server certificate file**. +* where **YOUR_PEM_KEY_FILENAME** is the name of your **server certificate private key file**. + +Then, uncomment all sections in the ‘tb-broker.yml’ file that are marked with “Uncomment the following lines to enable two-way MQTTS”. + +Execute command to apply changes: + +```bash +kubectl apply -f tb-broker.yml +``` +{: .copy-code} + +Finally, deploy the "transparent" load balancer: + +```bash +kubectl apply -f receipts/mqtt-load-balancer.yml +``` +{: .copy-code} + +## Step 11. Validate the setup + +Now you can open TBMQ web interface in your browser using DNS name of the load balancer. + +You can get DNS name of the load-balancers using the next command: + +```bash +kubectl get ingress +``` +{: .copy-code} + +You should see the similar picture: + +```text +NAME CLASS HOSTS ADDRESS PORTS AGE +tb-broker-http-loadbalancer * k8s-thingsbo-tbbroker-000aba1305-222186756.eu-west-1.elb.amazonaws.com 80 3d1h +``` + +Use `ADDRESS` field of the `tb-broker-http-loadbalancer` to connect to the cluster. + +{% include templates/mqtt-broker/login.md %} + +### Validate MQTT access + +To connect to the cluster via MQTT you will need to get corresponding service IP. You can do this with the command: + +```bash +kubectl get services +``` +{: .copy-code} + +You should see the similar picture: + +```text +NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE +tb-broker-mqtt-loadbalancer LoadBalancer 10.100.119.170 k8s-thingsbo-tbbroker-b9f99d1ab6-1049a98ba4e28403.elb.eu-west-1.amazonaws.com 1883:30308/TCP,8883:31609/TCP 6m58s +``` + +Use `EXTERNAL-IP` field of the load-balancer to connect to the cluster via MQTT protocol. + +### Troubleshooting + +In case of any issues you can examine service logs for errors. For example to see TBMQ logs execute the following command: + +```bash +kubectl logs -f tb-broker-0 +``` +{: .copy-code} + +Use the next command to see the state of all statefulsets. +```bash +kubectl get statefulsets +``` +{: .copy-code} + +See [kubectl Cheat Sheet](https://kubernetes.io/docs/reference/kubectl/cheatsheet/) command reference for more details. + +## Upgrading + +{% include templates/mqtt-broker/upgrade/upgrading.md %} + +### Backup and restore (Optional) + +While backing up your PostgreSQL database is highly recommended, it is optional before proceeding with the upgrade. +For further guidance, follow the [next instructions](https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/CHAP_CommonTasks.BackupRestore.html). + +### Upgrade to 2.2.0 + +In this release, the MQTT authentication mechanism was migrated from YAML/env configuration into the database. +During upgrade, TBMQ needs to know which authentication providers are enabled in your deployment. +This information is provided through environment variables passed to the **upgrade pod**. + +The upgrade script requires a file named **`database-setup.yml`** that explicitly defines these variables. +Environment variables from your `tb-broker.yml` file are not applied during the upgrade — only the values in `database-setup.yml` will be used. + +> **Tips** +> If you use only Basic authentication, set `SECURITY_MQTT_SSL_ENABLED=false`. +> If you use only X.509 authentication, set `SECURITY_MQTT_BASIC_ENABLED=false` and `SECURITY_MQTT_SSL_ENABLED=true`. + +**Supported variables** + +* `SECURITY_MQTT_BASIC_ENABLED` (`true|false`) +* `SECURITY_MQTT_SSL_ENABLED` (`true|false`) +* `SECURITY_MQTT_SSL_SKIP_VALIDITY_CHECK_FOR_CLIENT_CERT` (`true|false`) — usually `false`. + +Once the file is prepared and the values verified, proceed with the [upgrade process](#run-upgrade). + +### Upgrade to 2.1.0 + +{% include templates/mqtt-broker/upgrade/update-to-2.1.0-release-aws-cluster.md %} + +### Upgrade to 2.0.0 + +For the TBMQ v2.0.0 upgrade, if you haven't installed Redis yet, please follow [step 6](#step-6-amazon-elasticache-redis-configuration) to complete the installation. +Only then you can proceed with the [upgrade](#run-upgrade). + +### Run upgrade + +In case you would like to upgrade, please pull the recent changes from the latest release branch: + +```bash +git pull origin {{ site.release.broker_branch }} +``` +{: .copy-code} + +{% include templates/mqtt-broker/upgrade/upgrade-to-custom-release.md %} + +**Note**: Make sure custom changes of yours if available are not lost during the merge process. + +{% include templates/mqtt-broker/install/upgrade-hint.md %} + +After that, execute the following command: + +{% capture tabspec %}tbmq-upgrade +tbmq-upgrade-without-from-version,Since v2.1.0,shell,resources/upgrade-options/k8s-upgrade-tbmq-without-from-version.sh,/docs/mqtt-broker/install/cluster/resources/upgrade-options/k8s-upgrade-tbmq-without-from-version.sh +tbmq-upgrade-with-from-version,Before v2.1.0,markdown,resources/upgrade-options/k8s-upgrade-tbmq-with-from-version.md,/docs/mqtt-broker/install/cluster/resources/upgrade-options/k8s-upgrade-tbmq-with-from-version.md{% endcapture %} +{% include tabs.html %} + +{% include templates/mqtt-broker/upgrade/stop-tbmq-pods-before-upgrade.md %} + +## Cluster deletion + +Execute the following command to delete TBMQ nodes: + +```bash +./k8s-delete-tbmq.sh +``` +{: .copy-code} + +Execute the following command to delete all TBMQ nodes and configmaps: + +```bash +./k8s-delete-all.sh +``` +{: .copy-code} + +Execute the following command to delete the EKS cluster (you should change the name of the cluster and the region if those differ): +```bash +eksctl delete cluster -r us-east-1 -n tbmq -w +``` +{: .copy-code} + +## Next steps + +{% assign currentGuide = "InstallationGuides" %}{% include templates/mqtt-broker-guides-banner.md %} diff --git a/_includes/docs/mqtt-broker/install/cluster/aws-cluster-setup.md b/_includes/docs/mqtt-broker/install/cluster/aws-cluster-setup.md new file mode 100644 index 0000000000..9b79dad70d --- /dev/null +++ b/_includes/docs/mqtt-broker/install/cluster/aws-cluster-setup.md @@ -0,0 +1,526 @@ +* TOC +{:toc} + +This guide will help you set up TBMQ {{tbmqSuffix}} in AWS EKS. + +## Prerequisites + +{% include templates/mqtt-broker/install/aws/eks-prerequisites.md %} + +{% if docsPrefix == null %} +## Clone TBMQ repository + +```bash +git clone -b {{ site.release.broker_branch }} https://github.com/thingsboard/tbmq.git +cd tbmq/k8s/aws +``` +{: .copy-code} + +{% else %} +## Clone TBMQ PE K8S repository + +```bash +git clone -b {{ site.release.broker_branch }} https://github.com/thingsboard/tbmq-pe-k8s.git +cd tbmq-pe-k8s/aws +``` +{: .copy-code} +{% endif %} + +## Configure and create EKS cluster + +In the `cluster.yml` file you will find a sample cluster configuration. +You can adjust the following fields according to your requirements: + +* `region` – the AWS region where the cluster will be created. + Default: `us-east-1`. + +* `availabilityZones` – the availability zones within the chosen region. + Default: `[us-east-1a, us-east-1b, us-east-1c]`. + +* `managedNodeGroups` – defines the node groups used by the cluster. + By default, there are two groups: one for **TBMQ core services** and another for **TBMQ Integration Executors**. + If preferred, you may co-locate both workloads in the same node group. + +* `instanceType` – the EC2 instance type for TBMQ and TBMQ IE nodes. + Default: `m7a.large`. + +**Note**: If you don't make any changes to `instanceType` and `desiredCapacity` fields, the EKS will deploy 4 nodes of type m7a.large. + +Command to create the AWS cluster: + +```bash +eksctl create cluster -f cluster.yml +``` +{: .copy-code} + +## Create an AWS load-balancer controller + +Once the cluster is ready, you'll need to create AWS load-balancer controller. +You can do it by following [this](https://docs.aws.amazon.com/eks/latest/userguide/aws-load-balancer-controller.html) guide. +The cluster provisioning scripts will create several load balancers: + +* tbmq-http-loadbalancer - AWS ALB that is responsible for the web UI and REST API; +* tbmq-mqtt-loadbalancer - AWS NLB that is responsible for the MQTT communication. + +Provisioning of the AWS load-balancer controller is a **very important step** that is required for those load balancers to work properly. + +## Amazon PostgreSQL DB Configuration + +You’ll need to provision a PostgreSQL database on **Amazon RDS**. +One recommended way is to follow the [official AWS RDS setup guide](https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/CHAP_SettingUp.html). + +**Recommendations:** + +* **PostgreSQL version**: Use version **17.x**. +* **Template**: Use **Production** for real workloads. It enables important settings by default to improve resilience and reliability; reserve **Dev/Test** only for non-critical testing. +* **Availability**: Enable **Multi-AZ deployment** to ensure automatic failover and minimize downtime. +* **Credentials**: Change the default `username` and set (or auto-generate) a secure `password`. Be sure to store the password safely for future use. +* **Instance configuration**: Use a small general-purpose Graviton instance (e.g., **db.m7g.large**) — TBMQ’s PostgreSQL load is modest; right-size first, optimize later. +* **Scaling**: **Scale vertically** (instance class/size) if sustained CPU >80% or active connections near limits; change type during a maintenance window. +* **Storage**: Choose **gp3 or io1** volumes for production; avoid magnetic storage. +* **Connectivity**: Ensure your RDS database is accessible from your EKS cluster. + A straightforward approach is to create the database in the **same VPC and subnets** as your TBMQ cluster, and assign the + `eksctl-tbmq-cluster-ClusterSharedNodeSecurityGroup-*` security group to the RDS instance. + See the screenshots below for guidance. +* **Parameter group**: Create a **custom parameter group** for your instance. This makes it easier to adjust database parameters later without affecting other databases. +* **Monitoring**: Enable **enhanced monitoring** and set up CloudWatch alarms for key metrics. + +{% include images-gallery.html imageCollection="tbmq-rds-set-up" %} + +## Amazon MSK Configuration + +You’ll need to provision an **Amazon MSK** cluster. +To do this, open the **AWS Console**, navigate to **MSK**, click **Create cluster**, and select **Custom create** mode. +You should see a screen similar to this: + +{% include images-gallery.html imageCollection="tbmq-msk-set-up" %} + +**Recommendations:** + +* **Cluster type**: Select **Provisioned** for full control over broker capacity and configuration. +* **Kafka version**: Use **Apache Kafka 4.0.x** — this version has been fully validated with TBMQ. +* **Metadata mode**: Choose **KRaft** (controller quorum) for simplified operations and improved resiliency compared to ZooKeeper. +* **Instance type**: Start with **m7g.large** brokers (or equivalent) for a good balance of performance and cost; scale up later if required. +* **Cluster configuration**: Create a **custom configuration** to simplify future parameter changes without needing to recreate the cluster. +* **Networking**: Deploy the MSK cluster in the **same VPC** as your TBMQ cluster, using **private subnets** to minimize exposure. + Attach the security group `eksctl-tbmq-cluster-ClusterSharedNodeSecurityGroup-*` to allow connectivity from EKS nodes. +* **Security**: Allow **Unauthenticated access** and **Plaintext** communication. Adjust later if you need stricter security policies. +* **Monitoring**: Use the **default monitoring** options or enable **enhanced topic-level monitoring** for detailed Kafka metrics. + +{% include images-gallery.html imageCollection="tbmq-msk-configuration" %} + +Carefully review the full cluster configuration, then proceed with cluster creation. + +## Amazon ElastiCache (Valkey) Configuration + +TBMQ relies on **Valkey** to store messages for [DEVICE persistent clients](/docs/{{docsPrefix}}mqtt-broker/architecture/#persistent-device-client). +The cache also improves performance by reducing the number of direct database reads, especially when authentication is enabled and multiple clients connect at once. +Without caching, every new connection triggers a database query to validate MQTT client credentials, which can cause the unnecessary load under high connection rates. + +To set up Valkey, open the **AWS Console** → **ElastiCache** → **Valkey caches** → **Create cache**. + +**Recommendations:** + +* **Engine**: Select **Valkey** (recommended) as the engine type. +* **Deployment option**: Choose **Design your own cache** → **Cluster cache** to customize node type, shard count, and replicas. +* **Cluster mode**: + * Set to **Enabled** if you configure TBMQ with `REDIS_CONNECTION_TYPE=cluster` (in this guide, we follow this approach). + * Set to **Disabled** if you configure TBMQ with `REDIS_CONNECTION_TYPE=standalone`. +* **Engine version**: Use **8.x**, fully supported and compatible with Redis OSS v7. +* **Node type**: Start with **cache.r7g.large** (13 GB memory, good network performance). A smaller type with at least **1 GB RAM** can be used for dev/test environments. +* **Shards**: For production, configure **3 shards** with **1 replica per shard** to balance durability and scalability. +* **Parameter groups**: Use the default Valkey 8.x group or create a **custom parameter group** for easier tuning later. +* **Networking**: + * Deploy into the **same VPC** as your TBMQ cluster. + * Use **private subnets** to avoid exposure to the internet. + * Assign the security group `eksctl-tbmq-cluster-ClusterSharedNodeSecurityGroup-*` to allow secure communication between EKS nodes and Valkey. +* **Security**: Disable encryption at rest and in transit if you plan to use **plaintext/unauthenticated** connections. Enable them if stricter security is required. +* **Backups**: **Enable automatic backups** to protect persistent cache data. Choose a retention period that matches your recovery needs (e.g., 1–7 days). + This ensures you can restore the cache in case of accidental data loss or cluster issues. + +{% include images-gallery.html imageCollection="tbmq-redis-set-up" %} + +## Configure links to the Kafka/Postgres/Valkey + +### Amazon RDS (PostgreSQL) + +When the RDS PostgreSQL instance switches to the **Available** state, open the AWS Console and copy its **Endpoint**. +Update the `SPRING_DATASOURCE_URL` field in `tbmq-db-configmap.yml` by replacing the placeholder `RDS_URL_HERE` with the copied endpoint. + +{% include images-gallery.html imageCollection="tbmq-rds-link-configure" %} + +Also, set the following environment variables with your RDS credentials: + +* `SPRING_DATASOURCE_USERNAME` → your PostgreSQL username +* `SPRING_DATASOURCE_PASSWORD` → your PostgreSQL password + +### Amazon MSK (Kafka) + +When the MSK cluster becomes **Active**, retrieve the list of bootstrap brokers with: + +```bash +aws kafka get-bootstrap-brokers --region us-east-1 --cluster-arn $CLUSTER_ARN +``` +{: .copy-code} + +Here, **$CLUSTER_ARN** is the Amazon Resource Name of your MSK cluster. + +{% include images-gallery.html imageCollection="tbmq-msk-link-configure" %} + +Copy the value from **BootstrapBrokerString** and set it as the `TB_KAFKA_SERVERS` environment variable in `tbmq.yml` and `tbmq-ie.yml`. + +Alternatively, click **View client information** in the MSK Console and copy the **plaintext bootstrap servers** from the UI. + +### Amazon ElastiCache (Valkey) + +When the Valkey cluster reaches the **Available** state, open **Cluster details** and copy the connection endpoints: + +* For **standalone mode**: use the **Primary endpoint** (without the `:6379` port suffix) → **YOUR_VALKEY_ENDPOINT_URL_WITHOUT_PORT**. +* For **cluster mode**: use the **Cluster configuration endpoint** → **YOUR_VALKEY_CLUSTER_ENDPOINT_URL**. + +{% include images-gallery.html imageCollection="tbmq-redis-link-configure" %} + +Next, edit `tbmq-cache-configmap.yml`: + +* If running **standalone**: + + ```yaml + REDIS_CONNECTION_TYPE: "standalone" + REDIS_HOST: "YOUR_VALKEY_ENDPOINT_URL_WITHOUT_PORT" + #REDIS_PASSWORD: "YOUR_REDIS_PASSWORD" + ``` + +* If running **cluster**: + + ```yaml + REDIS_CONNECTION_TYPE: "cluster" + REDIS_NODES: "YOUR_VALKEY_CLUSTER_ENDPOINT_URL" + #REDIS_PASSWORD: "YOUR_REDIS_PASSWORD" + # Recommended for Kubernetes clusters to handle dynamic IP changes and failover: + #REDIS_LETTUCE_CLUSTER_TOPOLOGY_REFRESH_ENABLED: "true" + #REDIS_JEDIS_CLUSTER_TOPOLOGY_REFRESH_ENABLED: "true" + ``` + +## Installation + +Execute the following command to run the installation: + +```bash +./k8s-install-tbmq.sh +``` +{: .copy-code} + +After this command is finished, you should see the next line in the console: + +``` +INFO o.t.m.b.i.ThingsboardMqttBrokerInstallService - Installation finished successfully! +``` + +{% capture aws-rds %} + +Otherwise, please check if you set the PostgreSQL URL and PostgreSQL password in the `tbmq-db-configmap.yml` correctly. + +{% endcapture %} +{% include templates/info-banner.md content=aws-rds %} + +{% include templates/mqtt-broker/install/cluster-common/configure-license-key.md %} + +## Configure gp3 as the Default Storage Class in Your EKS Cluster + +To ensure that all newly created PersistentVolumeClaims (PVCs) in your EKS cluster use gp3-backed Amazon EBS volumes, you must create the `gp3` StorageClass and set it as the default. +This section walks you through applying the gp3 StorageClass manifest, disabling or removing the existing `gp2` class if present, and verifying that gp3 is now the cluster’s default. + +Before proceeding, follow the official [AWS EBS CSI Driver instructions](https://docs.aws.amazon.com/eks/latest/userguide/ebs-csi.html) +to install the driver on your EKS cluster. +Once the add-on is successfully installed, you can configure gp3 as the default StorageClass. + +{% include templates/mqtt-broker/install/aws/gp3-sc.md %} + +## Starting + +{% include templates/mqtt-broker/install/cluster-common/starting.md %} + +## Configure Load Balancers + +### Configure HTTP(S) Load Balancer + +Configure HTTP(S) Load Balancer to access the web interface of your TBMQ {{tbmqSuffix}} instance. Basically, you have 2 possible options of configuration: + +* http — Load Balancer without HTTPS support. Recommended for **development**. The only advantage is simple configuration and minimum costs. May be a good option for development server but definitely not suitable for production. +* https — Load Balancer with HTTPS support. Recommended for **production**. Acts as an SSL termination point. You may easily configure it to issue and maintain a valid SSL certificate. Automatically redirects all non-secure (HTTP) traffic to secure (HTTPS) port. + +See links/instructions below on how to configure each of the suggested options. + +#### HTTP Load Balancer + +Execute the following command to deploy plain http load balancer: + +```bash +kubectl apply -f receipts/http-load-balancer.yml +``` +{: .copy-code} + +The process of load balancer provisioning may take some time. You may periodically check the status of the load balancer using the following command: + +```bash +kubectl get ingress +``` +{: .copy-code} + +Once provisioned, you should see a similar output: + +```text +NAME CLASS HOSTS ADDRESS PORTS AGE +tbmq-http-loadbalancer * k8s-thingsbo-tbmq-000aba1305-222186756.eu-west-1.elb.amazonaws.com 80 3d1h +``` + +#### HTTPS Load Balancer + +Use [AWS Certificate Manager](https://aws.amazon.com/certificate-manager/) to create or import SSL certificate. Note your certificate ARN. + +Edit the load balancer configuration and replace YOUR_HTTPS_CERTIFICATE_ARN with your certificate ARN: + +```bash +nano receipts/https-load-balancer.yml +``` +{: .copy-code} + +Execute the following command to deploy plain https load balancer: + +```bash +kubectl apply -f receipts/https-load-balancer.yml +``` +{: .copy-code} + +### Configure MQTT Load Balancer + +Configure MQTT load balancer to be able to use MQTT protocol to connect devices. + +Create TCP load balancer using the following command: + +```bash +kubectl apply -f receipts/mqtt-load-balancer.yml +``` +{: .copy-code} + +The load balancer will forward all TCP traffic for ports 1883 and 8883. + +#### One-way TLS + +The simplest way to configure MQTTS is to make your MQTT load balancer (AWS NLB) to act as a TLS termination point. +This way we set up the one-way TLS connection, where the traffic between your devices and load balancers is encrypted, and the traffic between your load balancer and TBMQ is not encrypted. +There should be no security issues, since the ALB/NLB is running in your VPC. +The only major disadvantage of this option is that you can’t use “X.509 certificate” MQTT client credentials, +since information about the client certificate is not transferred from the load balancer to the TBMQ. + +To enable the one-way TLS: + +Use [AWS Certificate Manager](https://aws.amazon.com/certificate-manager/) to create or import SSL certificate. Note your certificate ARN. + +Edit the load balancer configuration and replace YOUR_MQTTS_CERTIFICATE_ARN with your certificate ARN: + +```bash +nano receipts/mqtts-load-balancer.yml +``` +{: .copy-code} + +Execute the following command to deploy plain MQTTS load balancer: + +```bash +kubectl apply -f receipts/mqtts-load-balancer.yml +``` +{: .copy-code} + +#### Two-way TLS + +The more complex way to enable MQTTS is to obtain valid (signed) TLS certificate and configure it in the TBMQ. +The main advantage of this option is that you may use it in combination with “X.509 certificate” MQTT client credentials. + +To enable the two-way TLS: + +Follow [this guide](https://thingsboard.io/docs/user-guide/mqtt-over-ssl/) to create a .pem file with the SSL certificate. Store the file as _server.pem_ in the working directory. + +You’ll need to create a config-map with your PEM file, you can do it by calling command: + +```bash +kubectl create configmap tbmq-mqtts-config \ + --from-file=server.pem=YOUR_PEM_FILENAME \ + --from-file=mqttserver_key.pem=YOUR_PEM_KEY_FILENAME \ + -o yaml --dry-run=client | kubectl apply -f - +``` +{: .copy-code} + +* where **YOUR_PEM_FILENAME** is the name of your **server certificate file**. +* where **YOUR_PEM_KEY_FILENAME** is the name of your **server certificate private key file**. + +Then, uncomment all sections in the ‘tbmq.yml’ file that are marked with “Uncomment the following lines to enable two-way MQTTS”. + +Execute command to apply changes: + +```bash +kubectl apply -f tbmq.yml +``` +{: .copy-code} + +Finally, deploy the "transparent" load balancer: + +```bash +kubectl apply -f receipts/mqtt-load-balancer.yml +``` +{: .copy-code} + +## Validate the setup + +Now you can open the TBMQ web interface in your browser using the DNS name of the load balancer. + +You can get the DNS name of the load-balancers using the next command: + +```bash +kubectl get ingress +``` +{: .copy-code} + +You should see the similar picture: + +```text +NAME CLASS HOSTS ADDRESS PORTS AGE +tbmq-http-loadbalancer * k8s-thingsbo-tbmq-000aba1305-222186756.eu-west-1.elb.amazonaws.com 80 3d1h +``` + +Use `ADDRESS` field of the `tbmq-http-loadbalancer` to connect to the cluster. + +{% include templates/mqtt-broker/login.md %} + +### Validate MQTT access + +To connect to the cluster via MQTT, you will need to get the corresponding service IP. You can do this with the command: + +```bash +kubectl get services +``` +{: .copy-code} + +You should see the similar picture: + +```text +NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE +tbmq-mqtt-loadbalancer LoadBalancer 10.100.119.170 k8s-thingsbo-tbmq-b9f99d1ab6-1049a98ba4e28403.elb.eu-west-1.amazonaws.com 1883:30308/TCP,8883:31609/TCP 6m58s +``` + +Use `EXTERNAL-IP` field of the load-balancer to connect to the cluster via MQTT protocol. + +### Troubleshooting + +In case of any issues, you can examine service logs for errors. For example, to see TBMQ logs, execute the following command: + +```bash +kubectl logs -f tbmq-0 +``` +{: .copy-code} + +Use the next command to see the state of all statefulsets. + +```bash +kubectl get statefulsets +``` +{: .copy-code} + +See [kubectl Cheat Sheet](https://kubernetes.io/docs/reference/kubectl/cheatsheet/) command reference for more details. + +## Upgrading + +{% include templates/mqtt-broker/upgrade/upgrading.md %} + +### Backup and restore (Optional) + +While backing up your PostgreSQL database is highly recommended, it is optional before proceeding with the upgrade. +For further guidance, follow the [next instructions](https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/CHAP_CommonTasks.BackupRestore.html). + +{% if docsPrefix == null %} + +### Upgrade to 2.2.0 + +In this release, the MQTT authentication mechanism was migrated from YAML/env configuration into the database. +During upgrade, TBMQ needs to know which authentication providers are enabled in your deployment. +This information is provided through environment variables passed to the **upgrade pod**. + +The upgrade script requires a file named **`database-setup.yml`** that explicitly defines these variables. +Environment variables from your `tb-broker.yml` file are not applied during the upgrade — only the values in `database-setup.yml` will be used. + +> **Tips** +> If you use only Basic authentication, set `SECURITY_MQTT_SSL_ENABLED=false`. +> If you use only X.509 authentication, set `SECURITY_MQTT_BASIC_ENABLED=false` and `SECURITY_MQTT_SSL_ENABLED=true`. + +**Supported variables** + +* `SECURITY_MQTT_BASIC_ENABLED` (`true|false`) +* `SECURITY_MQTT_SSL_ENABLED` (`true|false`) +* `SECURITY_MQTT_SSL_SKIP_VALIDITY_CHECK_FOR_CLIENT_CERT` (`true|false`) — usually `false`. + +Once the file is prepared and the values verified, proceed with the [upgrade process](#run-upgrade). + +### Upgrade to 2.1.0 + +{% include templates/mqtt-broker/upgrade/update-to-2.1.0-release-aws-cluster.md %} + +### Upgrade to 2.0.0 + +For the TBMQ v2.0.0 upgrade, if you haven't installed Redis yet, please follow [step 6](#step-6-amazon-elasticache-valkey-configuration) to complete the installation. +Only then you can proceed with the [upgrade](#run-upgrade). + +### Run upgrade + +In case you would like to upgrade, please pull the recent changes from the latest release branch: + +```bash +git pull origin {{ site.release.broker_branch }} +``` +{: .copy-code} + +{% include templates/mqtt-broker/upgrade/upgrade-to-custom-release.md %} + +**Note**: Make sure custom changes of yours if available are not lost during the merge process. + +{% include templates/mqtt-broker/install/upgrade-hint.md %} + +After that, execute the following command: + +{% capture tabspec %}tbmq-upgrade +tbmq-upgrade-without-from-version,Since v2.1.0,shell,resources/upgrade-options/k8s-upgrade-tbmq-without-from-version.sh,/docs/{{docsPrefix}}mqtt-broker/install/cluster/resources/upgrade-options/k8s-upgrade-tbmq-without-from-version.sh +tbmq-upgrade-with-from-version,Before v2.1.0,markdown,resources/upgrade-options/k8s-upgrade-tbmq-with-from-version.md,/docs/{{docsPrefix}}mqtt-broker/install/cluster/resources/upgrade-options/k8s-upgrade-tbmq-with-from-version.md{% endcapture %} +{% include tabs.html %} + +{% include templates/mqtt-broker/upgrade/stop-tbmq-pods-before-upgrade.md %} + +{% else %} + +{% include templates/mqtt-broker/install/cluster-common/k8s-type-upgrade-ce-to-pe.md %} + +{% endif %} + +## Cluster deletion + +Execute the following command to delete TBMQ nodes: + +```bash +./k8s-delete-tbmq.sh +``` +{: .copy-code} + +Execute the following command to delete all TBMQ nodes and configmaps: + +```bash +./k8s-delete-all.sh +``` +{: .copy-code} + +Execute the following command to delete the EKS cluster (you should change the name of the cluster and the region if those differ): + +```bash +eksctl delete cluster -r us-east-1 -n tbmq -w +``` +{: .copy-code} + +## Next steps + +{% assign currentGuide = "InstallationGuides" %}{% include templates/mqtt-broker-guides-banner.md %} diff --git a/_includes/docs/mqtt-broker/install/cluster/azure-cluster-setup-old.md b/_includes/docs/mqtt-broker/install/cluster/azure-cluster-setup-old.md new file mode 100644 index 0000000000..fe72c43adc --- /dev/null +++ b/_includes/docs/mqtt-broker/install/cluster/azure-cluster-setup-old.md @@ -0,0 +1,504 @@ +* TOC +{:toc} + +This guide will help you to set up TBMQ in Azure AKS. + +## Prerequisites + +{% include templates/mqtt-broker/install/azure/aks-prerequisites.md %} + +## Step 1. Open TBMQ K8S scripts repository + +```bash +git clone -b {{ site.release.broker_branch }} https://github.com/thingsboard/tbmq.git +cd tbmq/k8s/azure +``` +{: .copy-code} + +## Step 2. Define environment variables + +Define environment variables that you will use in various commands later in this guide. + +We assume you are using Linux. Execute the following command: + +```bash +export AKS_RESOURCE_GROUP=TBMQResources +export AKS_LOCATION=eastus +export AKS_GATEWAY=tbmq-gateway +export TB_CLUSTER_NAME=tbmq-cluster +export TB_DATABASE_NAME=tbmq-db +export TB_REDIS_NAME=tbmq-redis +echo "You variables ready to create resource group $AKS_RESOURCE_GROUP in location $AKS_LOCATION +and cluster in it $TB_CLUSTER_NAME with database $TB_DATABASE_NAME" +``` +{: .copy-code} + +where: + +* TBMQResources - a logical group in which Azure resources are deployed and managed. We will refer to it later in this guide using **AKS_RESOURCE_GROUP**; +* eastus - is the location where you want to create resource group. We will refer to it later in this guide using **AKS_LOCATION**. You can see all locations list by executing `az account list-locations`; +* tbmq-gateway - the name of Azure application gateway; +* tbmq-cluster - cluster name. We will refer to it later in this guide using **TB_CLUSTER_NAME**; +* tbmq-db is the name of your database server. You may input a different name. We will refer to it later in this guide using **TB_DATABASE_NAME**. + +## Step 3. Configure and create AKS cluster + +{% include templates/mqtt-broker/install/azure/aks-configure-and-create-cluster.md %} + +## Step 4. Update the context of kubectl + +{% include templates/mqtt-broker/install/azure/aks-update-kubectl-ctx.md %} + +## Step 5. Provision PostgreSQL DB + +You’ll need to set up PostgreSQL on Azure. You may follow [this](https://learn.microsoft.com/en-us/azure/postgresql/flexible-server/quickstart-create-server-portal) guide, +but take into account the following requirements: + +* Keep your postgresql password in a safe place. We will refer to it later in this guide using YOUR_AZURE_POSTGRES_PASSWORD; +* Make sure your Azure Database for PostgreSQL version is 16.x; +* Make sure your Azure Database for PostgreSQL instance is accessible from the TBMQ cluster; +* Make sure you use "thingsboard_mqtt_broker" as the initial database name. + +**Note**: Use "High availability" enabled. It enables a lot of useful settings by default. + +Another way by which you can create Azure Database for PostgreSQL is using az tool (don’t forget to replace ‘POSTGRESS_USER’ and ‘POSTGRESS_PASS’ with your username and password): + +```bash +az postgres flexible-server create --location $AKS_LOCATION --resource-group $AKS_RESOURCE_GROUP \ + --name $TB_DATABASE_NAME --admin-user POSTGRESS_USER --admin-password POSTGRESS_PASS \ + --public-access 0.0.0.0 --storage-size 32 \ + --version 16 -d thingsboard_mqtt_broker +``` +{: .copy-code} + +`az postgres flexible-server create` has a lot of parameters, a few of them are: + +* **location** - Location. Values from: `az account list-locations`; +* **resource-group (or -g)** - Name of resource group; +* **name** - Name of the server. The name can contain only lowercase letters, numbers, and the hyphen (-) character. Minimum 3 characters and maximum 63 characters; +* **admin-user** - Administrator username for the server. Once set, it cannot be changed; +* **admin-password** - The password of the administrator. Minimum 8 characters and maximum 128 characters. Password must contain characters from three of the following categories: English uppercase letters, English lowercase letters, numbers, and non-alphanumeric characters; +* **public-access** - Determines the public access. Enter single or range of IP addresses to be included in the allowed list of IPs. IP address ranges must be dash-separated and not contain any spaces. Specifying 0.0.0.0 allows public access from any resources deployed within Azure to access your server. Setting it to “None” sets the server in public access mode but does not create a firewall rule; +* **storage-size** - The storage capacity of the server. Minimum is 32 GiB and maximum is 16 TiB; +* **version** - Server major version; +* **high-availability** - enable or disable high availability feature. High availability can only be set during flexible server creation (accepted values: Disabled, Enabled. Default value: Disabled); +* **database-name (or -d)** - The name of the database to be created when provisioning the database server. + +You can see full parameters list [here](https://learn.microsoft.com/en-us/cli/azure/postgres/flexible-server?view=azure-cli-latest#az_postgres_flexible_server_create). + +Example of response: + +```text +{ + "connectionString": "postgresql://postgres:postgres@$tbmq-db.postgres.database.azure.com/postgres?sslmode=require", + "databaseName": "thingsboard_mqtt_broker", + "firewallName": "AllowAllAzureServicesAndResourcesWithinAzureIps_2021-11-17_15-45-6", + "host": "tbmq-db.postgres.database.azure.com", + "id": "/subscriptions/daff3288-1d5d-47c7-abf0-bfb7b738a18c/resourceGroups/myResourceGroup/providers/Microsoft.DBforPostgreSQL/flexibleServers/thingsboard_mqtt_broker", + "location": "East US", + "password": "postgres", + "resourceGroup": "TBMQResources", + "skuname": "Standard_D2s_v3", + "username": "postgres", + "version": "16" +} +``` + +Note the value of host from the command output (**tbmq-db.postgres.database.azure.com** in our case). Also note username and password (**postgres**) from the command. + +Edit the database settings file and replace YOUR_AZURE_POSTGRES_ENDPOINT_URL with the host value, YOUR_AZURE_POSTGRES_USER and YOUR_AZURE_POSTGRES_PASSWORD with the correct values: + +```bash +nano tb-broker-db-configmap.yml +``` +{: .copy-code} + +## Step 6. Azure Cache for Redis + +You need to set up Azure Cache for Redis. TBMQ uses cache to store messages for [DEVICE persistent clients](/docs/mqtt-broker/architecture/#persistent-device-client), +to improve performance and avoid frequent DB reads (see below for more details). + +It is useful when clients connect to TBMQ with the authentication enabled. +For every connection, the request is made to find MQTT client credentials that can authenticate the client. +Thus, there could be an excessive amount of requests to be processed for a large number of connecting clients at once. + +{% capture redis-azure-version %} +**Note:** Starting from **TBMQ v2.1.0**, Redis 7.2.5 is the officially supported version for third-party Redis deployments. +Please be aware that, as of now, only the **Enterprise** and **Enterprise Flash** SKUs of Azure Cache for Redis support Redis 7.2.x. +The Basic, Standard, and Premium SKUs continue to support only up to **Redis 6.x**. To ensure full compatibility, we recommend using an +Enterprise-tier SKU to ensure proper alignment with the Redis 7.2.5 features and behavior expected by TBMQ. +{% endcapture %} +{% include templates/info-banner.md content=redis-azure-version %} + +In order to set up the Redis, follow one of the following guides: + +- [Quickstart: Create a Redis Enterprise cache (Recommended)](https://learn.microsoft.com/en-us/azure/azure-cache-for-redis/quickstart-create-redis-enterprise) +- [Quickstart: Create an open-source Redis cache](https://learn.microsoft.com/en-us/azure/azure-cache-for-redis/quickstart-create-redis) + +For the open-source (legacy) Redis cache, we provide alternative instructions using the `az` tools, extracted from the official Azure documentation: + +```bash +az redis create --name $TB_REDIS_NAME --location $AKS_LOCATION --resource-group $AKS_RESOURCE_GROUP --sku basic --vm-size C0 --enable-non-ssl-port +``` +{: .copy-code} + +`az redis create` has a lot of options and a few of them are required: + +* **name** (or -n) - name of the Redis cache; +* **resource-group** (or -g) - name of resource group; +* **sku** - type of Redis cache (accepted values: Basic, Premium, Standard); +* **vm-size** - size of Redis cache to deploy. Basic and Standard Cache sizes start with C. Premium Cache sizes start with P (accepted values: c0, c1, c2, c3, c4, c5, c6, p1, p2, p3, p4, p5); +* **location** (or -l) - location. Values from: `az account list-locations`. + +To see the full list of parameters go to the following [page](https://learn.microsoft.com/en-us/cli/azure/redis?view=azure-cli-latest). + +Example of response: + +```text +{ + "accessKeys": null, + "enableNonSslPort": true, + "hostName": "tbmq-redis.redis.cache.windows.net", + "id": "/subscriptions/daff3288-1d5d-47c7-abf0-bfb7b738a18c/resourceGroups/myResourceGroup/providers/Microsoft.Cache/Redis/tbmq-redis", + "instances": [ + { + "isMaster": false, + "isPrimary": false, + "nonSslPort": 13000, + "shardId": null, + "sslPort": 15000, + "zone": null + } + ], + "linkedServers": [], + "location": "East US", + "minimumTlsVersion": null, + "name": "tbmq-redis", + "port": 6379, + "privateEndpointConnections": null, + "provisioningState": "Creating", + "publicNetworkAccess": "Enabled", + "redisConfiguration": { + "maxclients": "256", + "maxfragmentationmemory-reserved": "12", + "maxmemory-delta": "2", + "maxmemory-reserved": "2" + }, + "redisVersion": "6.0.20", + "replicasPerMaster": null, + "replicasPerPrimary": null, + "resourceGroup": "myResourceGroup", + "shardCount": null, + "sku": { + "capacity": 0, + "family": "C", + "name": "Basic" + }, + "sslPort": 6380, + "staticIp": null, + "subnetId": null, + "tags": {}, + "tenantSettings": {}, + "type": "Microsoft.Cache/Redis", + "zones": null +} +``` + +We need to take `hostName` parameter and replace `YOUR_REDIS_ENDPOINT_URL_WITHOUT_PORT` in the file _tb-broker-cache-configmap.yml_. + +After this we need to get redis keys for connection, for this we need to execute: + +```bash +az redis list-keys --name $TB_REDIS_NAME --resource-group $AKS_RESOURCE_GROUP +``` +{: .copy-code} + +Take "primary" and paste into _tb-broker-cache-configmap.yml_ file replacing `YOUR_REDIS_PASSWORD`. + +For more information, see the following [script](https://learn.microsoft.com/en-us/azure/azure-cache-for-redis/scripts/create-manage-cache#run-the-script). + +## Step 7. Installation + +Execute the following command to run the initial setup of the database. +This command will launch short-living TBMQ pod to provision necessary DB tables, indexes, etc. + +```bash +./k8s-install-tbmq.sh +``` +{: .copy-code} + +After this command finish you should see the next line in the console: + +```text +INFO o.t.m.b.i.ThingsboardMqttBrokerInstallService - Installation finished successfully! +``` + +{% capture aws-rds %} + +Otherwise, please check if you set the PostgreSQL URL and PostgreSQL password in the `tb-broker-db-configmap.yml` correctly. + +{% endcapture %} +{% include templates/info-banner.md content=aws-rds %} + +## Step 8. Provision Kafka + +{% include templates/mqtt-broker/install/cluster-common/provision-kafka.md %} + +## Step 9. Starting + +Execute the following command to deploy the broker: + +```bash +./k8s-deploy-tbmq.sh +``` +{: .copy-code} + +After a few minutes, you may execute the next command to check the state of all pods. + +```bash +kubectl get pods +``` +{: .copy-code} + +If everything went fine, you should be able to see `tb-broker-0` and `tb-broker-1` pods. Every pod should be in the `READY` state. + +## Step 10. Configure Load Balancers + +### 10.1 Configure HTTP(S) Load Balancer + +Configure HTTP(S) Load Balancer to access web interface of your TBMQ instance. Basically you have 2 possible options of configuration: + +* http - Load Balancer without HTTPS support. Recommended for **development**. The only advantage is simple configuration and minimum costs. May be good option for development server but definitely not suitable for production. +* https - Load Balancer with HTTPS support. Recommended for **production**. Acts as an SSL termination point. You may easily configure it to issue and maintain a valid SSL certificate. Automatically redirects all non-secure (HTTP) traffic to secure (HTTPS) port. + +See links/instructions below on how to configure each of the suggested options. + +#### HTTP Load Balancer + +Execute the following command to deploy plain http load balancer: + +```bash +kubectl apply -f receipts/http-load-balancer.yml +``` +{: .copy-code} + +The process of load balancer provisioning may take some time. You may periodically check the status of the load balancer using the following command: + +```bash +kubectl get ingress +``` +{: .copy-code} + +Once provisioned, you should see similar output: + +```text +NAME CLASS HOSTS ADDRESS PORTS AGE +tb-broker-http-loadbalancer * 34.111.24.134 80 7m25s +``` + +#### HTTPS Load Balancer + +For using ssl certificates we can add our certificate directly in Azure ApplicationGateway using command: + +```bash +az network application-gateway ssl-cert create \ + --resource-group $(az aks show --name $TB_CLUSTER_NAME --resource-group $AKS_RESOURCE_GROUP --query nodeResourceGroup | tr -d '"') \ + --gateway-name $AKS_GATEWAY\ + --name TBMQHTTPSCert \ + --cert-file YOUR_CERT \ + --cert-password YOUR_CERT_PASS +``` +{: .copy-code} + +Execute the following command to deploy plain https load balancer: + +```bash +kubectl apply -f receipts/https-load-balancer.yml +``` +{: .copy-code} + +### 10.2 Configure MQTT Load Balancer + +Configure MQTT load balancer to be able to use MQTT protocol to connect devices. + +Create TCP load balancer using following command: + +```bash +kubectl apply -f receipts/mqtt-load-balancer.yml +``` +{: .copy-code} + +The load balancer will forward all TCP traffic for ports 1883 and 8883. + +#### MQTT over SSL + +Follow [this guide](https://thingsboard.io/docs/user-guide/mqtt-over-ssl/) to create a .pem file with the SSL certificate. Store the file as _server.pem_ in the working directory. + +You’ll need to create a config-map with your PEM file, you can do it by calling command: + +```bash +kubectl create configmap tbmq-mqtts-config \ + --from-file=server.pem=YOUR_PEM_FILENAME \ + --from-file=mqttserver_key.pem=YOUR_PEM_KEY_FILENAME \ + -o yaml --dry-run=client | kubectl apply -f - +``` +{: .copy-code} + +* where **YOUR_PEM_FILENAME** is the name of your **server certificate file**. +* where **YOUR_PEM_KEY_FILENAME** is the name of your **server certificate private key file**. + +Then, uncomment all sections in the ‘tb-broker.yml’ file that are marked with “Uncomment the following lines to enable two-way MQTTS”. + +Execute command to apply changes: + +```bash +kubectl apply -f tb-broker.yml +``` +{: .copy-code} + +## Step 11. Validate the setup + +Now you can open TBMQ web interface in your browser using DNS name of the load balancer. + +You can get DNS name of the load-balancers using the next command: + +```bash +kubectl get ingress +``` +{: .copy-code} + +You should see the similar picture: + +```text +NAME CLASS HOSTS ADDRESS PORTS AGE +tb-broker-http-loadbalancer * 34.111.24.134 80 3d1h +``` + +Use `ADDRESS` field of the tb-broker-http-loadbalancer to connect to the cluster. + +{% include templates/mqtt-broker/login.md %} + +### Validate MQTT access + +To connect to the cluster via MQTT you will need to get corresponding service IP. You can do this with the command: + +```bash +kubectl get services +``` +{: .copy-code} + +You should see the similar picture: + +```text +NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE +tb-broker-mqtt-loadbalancer LoadBalancer 10.100.119.170 ******* 1883:30308/TCP,8883:31609/TCP 6m58s +``` + +Use `EXTERNAL-IP` field of the load-balancer to connect to the cluster via MQTT protocol. + +### Troubleshooting + +In case of any issues you can examine service logs for errors. For example to see TBMQ logs execute the following command: + +```bash +kubectl logs -f tb-broker-0 +``` +{: .copy-code} + +Use the next command to see the state of all statefulsets. +```bash +kubectl get statefulsets +``` +{: .copy-code} + +See [kubectl Cheat Sheet](https://kubernetes.io/docs/reference/kubectl/cheatsheet/) command reference for more details. + +## Upgrading + +{% include templates/mqtt-broker/upgrade/upgrading.md %} + +### Backup and restore (Optional) + +While backing up your PostgreSQL database is highly recommended, it is optional before proceeding with the upgrade. +For further guidance, follow the [next instructions](https://learn.microsoft.com/en-us/azure/postgresql/flexible-server/concepts-backup-restore). + +### Upgrade to 2.2.0 + +In this release, the MQTT authentication mechanism was migrated from YAML/env configuration into the database. +During upgrade, TBMQ needs to know which authentication providers are enabled in your deployment. +This information is provided through environment variables passed to the **upgrade pod**. + +The upgrade script requires a file named **`database-setup.yml`** that explicitly defines these variables. +Environment variables from your `tb-broker.yml` file are not applied during the upgrade — only the values in `database-setup.yml` will be used. + +> **Tips** +> If you use only Basic authentication, set `SECURITY_MQTT_SSL_ENABLED=false`. +> If you use only X.509 authentication, set `SECURITY_MQTT_BASIC_ENABLED=false` and `SECURITY_MQTT_SSL_ENABLED=true`. + +**Supported variables** + +* `SECURITY_MQTT_BASIC_ENABLED` (`true|false`) +* `SECURITY_MQTT_SSL_ENABLED` (`true|false`) +* `SECURITY_MQTT_SSL_SKIP_VALIDITY_CHECK_FOR_CLIENT_CERT` (`true|false`) — usually `false`. + +Once the file is prepared and the values verified, proceed with the [upgrade process](#run-upgrade). + +### Upgrade to 2.1.0 + +{% include templates/mqtt-broker/upgrade/update-to-2.1.0-release-cluster.md %} + +### Upgrade to 2.0.0 + +For the TBMQ v2.0.0 upgrade, if you haven't installed Redis yet, please follow [step 6](#step-6-azure-cache-for-redis) to complete the installation. +Only then you can proceed with the [upgrade](#run-upgrade). + +### Run upgrade + +In case you would like to upgrade, please pull the recent changes from the latest release branch: + +```bash +git pull origin {{ site.release.broker_branch }} +``` +{: .copy-code} + +{% include templates/mqtt-broker/upgrade/upgrade-to-custom-release.md %} + +**Note**: Make sure custom changes of yours if available are not lost during the merge process. + +{% include templates/mqtt-broker/install/upgrade-hint.md %} + +After that, execute the following command: + +{% capture tabspec %}tbmq-upgrade +tbmq-upgrade-without-from-version,Since v2.1.0,shell,resources/upgrade-options/k8s-upgrade-tbmq-without-from-version.sh,/docs/mqtt-broker/install/cluster/resources/upgrade-options/k8s-upgrade-tbmq-without-from-version.sh +tbmq-upgrade-with-from-version,Before v2.1.0,markdown,resources/upgrade-options/k8s-upgrade-tbmq-with-from-version.md,/docs/mqtt-broker/install/cluster/resources/upgrade-options/k8s-upgrade-tbmq-with-from-version.md{% endcapture %} +{% include tabs.html %} + +{% include templates/mqtt-broker/upgrade/stop-tbmq-pods-before-upgrade.md %} + +## Cluster deletion + +Execute the following command to delete TBMQ nodes: + +```bash +./k8s-delete-tbmq.sh +``` +{: .copy-code} + +Execute the following command to delete all TBMQ nodes and configmaps, load balancers, etc.: + +```bash +./k8s-delete-all.sh +``` +{: .copy-code} + +Execute the following command to delete the AKS cluster: + +```bash +az aks delete --resource-group $AKS_RESOURCE_GROUP --name $TB_CLUSTER_NAME +``` +{: .copy-code} + +## Next steps + +{% assign currentGuide = "InstallationGuides" %}{% include templates/mqtt-broker-guides-banner.md %} diff --git a/_includes/docs/mqtt-broker/install/cluster/azure-cluster-setup.md b/_includes/docs/mqtt-broker/install/cluster/azure-cluster-setup.md new file mode 100644 index 0000000000..bdd3d68213 --- /dev/null +++ b/_includes/docs/mqtt-broker/install/cluster/azure-cluster-setup.md @@ -0,0 +1,334 @@ +{% if docsPrefix == null %} +{% assign valkey_from_version = "v2.3.0" %} +{% else %} +{% assign valkey_from_version = "v2.2.0" %} +{% endif %} + +* TOC +{:toc} + +This guide will help you set up TBMQ {{tbmqSuffix}} in AKS. + +## Prerequisites + +{% include templates/mqtt-broker/install/azure/aks-prerequisites.md %} + +{% if docsPrefix == null %} +## Clone TBMQ repository + +```bash +git clone -b {{ site.release.broker_branch }} https://github.com/thingsboard/tbmq.git +cd tbmq/k8s/azure +``` +{: .copy-code} + +{% else %} +## Clone TBMQ PE K8S repository + +```bash +git clone -b {{ site.release.broker_branch }} https://github.com/thingsboard/tbmq-pe-k8s.git +cd tbmq-pe-k8s/azure +``` +{: .copy-code} +{% endif %} + +## Define environment variables + +{% include templates/mqtt-broker/install/azure/aks-define-env-variables.md %} + +## Configure and create AKS cluster + +{% include templates/mqtt-broker/install/azure/aks-configure-and-create-cluster.md %} + +## Update the context of kubectl + +{% include templates/mqtt-broker/install/azure/aks-update-kubectl-ctx.md %} + +## Provision PostgreSQL DB + +You’ll need to set up PostgreSQL on Azure. You may follow [this](https://learn.microsoft.com/en-us/azure/postgresql/flexible-server/quickstart-create-server-portal) guide, +but take into account the following requirements: + +* Keep your postgresql password in a safe place. We will refer to it later in this guide using **YOUR_AZURE_POSTGRES_PASSWORD**; +* Make sure your Azure Database for PostgreSQL version is 17.x; +* Make sure your Azure Database for PostgreSQL instance is accessible from the TBMQ cluster; +* Make sure you use "thingsboard_mqtt_broker" as the initial database name. + +**Note**: Use "High availability" enabled. It enables a lot of useful settings by default. + +Another way by which you can create Azure Database for PostgreSQL is using az tool (don’t forget to replace ‘POSTGRESS_USER’ and ‘POSTGRESS_PASS’ with your username and password): + +```bash +az postgres flexible-server create --location $AKS_LOCATION --resource-group $AKS_RESOURCE_GROUP \ + --name $TB_DATABASE_NAME --admin-user POSTGRESS_USER --admin-password POSTGRESS_PASS \ + --public-access 0.0.0.0 --storage-size 32 \ + --version 17 -d thingsboard_mqtt_broker +``` +{: .copy-code} + +`az postgres flexible-server create` has a lot of parameters, a few of them are: + +* **location** — Location. Values from: `az account list-locations`; +* **resource-group (or -g)** — Name of the resource group; +* **name** — Name of the server. The name can contain only lowercase letters, numbers, and the hyphen (-) character. Minimum 3 characters and maximum 63 characters; +* **admin-user** — Administrator username for the server. Once set, it cannot be changed; +* **admin-password** — The password of the administrator. Minimum 8 characters and maximum 128 characters. Password must contain characters from three of the following categories: English uppercase letters, English lowercase letters, numbers, and non-alphanumeric characters; +* **public-access** — Determines the public access. Enter single or range of IP addresses to be included in the allowed list of IPs. IP address ranges must be dash-separated and not contain any spaces. Specifying 0.0.0.0 allows public access from any resources deployed within Azure to access your server. Setting it to “None” sets the server in public access mode but does not create a firewall rule; +* **storage-size** — The storage capacity of the server. Minimum is 32 GiB and maximum is 16 TiB; +* **version** — Server major version; +* **high-availability** — enable or disable high-availability feature. High availability can only be set during flexible server creation (accepted values: Disabled, Enabled. Default value: Disabled); +* **database-name (or -d)** — The name of the database to be created when provisioning the database server. + +You can see the full parameters list [here](https://learn.microsoft.com/en-us/cli/azure/postgres/flexible-server?view=azure-cli-latest#az_postgres_flexible_server_create). + +Example of response: + +```text +{ + "connectionString": "postgresql://postgres:postgres@$tbmq-db.postgres.database.azure.com/postgres?sslmode=require", + "databaseName": "thingsboard_mqtt_broker", + "firewallName": "AllowAllAzureServicesAndResourcesWithinAzureIps_2021-11-17_15-45-6", + "host": "tbmq-db.postgres.database.azure.com", + "id": "/subscriptions/daff3288-1d5d-47c7-abf0-bfb7b738a18c/resourceGroups/myResourceGroup/providers/Microsoft.DBforPostgreSQL/flexibleServers/thingsboard_mqtt_broker", + "location": "East US", + "password": "postgres", + "resourceGroup": "TBMQResources", + "skuname": "Standard_D2s_v3", + "username": "postgres", + "version": "17" +} +``` + +Note the value of the host from the command output (**tbmq-db.postgres.database.azure.com** in our case). Also, note username and password (**postgres**) from the command. + +Edit the database settings file and replace YOUR_AZURE_POSTGRES_ENDPOINT_URL with the host value, YOUR_AZURE_POSTGRES_USER and YOUR_AZURE_POSTGRES_PASSWORD with the correct values: + +```bash +nano tbmq-db-configmap.yml +``` +{: .copy-code} + +## Azure Cache for Valkey + +TBMQ {{tbmqSuffix}} relies on **Valkey** to store messages for [DEVICE persistent clients](/docs/{{docsPrefix}}mqtt-broker/architecture/#persistent-device-client). +The cache also improves performance by reducing the number of direct database reads, especially when authentication is enabled and multiple clients connect at once. +Without caching, every new connection triggers a database query to validate MQTT client credentials, which can cause the unnecessary load under high connection rates. + +{% capture valkey-azure-version %} +**Note:** Starting from **TBMQ {{tbmqSuffix}} {{valkey_from_version}}**, [Valkey](https://valkey.io/) **8.0** is officially supported. +Azure currently does **not** provide a managed Valkey service. However, Valkey is fully compatible with **Redis 7.2.x**, which is supported on Azure **Cache for Redis Enterprise** and **Enterprise Flash** SKUs. +The Basic, Standard, and Premium SKUs only support up to **Redis 6.x**, and are therefore **not recommended** for TBMQ deployments. +To ensure compatibility with TBMQ {{tbmqSuffix}} {{valkey_from_version}} and later, deploy your own Valkey cluster or use an Enterprise-tier SKU. +{% endcapture %} +{% include templates/info-banner.md content=valkey-azure-version %} + +You can choose one of the following paths depending on your environment: + +- [Deploy a Valkey cluster on AKS (Recommended)](https://learn.microsoft.com/en-us/azure/aks/valkey-overview) +- [Quickstart: Create a Redis Enterprise cache](https://learn.microsoft.com/en-us/azure/redis/quickstart-create-managed-redis) + +Once your Azure Cache is ready, update the cache configuration in `tbmq-cache-configmap.yml` with the correct endpoint values: + +* **For standalone Redis**: + Uncomment and set the following values. Make sure the `REDIS_HOST` value does **not** include the port (`:6379`). + + ```yaml + REDIS_CONNECTION_TYPE: "standalone" + REDIS_HOST: "YOUR_VALKEY_ENDPOINT_URL_WITHOUT_PORT" + #REDIS_PASSWORD: "YOUR_REDIS_PASSWORD" + ``` + +* **For Valkey cluster**: + Provide a comma-separated list of "host:port" node endpoints to bootstrap from. + + ```yaml + REDIS_CONNECTION_TYPE: "cluster" + REDIS_NODES: "COMMA_SEPARATED_LIST_OF_NODES" + #REDIS_PASSWORD: "YOUR_REDIS_PASSWORD" + # Recommended in Kubernetes for handling dynamic IPs and failover: + #REDIS_LETTUCE_CLUSTER_TOPOLOGY_REFRESH_ENABLED: "true" + #REDIS_JEDIS_CLUSTER_TOPOLOGY_REFRESH_ENABLED: "true" + ``` + +## Installation + +Execute the following command to run the initial setup of the database. +This command will launch a short-living TBMQ pod to provision necessary DB tables, indexes, etc. + +```bash +./k8s-install-tbmq.sh +``` +{: .copy-code} + +After this command is finished, you should see the next line in the console: + +```text +INFO o.t.m.b.i.ThingsboardMqttBrokerInstallService - Installation finished successfully! +``` + +{% capture aws-rds %} + +Otherwise, please check if you set the PostgreSQL URL and PostgreSQL password in the `tbmq-db-configmap.yml` correctly. + +{% endcapture %} +{% include templates/info-banner.md content=aws-rds %} + +{% include templates/mqtt-broker/install/cluster-common/configure-license-key.md %} + +## Provision Kafka + +{% include templates/mqtt-broker/install/cluster-common/provision-kafka-new.md %} + +## Starting + +{% include templates/mqtt-broker/install/cluster-common/starting.md %} + +## Configure Load Balancers + +### Configure HTTP(S) Load Balancer + +Configure HTTP(S) Load Balancer to access the web interface of your TBMQ {{tbmqSuffix}} instance. Basically, you have 2 possible options of configuration: + +* http — Load Balancer without HTTPS support. Recommended for **development**. The only advantage is simple configuration and minimum costs. May be a good option for development server but definitely not suitable for production. +* https — Load Balancer with HTTPS support. Recommended for **production**. Acts as an SSL termination point. You may easily configure it to issue and maintain a valid SSL certificate. Automatically redirects all non-secure (HTTP) traffic to secure (HTTPS) port. + +See links/instructions below on how to configure each of the suggested options. + +#### HTTP Load Balancer + +{% include templates/mqtt-broker/install/cluster-common/configure-http-load-balancer.md %} + +#### HTTPS Load Balancer + +For using ssl certificates, we can add our certificate directly in Azure ApplicationGateway using the following command: + +```bash +az network application-gateway ssl-cert create \ + --resource-group $(az aks show --name $TB_CLUSTER_NAME --resource-group $AKS_RESOURCE_GROUP --query nodeResourceGroup | tr -d '"') \ + --gateway-name $AKS_GATEWAY\ + --name TBMQHTTPSCert \ + --cert-file YOUR_CERT \ + --cert-password YOUR_CERT_PASS +``` +{: .copy-code} + +Execute the following command to deploy plain https load balancer: + +```bash +kubectl apply -f receipts/https-load-balancer.yml +``` +{: .copy-code} + +### Configure MQTT Load Balancer + +{% include templates/mqtt-broker/install/cluster-common/configure-mqtt-load-balancer.md %} + +## Validate the setup + +{% include templates/mqtt-broker/install/cluster-common/validate-the-setup.md %} + +### Validate MQTT access + +{% include templates/mqtt-broker/install/cluster-common/validate-mqtt-access.md %} + +### Troubleshooting + +{% include templates/mqtt-broker/install/cluster-common/troubleshooting.md %} + +## Upgrading + +{% include templates/mqtt-broker/upgrade/upgrading.md %} + +### Backup and restore (Optional) + +While backing up your PostgreSQL database is highly recommended, it is optional before proceeding with the upgrade. +For further guidance, follow the [next instructions](https://learn.microsoft.com/en-us/azure/postgresql/flexible-server/concepts-backup-restore). + +{% if docsPrefix == null %} + +### Upgrade to 2.2.0 + +In this release, the MQTT authentication mechanism was migrated from YAML/env configuration into the database. +During upgrade, TBMQ needs to know which authentication providers are enabled in your deployment. +This information is provided through environment variables passed to the **upgrade pod**. + +The upgrade script requires a file named **`database-setup.yml`** that explicitly defines these variables. +Environment variables from your `tb-broker.yml` file are not applied during the upgrade — only the values in `database-setup.yml` will be used. + +> **Tips** +> If you use only Basic authentication, set `SECURITY_MQTT_SSL_ENABLED=false`. +> If you use only X.509 authentication, set `SECURITY_MQTT_BASIC_ENABLED=false` and `SECURITY_MQTT_SSL_ENABLED=true`. + +**Supported variables** + +* `SECURITY_MQTT_BASIC_ENABLED` (`true|false`) +* `SECURITY_MQTT_SSL_ENABLED` (`true|false`) +* `SECURITY_MQTT_SSL_SKIP_VALIDITY_CHECK_FOR_CLIENT_CERT` (`true|false`) — usually `false`. + +Once the file is prepared and the values verified, proceed with the [upgrade process](#run-upgrade). + +### Upgrade to 2.1.0 + +{% include templates/mqtt-broker/upgrade/update-to-2.1.0-release-cluster.md %} + +### Upgrade to 2.0.0 + +For the TBMQ v2.0.0 upgrade, if you haven't installed Redis yet, please follow [step 6](#step-6-azure-cache-for-valkey) to complete the installation. +Only then you can proceed with the [upgrade](#run-upgrade). + +### Run upgrade + +In case you would like to upgrade, please pull the recent changes from the latest release branch: + +```bash +git pull origin {{ site.release.broker_branch }} +``` +{: .copy-code} + +{% include templates/mqtt-broker/upgrade/upgrade-to-custom-release.md %} + +**Note**: Make sure custom changes of yours if available are not lost during the merge process. + +{% include templates/mqtt-broker/install/upgrade-hint.md %} + +After that, execute the following command: + +{% capture tabspec %}tbmq-upgrade +tbmq-upgrade-without-from-version,Since v2.1.0,shell,resources/upgrade-options/k8s-upgrade-tbmq-without-from-version.sh,/docs/{{docsPrefix}}mqtt-broker/install/cluster/resources/upgrade-options/k8s-upgrade-tbmq-without-from-version.sh +tbmq-upgrade-with-from-version,Before v2.1.0,markdown,resources/upgrade-options/k8s-upgrade-tbmq-with-from-version.md,/docs/{{docsPrefix}}mqtt-broker/install/cluster/resources/upgrade-options/k8s-upgrade-tbmq-with-from-version.md{% endcapture %} +{% include tabs.html %} + +{% include templates/mqtt-broker/upgrade/stop-tbmq-pods-before-upgrade.md %} + +{% else %} + +{% include templates/mqtt-broker/install/cluster-common/k8s-type-upgrade-ce-to-pe.md %} + +{% endif %} + +## Cluster deletion + +Execute the following command to delete TBMQ nodes: + +```bash +./k8s-delete-tbmq.sh +``` +{: .copy-code} + +Execute the following command to delete all TBMQ nodes and configmaps, load balancers, etc.: + +```bash +./k8s-delete-all.sh +``` +{: .copy-code} + +Execute the following command to delete the AKS cluster: + +```bash +az aks delete --resource-group $AKS_RESOURCE_GROUP --name $TB_CLUSTER_NAME +``` +{: .copy-code} + +## Next steps + +{% assign currentGuide = "InstallationGuides" %}{% include templates/mqtt-broker-guides-banner.md %} diff --git a/_includes/docs/mqtt-broker/install/cluster/docker-compose-setup-old.md b/_includes/docs/mqtt-broker/install/cluster/docker-compose-setup-old.md new file mode 100644 index 0000000000..63d1ae2441 --- /dev/null +++ b/_includes/docs/mqtt-broker/install/cluster/docker-compose-setup-old.md @@ -0,0 +1,285 @@ + +* TOC +{:toc} + + +This guide will help you set up TBMQ in cluster mode using Docker Compose. + +## Prerequisites + +- [Install Docker](https://docs.docker.com/engine/installation/) + +{% include templates/install/docker-install-note.md %} + +## Step 1. Pull TBMQ Image + +Make sure your have [logged in](https://docs.docker.com/engine/reference/commandline/login/) to docker hub using command line. + +```bash +docker pull thingsboard/tbmq-node:{{ site.release.broker_full_ver }} +``` +{: .copy-code} + +## Step 2. Clone TBMQ repository + +```bash +git clone -b {{ site.release.broker_branch }} https://github.com/thingsboard/tbmq.git +cd tbmq/docker +``` +{: .copy-code} + +## Step 3. Installation + +Execute the following command to create necessary volumes for all the services and to update the haproxy config in the created volume. + +```bash +./scripts/docker-create-volumes.sh +``` +{: .copy-code} + +Execute the following command to run installation: + +```bash +./scripts/docker-install-tbmq.sh +``` +{: .copy-code} + +## Step 4. Running + +Execute the following command to start services: + +```bash +./scripts/docker-start-services.sh +``` +{: .copy-code} + +After a while when all services will be successfully started you can make requests to `http://{your-host-ip}` +in you browser (e.g. **http://localhost**) and connect clients using MQTT protocol on 1883 port. + +{% include templates/mqtt-broker/login.md %} + +## Step 5. Logs, stop and start commands + +In case of any issues you can examine service logs for errors. +For example to see TBMQ logs execute the following command: + +```bash +docker compose logs -f tbmq1 +``` +{: .copy-code} + +Or use the following command to see the state of all the containers. +```bash +docker compose ps +``` +{: .copy-code} +Use next command to inspect the logs of all running services. +```bash +docker compose logs -f +``` +{: .copy-code} +See [docker compose logs](https://docs.docker.com/compose/reference/logs/) command reference for more details. + +Execute the following command to stop services: + +```bash +./scripts/docker-stop-services.sh +``` +{: .copy-code} + +Execute the following command to stop and completely remove deployed docker containers: + +```bash +./scripts/docker-remove-services.sh +``` +{: .copy-code} + +In case you want to remove docker volumes for all the containers, execute the following command. +**Note:** it will remove all your data, so be careful before executing it. + +```bash +./scripts/docker-remove-volumes.sh +``` +{: .copy-code} + +It could be useful to update logs (enable DEBUG/TRACE logs) in runtime or change TBMQ or Haproxy configs. In order to do +this you need to make changes, for example, to the +_haproxy.cfg_ or _logback.xml_ file. +Afterward, execute the next command to apply the changes for the container: + +```bash +./scripts/docker-refresh-config.sh +``` +{: .copy-code} + +To reload HAProxy's configuration without restarting the Docker container you can send the HUP signal to this process (PID 1): + +``` +docker exec -it haproxy-certbot sh -c "kill -HUP 1" +``` +{: .copy-code} + +## Upgrading + +{% include templates/mqtt-broker/upgrade/upgrading.md %} + +### Backup and restore (Optional) + +While backing up your PostgreSQL database is highly recommended, it is optional before proceeding with the upgrade. +For further guidance, follow the [next instructions](https://github.com/thingsboard/tbmq/blob/main/docker/backup-restore/README.md). + +### Upgrade to 2.2.0 + +In this release, the MQTT authentication mechanism was migrated from YAML/env configuration into the database. +During upgrade, TBMQ needs to know which authentication providers are enabled in your deployment. +This information is provided through environment variables passed to the **upgrade container**. + +The upgrade script requires a file named **`tb-mqtt-broker.env`** that explicitly defines these variables. +Environment variables from your `docker-compose.yml` file are not applied during the upgrade — only the values in `tb-mqtt-broker.env` will be used. + +> **Tips** +> If you use only Basic authentication, set `SECURITY_MQTT_SSL_ENABLED=false`. +> If you use only X.509 authentication, set `SECURITY_MQTT_BASIC_ENABLED=false` and `SECURITY_MQTT_SSL_ENABLED=true`. + +**Supported variables** + + * `SECURITY_MQTT_BASIC_ENABLED` (`true|false`) + * `SECURITY_MQTT_SSL_ENABLED` (`true|false`) + * `SECURITY_MQTT_SSL_SKIP_VALIDITY_CHECK_FOR_CLIENT_CERT` (`true|false`) — usually `false`. + +Once the file is prepared and the values verified, proceed with the [upgrade process](#run-upgrade). + +### Upgrade to 2.1.0 + +{% include templates/mqtt-broker/upgrade/update-to-2.1.0-release-docker-cluster.md %} + +### Run upgrade + +In case you would like to upgrade, please pull the recent changes from the latest release branch: + +```bash +git pull origin {{ site.release.broker_branch }} +``` +{: .copy-code} + +{% include templates/mqtt-broker/upgrade/upgrade-to-custom-release.md %} + +**Note**: Make sure custom changes of yours if available are not lost during the merge process. +Make sure `TBMQ_VERSION` in .env file is set to the target version (e.g., set it to {{ site.release.broker_full_ver }} if you are upgrading to the latest). + +{% include templates/mqtt-broker/install/upgrade-hint.md %} + +After that, execute the following commands: + +{% capture tabspec %}tbmq-upgrade +tbmq-upgrade-without-from-version,Since v2.1.0,shell,resources/upgrade-options/docker-compose-upgrade-tbmq-without-from-version.md,/docs/{{docsPrefix}}mqtt-broker/install/cluster/resources/upgrade-options/docker-compose-upgrade-tbmq-without-from-version.md +tbmq-upgrade-with-from-version,Before v2.1.0,markdown,resources/upgrade-options/docker-compose-upgrade-tbmq-with-from-version.md,/docs/{{docsPrefix}}mqtt-broker/install/cluster/resources/upgrade-options/docker-compose-upgrade-tbmq-with-from-version.md{% endcapture %} +{% include tabs.html %} + +## Generate certificate for HTTPS + +We are using HAproxy for proxying traffic to containers and for web UI by default we are using 80 and 443 ports. +For using HTTPS with a valid certificate, execute these commands: + +```bash +docker exec haproxy-certbot certbot-certonly --domain your_domain --email your_email +docker exec haproxy-certbot haproxy-refresh +``` +{: .copy-code} + +**Note**: Valid certificate is used only when you visit web UI by domain in URL. + +## Enable MQTTS (MQTT over SSL/TLS) + +**MQTTS** allows clients to connect to TBMQ over an encrypted TLS/SSL channel, ensuring the confidentiality and integrity of MQTT messages in transit. +There are two common deployment options: + +* **Two-way MQTTS (Mutual TLS)** – TBMQ terminates TLS, and clients must present valid certificates for authentication. +* **One-way MQTTS (TLS termination at Load Balancer)** – HAProxy or another load balancer handles TLS termination, and forwards plain MQTT traffic to TBMQ over a trusted internal network. + +Both approaches protect external connections with encryption, but **two-way MQTTS** adds client certificate verification for higher security, +while **one-way MQTTS** simplifies broker configuration and can reuse existing HTTPS certificates on the load balancer. + +### Two-way MQTTS + +In this configuration, TBMQ itself handles TLS termination and (optionally) client certificate authentication. +This approach is suitable when you want the broker to fully control SSL/TLS and mutual authentication without relying on a load balancer for security. + +To enable **MQTT over SSL (MQTTS)**, you need to provide valid SSL certificates and configure TBMQ to use them. + +For more information on supported certificate formats and options, refer to the [MQTT over SSL](/docs/{{docsPrefix}}mqtt-broker/security/mqtts/) documentation. + +**Provide SSL Certificates** + +Obtain a valid SSL certificate and private key. For example: + +* `mqttserver.pem` – your public certificate (may include full chain); +* `mqttserver_key.pem` – your private key. + +> Self-signed certificates are supported for testing, but we recommend using certificates from a trusted Certificate Authority for production environments. + +**Mount Certificates into Containers** + +Open your `docker-compose.yml` file and **uncomment** the volume line that mounts the certificate files: + +```yaml +volumes: + - PATH_TO_CERTS:/config/certificates +``` +{: .copy-code} + +Replace `PATH_TO_CERTS` with the path to the folder containing your certificate files. Make sure TBMQ can access those file. + +**Configure Environment Variables** + +Edit the `tb-mqtt-broker.env` file and **uncomment/configure** the following lines to enable SSL: + +```yaml +LISTENER_SSL_ENABLED=true +LISTENER_SSL_PEM_CERT=/config/certificates/mqttserver.pem +LISTENER_SSL_PEM_KEY=/config/certificates/mqttserver_key.pem +LISTENER_SSL_PEM_KEY_PASSWORD=server_key_password +``` +{: .copy-code} + +> Adjust the file paths and password as needed. If your private key is not password-protected, you can leave `LISTENER_SSL_PEM_KEY_PASSWORD` empty. + +**Restart Services** + +Apply the changes by restarting TBMQ services: + +```bash +./scripts/docker-start-services.sh +``` +{: .copy-code} + +Once started, your MQTT clients will be able to securely connect to port **8883** using TLS/SSL. + +### One-way MQTTS + +In this setup, TLS is terminated at the load balancer (HAProxy). +Clients connect securely to HAProxy over MQTTS (port 8883), and HAProxy forwards plain MQTT (unencrypted) to TBMQ over the internal network (port 1883). +You can reuse the same certificate you already use for HTTPS. + +Point HAProxy to your certificate bundle (PEM with full chain + private key). If you reuse the HTTPS cert, reference the same bundle. +Locate and update the _haproxy.cfg_ file: + +```text + listen mqtts-in + bind *:${MQTTS_PORT} ssl crt /usr/local/etc/haproxy/certs.d/fullchain-and-key.pem + mode tcp + option clitcpka # For TCP keep-alive + timeout client 3h + timeout server 3h + option tcplog + balance leastconn + server tbMqtt1 tbmq1:1883 check inter 5s resolvers docker_resolver resolve-prefer ipv4 + server tbMqtt2 tbmq2:1883 check inter 5s resolvers docker_resolver resolve-prefer ipv4 +``` +{: .copy-code} + +> **Note:** Replace _fullchain-and-key.pem_ with the actual filename of your certificate bundle. + +## Next steps + +{% assign currentGuide = "InstallationGuides" %}{% include templates/mqtt-broker-guides-banner.md %} diff --git a/_includes/docs/mqtt-broker/install/cluster/docker-compose-setup.md b/_includes/docs/mqtt-broker/install/cluster/docker-compose-setup.md new file mode 100644 index 0000000000..a2987e08df --- /dev/null +++ b/_includes/docs/mqtt-broker/install/cluster/docker-compose-setup.md @@ -0,0 +1,359 @@ + +* TOC +{:toc} + + +This guide will help you set up TBMQ {{tbmqSuffix}} in cluster mode using Docker Compose. + +## Prerequisites + +- [Install Docker](https://docs.docker.com/engine/installation/) + +{% include templates/install/docker-install-note.md %} + +## Pull TBMQ {{tbmqSuffix}} Image + +Make sure you have [logged in](https://docs.docker.com/engine/reference/commandline/login/) to docker hub using the command line. + +{% if docsPrefix == null %} +```bash +docker pull thingsboard/tbmq-node:{{ site.release.broker_full_ver }} +docker pull thingsboard/tbmq-integration-executor:{{ site.release.broker_full_ver }} +``` +{: .copy-code} +{% else %} +```bash +docker pull thingsboard/tbmq-pe-node:{{ site.release.pe_broker_full_ver }} +docker pull thingsboard/tbmq-pe-integration-executor:{{ site.release.pe_broker_full_ver }} +``` +{: .copy-code} +{% endif %} + +{% if docsPrefix == null %} +## Clone TBMQ repository + +```bash +git clone -b {{ site.release.broker_branch }} https://github.com/thingsboard/tbmq.git +cd tbmq/docker +``` +{: .copy-code} +{% else %} +## Clone TBMQ PE Docker Compose repository + +```bash +git clone -b {{ site.release.broker_branch }} https://github.com/thingsboard/tbmq-pe-docker-compose.git +cd tbmq-pe-docker-compose/cluster +``` +{: .copy-code} +{% endif %} + +{% if docsPrefix == "pe/" %} +## Get the license key + +Before proceeding, make sure you’ve selected your subscription plan or chosen to purchase a perpetual license. +If you haven’t done this yet, please visit the [Pricing page](/pricing/?section=tbmq-options){: target="_blank"} to compare available options +and obtain your license key. + +> **Note:** Throughout this guide, we’ll refer to your license key as **YOUR_LICENSE_KEY_HERE**. + +## Configure the license key + +```bash +nano tbmq.env +``` +{: .copy-code} + +and put the license secret parameter instead of "YOUR_LICENSE_KEY_HERE": + +```text +# License info +TBMQ_LICENSE_SECRET=YOUR_LICENSE_KEY_HERE +``` + +{% endif %} + +## Installation + +Execute the following command to create the necessary volumes for all the services and to update the haproxy config in the created volume. + +```bash +./scripts/docker-create-volumes.sh +``` +{: .copy-code} + +Execute the following command to run the installation: + +```bash +./scripts/docker-install-tbmq.sh +``` +{: .copy-code} + +## Running + +Execute the following command to start services: + +```bash +./scripts/docker-start-services.sh +``` +{: .copy-code} + +After a while when all services will be successfully started you can make requests to `http://{your-host-ip}` +in you browser (e.g. **http://localhost**) and connect clients using MQTT protocol on 1883 port. + +{% include templates/mqtt-broker/login.md %} + +## Logs, stop and start commands + +In case of any issues, you can examine service logs for errors. +For example, to see TBMQ logs, execute the following command: + +```bash +docker compose logs -f tbmq1 +``` +{: .copy-code} + +Or use the following command to see the state of all the containers. +```bash +docker compose ps +``` +{: .copy-code} + +Use the next command to inspect the logs of all running services. + +```bash +docker compose logs -f +``` +{: .copy-code} + +See [docker compose logs](https://docs.docker.com/compose/reference/logs/) command reference for more details. + +Execute the following command to stop services: + +```bash +./scripts/docker-stop-services.sh +``` +{: .copy-code} + +Execute the following command to stop and completely remove deployed docker containers: + +```bash +./scripts/docker-remove-services.sh +``` +{: .copy-code} + +In case you want to remove docker volumes for all the containers, execute the following command. +**Note:** it will remove all your data, so be careful before executing it. + +```bash +./scripts/docker-remove-volumes.sh +``` +{: .copy-code} + +It could be useful to update logs (enable DEBUG/TRACE logs) in runtime or change TBMQ or Haproxy configs. In order to do +this, you need to make changes, for example, to the +_haproxy.cfg_ or _logback.xml_ file. +Afterward, execute the next command to apply the changes for the container: + +```bash +./scripts/docker-refresh-config.sh +``` +{: .copy-code} + +To reload HAProxy's configuration without restarting the Docker container, you can send the HUP signal to this process (PID 1): + +``` +docker exec -it haproxy-certbot sh -c "kill -HUP 1" +``` +{: .copy-code} + +## Upgrading + +{% include templates/mqtt-broker/upgrade/upgrading.md %} + +### Backup and restore (Optional) + +While backing up your PostgreSQL database is highly recommended, it is optional before proceeding with the upgrade. +{% if docsPrefix == null %} For further guidance, follow the [next instructions](https://github.com/thingsboard/tbmq/blob/main/docker/backup-restore/README.md). +{% else %} For further guidance, follow the [next instructions](https://github.com/thingsboard/tbmq-pe-docker-compose/blob/master/cluster/backup-restore/README.md). +{% endif %} + +{% if docsPrefix == null %} + +### Upgrade to 2.2.0 + +In this release, the MQTT authentication mechanism was migrated from YAML/env configuration into the database. +During upgrade, TBMQ needs to know which authentication providers are enabled in your deployment. +This information is provided through environment variables passed to the **upgrade container**. + +The upgrade script requires a file named **`tb-mqtt-broker.env`** that explicitly defines these variables. +Environment variables from your `docker-compose.yml` file are not applied during the upgrade — only the values in `tb-mqtt-broker.env` will be used. + +> **Tips** +> If you use only Basic authentication, set `SECURITY_MQTT_SSL_ENABLED=false`. +> If you use only X.509 authentication, set `SECURITY_MQTT_BASIC_ENABLED=false` and `SECURITY_MQTT_SSL_ENABLED=true`. + +**Supported variables** + + * `SECURITY_MQTT_BASIC_ENABLED` (`true|false`) + * `SECURITY_MQTT_SSL_ENABLED` (`true|false`) + * `SECURITY_MQTT_SSL_SKIP_VALIDITY_CHECK_FOR_CLIENT_CERT` (`true|false`) — usually `false`. + +Once the file is prepared and the values verified, proceed with the [upgrade process](#run-upgrade). + +### Upgrade to 2.1.0 + +{% include templates/mqtt-broker/upgrade/update-to-2.1.0-release-docker-cluster.md %} + +{% else %} + +### Upgrade from TBMQ CE to TBMQ PE (v2.2.0) + +To upgrade your existing **TBMQ Community Edition (CE)** to **TBMQ Professional Edition (PE)**, ensure you are running the latest **TBMQ CE {{site.release.broker_full_ver}}** version before starting the process. +Merge your current configuration with the latest [TBMQ PE Docker Compose scripts](https://github.com/thingsboard/tbmq-pe-docker-compose/tree/{{ site.release.broker_branch }}). +Do not forget to [configure the license key](#configure-the-license-key). + +Run the following commands, including the upgrade script to migrate PostgreSQL database data from CE to PE: + +```bash +./scripts/docker-stop-services.sh +./scripts/docker-upgrade-tbmq.sh --fromVersion=ce +./scripts/docker-start-services.sh +``` +{: .copy-code} + +{% endif %} + +{% if docsPrefix == null %} + +### Run upgrade + +In case you would like to upgrade, please pull the recent changes from the latest release branch: + +```bash +git pull origin {{ site.release.broker_branch }} +``` +{: .copy-code} + +{% include templates/mqtt-broker/upgrade/upgrade-to-custom-release.md %} + +**Note**: Make sure custom changes of yours if available are not lost during the merge process. +Make sure `TBMQ_VERSION` in .env file is set to the target version (e.g., set it to {{ site.release.broker_full_ver }} if you are upgrading to the latest). + +{% include templates/mqtt-broker/install/upgrade-hint.md %} + +After that, execute the following commands: + +{% capture tabspec %}tbmq-upgrade +tbmq-upgrade-without-from-version,Since v2.1.0,shell,resources/upgrade-options/docker-compose-upgrade-tbmq-without-from-version.md,/docs/{{docsPrefix}}mqtt-broker/install/cluster/resources/upgrade-options/docker-compose-upgrade-tbmq-without-from-version.md +tbmq-upgrade-with-from-version,Before v2.1.0,markdown,resources/upgrade-options/docker-compose-upgrade-tbmq-with-from-version.md,/docs/{{docsPrefix}}mqtt-broker/install/cluster/resources/upgrade-options/docker-compose-upgrade-tbmq-with-from-version.md{% endcapture %} +{% include tabs.html %} + +{% endif %} + +## Generate certificate for HTTPS + +We are using HAproxy for proxying traffic to containers and for web UI. By default, we are using 80 and 443 ports. +For using HTTPS with a valid certificate, execute these commands: + +```bash +docker exec haproxy-certbot certbot-certonly --domain your_domain --email your_email +docker exec haproxy-certbot haproxy-refresh +``` +{: .copy-code} + +**Note**: Valid certificate is used only when you visit web UI by domain in URL. + +## Enable MQTTS (MQTT over SSL/TLS) + +**MQTTS** allows clients to connect to TBMQ over an encrypted TLS/SSL channel, ensuring the confidentiality and integrity of MQTT messages in transit. +There are two common deployment options: + +* **Two-way MQTTS (Mutual TLS)** – TBMQ terminates TLS, and clients must present valid certificates for authentication. +* **One-way MQTTS (TLS termination at Load Balancer)** – HAProxy or another load balancer handles TLS termination, and forwards plain MQTT traffic to TBMQ over a trusted internal network. + +Both approaches protect external connections with encryption, but **two-way MQTTS** adds client certificate verification for higher security, +while **one-way MQTTS** simplifies broker configuration and can reuse existing HTTPS certificates on the load balancer. + +### Two-way MQTTS + +In this configuration, TBMQ itself handles TLS termination and (optionally) client certificate authentication. +This approach is suitable when you want the broker to fully control SSL/TLS and mutual authentication without relying on a load balancer for security. + +To enable **MQTT over SSL (MQTTS)**, you need to provide valid SSL certificates and configure TBMQ to use them. + +For more information on supported certificate formats and options, refer to the [MQTT over SSL](/docs/{{docsPrefix}}mqtt-broker/security/mqtts/) documentation. + +**Provide SSL Certificates** + +Obtain a valid SSL certificate and private key. For example: + +* `mqttserver.pem` – your public certificate (may include full chain); +* `mqttserver_key.pem` – your private key. + +> Self-signed certificates are supported for testing, but we recommend using certificates from a trusted Certificate Authority for production environments. + +**Mount Certificates into Containers** + +Open your `docker-compose.yml` file and **uncomment** the volume line that mounts the certificate files: + +```yaml +volumes: + - PATH_TO_CERTS:/config/certificates +``` +{: .copy-code} + +Replace `PATH_TO_CERTS` with the path to the folder containing your certificate files. Make sure TBMQ can access those file. + +**Configure Environment Variables** + +Edit the `tbmq.env` file and **uncomment/configure** the following lines to enable SSL: + +```yaml +LISTENER_SSL_ENABLED=true +LISTENER_SSL_PEM_CERT=/config/certificates/mqttserver.pem +LISTENER_SSL_PEM_KEY=/config/certificates/mqttserver_key.pem +LISTENER_SSL_PEM_KEY_PASSWORD=server_key_password +``` +{: .copy-code} + +> Adjust the file paths and password as needed. If your private key is not password-protected, you can leave `LISTENER_SSL_PEM_KEY_PASSWORD` empty. + +**Restart Services** + +Apply the changes by restarting TBMQ services: + +```bash +./scripts/docker-start-services.sh +``` +{: .copy-code} + +Once started, your MQTT clients will be able to securely connect to port **8883** using TLS/SSL. + +### One-way MQTTS + +In this setup, TLS is terminated at the load balancer (HAProxy). +Clients connect securely to HAProxy over MQTTS (port 8883), and HAProxy forwards plain MQTT (unencrypted) to TBMQ over the internal network (port 1883). +You can reuse the same certificate you already use for HTTPS. + +Point HAProxy to your certificate bundle (PEM with full chain + private key). If you reuse the HTTPS cert, reference the same bundle. +Locate and update the _haproxy.cfg_ file: + +```text + listen mqtts-in + bind *:${MQTTS_PORT} ssl crt /usr/local/etc/haproxy/certs.d/fullchain-and-key.pem + mode tcp + option clitcpka # For TCP keep-alive + timeout client 3h + timeout server 3h + option tcplog + balance leastconn + server tbMqtt1 tbmq1:1883 check inter 5s resolvers docker_resolver resolve-prefer ipv4 + server tbMqtt2 tbmq2:1883 check inter 5s resolvers docker_resolver resolve-prefer ipv4 +``` +{: .copy-code} + +> **Note:** Replace _fullchain-and-key.pem_ with the actual filename of your certificate bundle. + +## Next steps + +{% assign currentGuide = "InstallationGuides" %}{% include templates/mqtt-broker-guides-banner.md %} diff --git a/_includes/docs/mqtt-broker/install/cluster/gcp-cluster-setup-old.md b/_includes/docs/mqtt-broker/install/cluster/gcp-cluster-setup-old.md new file mode 100644 index 0000000000..ecac5ec903 --- /dev/null +++ b/_includes/docs/mqtt-broker/install/cluster/gcp-cluster-setup-old.md @@ -0,0 +1,462 @@ +* TOC +{:toc} + +This guide will help you to setup TBMQ in microservices mode in GKE. + +## Prerequisites + +{% include templates/install/gcp/gke-prerequisites.md %} + +## Step 1. Clone TBMQ K8S scripts repository + +```bash +git clone -b {{ site.release.broker_branch }} https://github.com/thingsboard/tbmq.git +cd tbmq/k8s/gcp +``` +{: .copy-code} + +## Step 2. Define environment variables + +{% assign tbClusterName = "tbmq-cluster" %} +{% assign tbDbClusterName = "tbmq-db" %} +{% include templates/mqtt-broker/install/gcp/env-variables.md %} + +## Step 3. Configure and create GKE cluster + +{% include templates/install/gcp/regional-gke-cluster.md %} + +## Step 4. Update the context of kubectl + +{% include templates/install/gcp/update-kubectl-region.md %} + +## Step 5. Provision Google Cloud SQL (PostgreSQL) Instance + +{% assign tbDbName = "thingsboard_mqtt_broker" %} +{% include templates/install/gcp/provision-postgresql.md %} + +#### 5.5 Edit database settings + +Replace **YOUR_DB_IP_ADDRESS**, **YOUR_DB_PASSWORD** and **YOUR_DB_NAME** with the correct values: + +```bash +nano tb-broker-db-configmap.yml +``` +{: .copy-code} + +## Step 6. Create Namespace + +Let's create a dedicated namespace for our TBMQ cluster deployment to ensure better resource isolation and management. + +```bash +kubectl apply -f tb-broker-namespace.yml +kubectl config set-context $(kubectl config current-context) --namespace=thingsboard-mqtt-broker +``` +{: .copy-code} + +## Step 7. Provision Redis cluster + +We recommend deploying Bitnami Redis Cluster from Helm. For that, review the `redis` folder. + +```bash +ls redis/ +``` +{: .copy-code} + +You can find there _default-values-redis.yml_ file - +default values downloaded from [Bitnami artifactHub](https://artifacthub.io/packages/helm/bitnami/redis-cluster). +And _values-redis.yml_ file with modified values. +We recommend keeping the first file untouched and making changes to the second one only. This way the upgrade process to the next version will go more smoothly as it will be possible to see diff. + +To add the Bitnami helm repo: + +```bash +helm repo add bitnami https://charts.bitnami.com/bitnami +helm repo update +``` +{: .copy-code} + +To install Bitnami Redis cluster, execute the following command: + +```bash +helm install redis -f redis/values-redis.yml bitnami/redis-cluster --version 10.2.5 +``` +{: .copy-code} + +Once deployed, you should see the information about deployment state, followed by the command to get your REDIS_PASSWORD: + +```text +NAME: redis +LAST DEPLOYED: Tue Apr 8 11:22:44 2025 +NAMESPACE: thingsboard-mqtt-broker +STATUS: deployed +REVISION: 1 +TEST SUITE: None +NOTES: +CHART NAME: redis-cluster +CHART VERSION: 10.2.5 +APP VERSION: 7.2.5** Please be patient while the chart is being deployed ** + + +To get your password run: + export REDIS_PASSWORD=$(kubectl get secret --namespace "thingsboard-mqtt-broker" redis-redis-cluster -o jsonpath="{.data.redis-password}" | base64 -d) +``` + +Let's modify this command to print the password to the terminal: + +```bash +echo $(kubectl get secret --namespace "thingsboard-mqtt-broker" redis-redis-cluster -o jsonpath="{.data.redis-password}" | base64 -d) +``` +{: .copy-code} + +You need to copy the output and paste it into the _tb-broker-cache-configmap.yml_ file, replacing `YOUR_REDIS_PASSWORD`. + +```bash +nano tb-broker-cache-configmap.yml +``` +{: .copy-code} + +{% capture redis-nodes %} + +The value of `REDIS_NODES` in _tb-broker-cache-configmap.yml_ is set to `"redis-redis-cluster-headless:6379"` by default. +The host name is based on the release name (redis) and the default naming conventions of the Bitnami chart. +If you modify the `nameOverride` or `fullnameOverride` fields in your Redis values file, or change the release name during installation, +you must update this value accordingly to match the actual headless service name created by the chart. + +{% endcapture %} +{% include templates/info-banner.md content=redis-nodes %} + +## Step 8. Installation + +{% include templates/mqtt-broker/install/gcp/install.md %} + +{% capture aws-rds %} + +Otherwise, please check if you set the PostgreSQL URL and PostgreSQL password in the `tb-broker-db-configmap.yml` correctly. + +{% endcapture %} +{% include templates/info-banner.md content=aws-rds %} + +## Step 9. Provision Kafka + +{% include templates/mqtt-broker/install/cluster-common/provision-kafka.md %} + +## Step 10. Starting + +Execute the following command to deploy the broker: + +```bash +./k8s-deploy-tbmq.sh +``` +{: .copy-code} + +After a few minutes, you may execute the next command to check the state of all pods. + +```bash +kubectl get pods +``` +{: .copy-code} + +If everything went fine, you should be able to see `tb-broker-0` and `tb-broker-1` pods. Every pod should be in the `READY` state. + +## Step 11. Configure Load Balancers + +### 11.1 Configure HTTP(S) Load Balancer + +Configure HTTP(S) Load Balancer to access web interface of your TBMQ instance. Basically, you have 2 possible configuration options: + +* http - Load Balancer without HTTPS support. Recommended for **development**. The only advantage is simple configuration and minimum costs. May be good option for development server but definitely not suitable for production. +* https - Load Balancer with HTTPS support. Recommended for **production**. Acts as an SSL termination point. You may easily configure it to issue and maintain a valid SSL certificate. Automatically redirects all non-secure (HTTP) traffic to secure (HTTPS) port. + +See links/instructions below on how to configure each of the suggested options. + +#### HTTP Load Balancer + +Execute the following command to deploy plain http load balancer: + +```bash +kubectl apply -f receipts/http-load-balancer.yml +``` +{: .copy-code} + +The process of load balancer provisioning may take some time. You may periodically check the status of the load balancer using the following command: + +```bash +kubectl get ingress +``` +{: .copy-code} + +Once provisioned, you should see similar output: + +```text +NAME CLASS HOSTS ADDRESS PORTS AGE +tb-broker-http-loadbalancer * 34.111.24.134 80 7m25s +``` + +#### HTTPS Load Balancer + +{% assign staticIP = "tbmq-http-lb-address" %} +The process of configuring the load balancer using Google-managed SSL certificates is described on the official [documentation page](https://cloud.google.com/kubernetes-engine/docs/how-to/managed-certs). +The instructions below are extracted from the official documentation. Make sure you read [prerequisites](https://cloud.google.com/kubernetes-engine/docs/how-to/managed-certs#prerequisites) carefully before proceeding. + +```bash +gcloud compute addresses create {{staticIP}} --global +``` +{: .copy-code} + +Replace the *PUT_YOUR_DOMAIN_HERE* with valid domain name in the *https-load-balancer.yml* file: + +```bash +nano receipts/https-load-balancer.yml +``` +{: .copy-code} + +Execute the following command to deploy secure http load balancer: + +```bash + kubectl apply -f receipts/https-load-balancer.yml +``` +{: .copy-code} + +The process of load balancer provisioning may take some time. You may periodically check the status of the load balancer using the following command: + +```bash +kubectl get ingress +``` +{: .copy-code} + +Once provisioned, you should see similar output: + +```text +NAME CLASS HOSTS ADDRESS PORTS AGE +tb-broker-https-loadbalancer gce * 34.111.24.134 80 7m25s +``` + +Now, **assign the domain name** you have used to the load balancer IP address (the one you see instead of 34.111.24.134 in the command output). + +Check that the domain name is configured correctly using dig: + +```bash +dig YOUR_DOMAIN_NAME +``` +{: .copy-code} + +Sample output: + +```text + +; <<>> DiG 9.11.3-1ubuntu1.16-Ubuntu <<>> YOUR_DOMAIN_NAME +;; global options: +cmd +;; Got answer: +;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 12513 +;; flags: qr rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 0, ADDITIONAL: 1 + +;; OPT PSEUDOSECTION: +; EDNS: version: 0, flags:; udp: 65494 +;; QUESTION SECTION: +;YOUR_DOMAIN_NAME. IN A + +;; ANSWER SECTION: +YOUR_DOMAIN_NAME. 36 IN A 34.111.24.134 + +;; Query time: 0 msec +;; SERVER: 127.0.0.53#53(127.0.0.53) +;; WHEN: Fri Nov 19 13:00:00 EET 2021 +;; MSG SIZE rcvd: 74 + +``` + +Once assigned, wait for the Google-managed certificate to finish provisioning. This might take up to 60 minutes. You can check the status of the certificate using the following command: + +```bash +kubectl describe managedcertificate managed-cert +``` +{: .copy-code} + +Certificate will be eventually provisioned if you have configured domain records properly. +Once provisioned, you may use your domain name to access Web UI (over https). + +### 11.2 Configure MQTT Load Balancer + +Configure MQTT load balancer to be able to use MQTT protocol to connect devices. + +Create TCP load balancer using following command: + +```bash +kubectl apply -f receipts/mqtt-load-balancer.yml +``` +{: .copy-code} + +The load balancer will forward all TCP traffic for ports 1883 and 8883. + +#### MQTT over SSL + +Follow [this guide](https://thingsboard.io/docs/user-guide/mqtt-over-ssl/) to create a .pem file with the SSL certificate. Store the file as _server.pem_ in the working directory. + +You’ll need to create a config-map with your PEM file, you can do it by calling command: + +```bash +kubectl create configmap tbmq-mqtts-config \ + --from-file=server.pem=YOUR_PEM_FILENAME \ + --from-file=mqttserver_key.pem=YOUR_PEM_KEY_FILENAME \ + -o yaml --dry-run=client | kubectl apply -f - +``` +{: .copy-code} + +* where **YOUR_PEM_FILENAME** is the name of your **server certificate file**. +* where **YOUR_PEM_KEY_FILENAME** is the name of your **server certificate private key file**. + +Then, uncomment all sections in the ‘tb-broker.yml’ file that are marked with “Uncomment the following lines to enable two-way MQTTS”. + +Execute command to apply changes: + +```bash +kubectl apply -f tb-broker.yml +``` +{: .copy-code} + +## Step 12. Validate the setup + +Now you can open TBMQ web interface in your browser using DNS name of the load balancer. + +You can get DNS name of the load-balancers using the next command: + +```bash +kubectl get ingress +``` +{: .copy-code} + +You should see the similar picture: + +```text +NAME CLASS HOSTS ADDRESS PORTS AGE +tb-broker-http-loadbalancer * 34.111.24.134 80 3d1h +``` + +Use `ADDRESS` field of the tb-broker-http-loadbalancer to connect to the cluster. + +{% include templates/mqtt-broker/login.md %} + +### Validate MQTT access + +To connect to the cluster via MQTT you will need to get corresponding service IP. You can do this with the command: + +```bash +kubectl get services +``` +{: .copy-code} + +You should see the similar picture: + +```text +NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE +tb-broker-mqtt-loadbalancer LoadBalancer 10.100.119.170 ******* 1883:30308/TCP,8883:31609/TCP 6m58s +``` + +Use `EXTERNAL-IP` field of the load-balancer to connect to the cluster via MQTT protocol. + +### Troubleshooting + +In case of any issues you can examine service logs for errors. For example to see TBMQ logs execute the following command: + +```bash +kubectl logs -f tb-broker-0 +``` +{: .copy-code} + +Use the next command to see the state of all statefulsets. +```bash +kubectl get statefulsets +``` +{: .copy-code} + +See [kubectl Cheat Sheet](https://kubernetes.io/docs/reference/kubectl/cheatsheet/) command reference for more details. + +## Upgrading + +{% include templates/mqtt-broker/upgrade/upgrading.md %} + +### Backup and restore (Optional) + +While backing up your PostgreSQL database is highly recommended, it is optional before proceeding with the upgrade. +For further guidance, follow the [next instructions](https://learn.microsoft.com/en-us/azure/postgresql/flexible-server/concepts-backup-restore). + +### Upgrade to 2.2.0 + +In this release, the MQTT authentication mechanism was migrated from YAML/env configuration into the database. +During upgrade, TBMQ needs to know which authentication providers are enabled in your deployment. +This information is provided through environment variables passed to the **upgrade pod**. + +The upgrade script requires a file named **`database-setup.yml`** that explicitly defines these variables. +Environment variables from your `tb-broker.yml` file are not applied during the upgrade — only the values in `database-setup.yml` will be used. + +> **Tips** +> If you use only Basic authentication, set `SECURITY_MQTT_SSL_ENABLED=false`. +> If you use only X.509 authentication, set `SECURITY_MQTT_BASIC_ENABLED=false` and `SECURITY_MQTT_SSL_ENABLED=true`. + +**Supported variables** + +* `SECURITY_MQTT_BASIC_ENABLED` (`true|false`) +* `SECURITY_MQTT_SSL_ENABLED` (`true|false`) +* `SECURITY_MQTT_SSL_SKIP_VALIDITY_CHECK_FOR_CLIENT_CERT` (`true|false`) — usually `false`. + +Once the file is prepared and the values verified, proceed with the [upgrade process](#run-upgrade). + +### Upgrade to 2.1.0 + +{% include templates/mqtt-broker/upgrade/update-to-2.1.0-release-cluster.md %} + +### Upgrade to 2.0.0 + +For the TBMQ v2.0.0 upgrade, if you haven't installed Redis yet, please follow [step 7](#step-7-provision-redis-cluster) to complete the installation. +Only then you can proceed with the [upgrade](#run-upgrade). + +### Run upgrade + +In case you would like to upgrade, please pull the recent changes from the latest release branch: + +```bash +git pull origin {{ site.release.broker_branch }} +``` +{: .copy-code} + +{% include templates/mqtt-broker/upgrade/upgrade-to-custom-release.md %} + +**Note**: Make sure custom changes of yours if available are not lost during the merge process. + +{% include templates/mqtt-broker/install/upgrade-hint.md %} + +After that, execute the following command: + +{% capture tabspec %}tbmq-upgrade +tbmq-upgrade-without-from-version,Since v2.1.0,shell,resources/upgrade-options/k8s-upgrade-tbmq-without-from-version.sh,/docs/mqtt-broker/install/cluster/resources/upgrade-options/k8s-upgrade-tbmq-without-from-version.sh +tbmq-upgrade-with-from-version,Before v2.1.0,markdown,resources/upgrade-options/k8s-upgrade-tbmq-with-from-version.md,/docs/mqtt-broker/install/cluster/resources/upgrade-options/k8s-upgrade-tbmq-with-from-version.md{% endcapture %} +{% include tabs.html %} + +{% include templates/mqtt-broker/upgrade/stop-tbmq-pods-before-upgrade.md %} + +## Cluster deletion + +Execute the following command to delete TBMQ nodes: + +```bash +./k8s-delete-tbmq.sh +``` +{: .copy-code} + +Execute the following command to delete all TBMQ nodes and configmaps, load balancers, etc.: + +```bash +./k8s-delete-all.sh +``` +{: .copy-code} + +Execute the following command to delete the GKE cluster: + +```bash +gcloud container clusters delete $TB_CLUSTER_NAME --region=$GCP_REGION +``` +{: .copy-code} + +## Next steps + +{% assign currentGuide = "InstallationGuides" %}{% include templates/mqtt-broker-guides-banner.md %} diff --git a/_includes/docs/mqtt-broker/install/cluster/gcp-cluster-setup.md b/_includes/docs/mqtt-broker/install/cluster/gcp-cluster-setup.md new file mode 100644 index 0000000000..4d8e611f09 --- /dev/null +++ b/_includes/docs/mqtt-broker/install/cluster/gcp-cluster-setup.md @@ -0,0 +1,225 @@ +* TOC +{:toc} + +This guide will help you set up TBMQ {{tbmqSuffix}} in GKE. + +## Prerequisites + +{% include templates/mqtt-broker/install/gcp/gke-prerequisites.md %} + +{% if docsPrefix == null %} +## Clone TBMQ repository + +```bash +git clone -b {{ site.release.broker_branch }} https://github.com/thingsboard/tbmq.git +cd tbmq/k8s/gcp +``` +{: .copy-code} + +{% else %} +## Clone TBMQ PE K8S repository + +```bash +git clone -b {{ site.release.broker_branch }} https://github.com/thingsboard/tbmq-pe-k8s.git +cd tbmq-pe-k8s/gcp +``` +{: .copy-code} +{% endif %} + +## Define environment variables + +{% assign tbClusterName = "tbmq-cluster" %} +{% assign tbDbClusterName = "tbmq-db" %} +{% include templates/mqtt-broker/install/gcp/env-variables.md %} + +## Configure and create GKE cluster + +{% include templates/mqtt-broker/install/gcp/regional-gke-cluster.md %} + +## Update the context of kubectl + +{% include templates/mqtt-broker/install/gcp/update-kubectl-region.md %} + +## Provision Google Cloud SQL (PostgreSQL) Instance + +{% assign tbDbName = "thingsboard_mqtt_broker" %} +{% include templates/mqtt-broker/install/gcp/provision-postgresql.md %} + +#### Edit database settings + +Replace **YOUR_DB_IP_ADDRESS**, **YOUR_DB_PASSWORD** and **YOUR_DB_NAME** with the correct values: + +```bash +nano tbmq-db-configmap.yml +``` +{: .copy-code} + +## Create Namespace + +Let's create a dedicated namespace for our TBMQ cluster deployment to ensure better resource isolation and management. + +```bash +kubectl apply -f tbmq-namespace.yml +kubectl config set-context $(kubectl config current-context) --namespace=thingsboard-mqtt-broker +``` +{: .copy-code} + +## Provision Valkey cluster + +{% include templates/mqtt-broker/install/cluster-common/provision-redis-cluster.md %} + +## Installation + +{% include templates/mqtt-broker/install/gcp/install.md %} + +{% capture gcp-psql %} + +Otherwise, please check if you set the PostgreSQL URL and PostgreSQL password in the `tbmq-db-configmap.yml` correctly. + +{% endcapture %} +{% include templates/info-banner.md content=gcp-psql %} + +{% include templates/mqtt-broker/install/cluster-common/configure-license-key.md %} + +## Provision Kafka + +{% include templates/mqtt-broker/install/cluster-common/provision-kafka-new.md %} + +## Starting + +{% include templates/mqtt-broker/install/cluster-common/starting.md %} + +## Configure Load Balancers + +### Configure HTTP(S) Load Balancer + +Configure HTTP(S) Load Balancer to access the web interface of your TBMQ instance. Basically, you have 2 possible configuration options: + +* http — Load Balancer without HTTPS support. Recommended for **development**. The only advantage is simple configuration and minimum costs. May be a good option for development server but definitely not suitable for production. +* https — Load Balancer with HTTPS support. Recommended for **production**. Acts as an SSL termination point. You may easily configure it to issue and maintain a valid SSL certificate. Automatically redirects all non-secure (HTTP) traffic to secure (HTTPS) port. + +See links/instructions below on how to configure each of the suggested options. + +#### HTTP Load Balancer + +{% include templates/mqtt-broker/install/cluster-common/configure-http-load-balancer.md %} + +#### HTTPS Load Balancer + +{% assign staticIP = "tbmq-http-lb-address" %} +{% include templates/mqtt-broker/install/gcp/configure-https-load-balancer.md %} +Once provisioned, you may use your domain name to access Web UI (over https). + +### Configure MQTT Load Balancer + +{% include templates/mqtt-broker/install/cluster-common/configure-mqtt-load-balancer.md %} + +## Validate the setup + +{% include templates/mqtt-broker/install/cluster-common/validate-the-setup.md %} + +### Validate MQTT access + +{% include templates/mqtt-broker/install/cluster-common/validate-mqtt-access.md %} + +### Troubleshooting + +{% include templates/mqtt-broker/install/cluster-common/troubleshooting.md %} + +## Upgrading + +{% include templates/mqtt-broker/upgrade/upgrading.md %} + +### Backup and restore (Optional) + +While backing up your PostgreSQL database is highly recommended, it is optional before proceeding with the upgrade. +For further guidance, follow the [next instructions](https://learn.microsoft.com/en-us/azure/postgresql/flexible-server/concepts-backup-restore). + +{% if docsPrefix == null %} + +### Upgrade to 2.2.0 + +In this release, the MQTT authentication mechanism was migrated from YAML/env configuration into the database. +During upgrade, TBMQ needs to know which authentication providers are enabled in your deployment. +This information is provided through environment variables passed to the **upgrade pod**. + +The upgrade script requires a file named **`database-setup.yml`** that explicitly defines these variables. +Environment variables from your `tb-broker.yml` file are not applied during the upgrade — only the values in `database-setup.yml` will be used. + +> **Tips** +> If you use only Basic authentication, set `SECURITY_MQTT_SSL_ENABLED=false`. +> If you use only X.509 authentication, set `SECURITY_MQTT_BASIC_ENABLED=false` and `SECURITY_MQTT_SSL_ENABLED=true`. + +**Supported variables** + +* `SECURITY_MQTT_BASIC_ENABLED` (`true|false`) +* `SECURITY_MQTT_SSL_ENABLED` (`true|false`) +* `SECURITY_MQTT_SSL_SKIP_VALIDITY_CHECK_FOR_CLIENT_CERT` (`true|false`) — usually `false`. + +Once the file is prepared and the values verified, proceed with the [upgrade process](#run-upgrade). + +### Upgrade to 2.1.0 + +{% include templates/mqtt-broker/upgrade/update-to-2.1.0-release-cluster.md %} + +### Upgrade to 2.0.0 + +For the TBMQ v2.0.0 upgrade, if you haven't installed Redis yet, please follow [step 7](#step-7-provision-valkey-cluster) to complete the installation. +Only then you can proceed with the [upgrade](#run-upgrade). + +### Run upgrade + +In case you would like to upgrade, please pull the recent changes from the latest release branch: + +```bash +git pull origin {{ site.release.broker_branch }} +``` +{: .copy-code} + +{% include templates/mqtt-broker/upgrade/upgrade-to-custom-release.md %} + +**Note**: Make sure custom changes of yours if available are not lost during the merge process. + +{% include templates/mqtt-broker/install/upgrade-hint.md %} + +After that, execute the following command: + +{% capture tabspec %}tbmq-upgrade +tbmq-upgrade-without-from-version,Since v2.1.0,shell,resources/upgrade-options/k8s-upgrade-tbmq-without-from-version.sh,/docs/{{docsPrefix}}mqtt-broker/install/cluster/resources/upgrade-options/k8s-upgrade-tbmq-without-from-version.sh +tbmq-upgrade-with-from-version,Before v2.1.0,markdown,resources/upgrade-options/k8s-upgrade-tbmq-with-from-version.md,/docs/{{docsPrefix}}mqtt-broker/install/cluster/resources/upgrade-options/k8s-upgrade-tbmq-with-from-version.md{% endcapture %} +{% include tabs.html %} + +{% include templates/mqtt-broker/upgrade/stop-tbmq-pods-before-upgrade.md %} + +{% else %} + +{% include templates/mqtt-broker/install/cluster-common/k8s-type-upgrade-ce-to-pe.md %} + +{% endif %} + +## Cluster deletion + +Execute the following command to delete TBMQ nodes: + +```bash +./k8s-delete-tbmq.sh +``` +{: .copy-code} + +Execute the following command to delete all TBMQ nodes and configmaps, load balancers, etc.: + +```bash +./k8s-delete-all.sh +``` +{: .copy-code} + +Execute the following command to delete the GKE cluster: + +```bash +gcloud container clusters delete $TB_CLUSTER_NAME --region=$GCP_REGION +``` +{: .copy-code} + +## Next steps + +{% assign currentGuide = "InstallationGuides" %}{% include templates/mqtt-broker-guides-banner.md %} diff --git a/_includes/docs/mqtt-broker/install/cluster/helm-cluster-setup-aws.md b/_includes/docs/mqtt-broker/install/cluster/helm-cluster-setup-aws.md new file mode 100644 index 0000000000..7e844cf643 --- /dev/null +++ b/_includes/docs/mqtt-broker/install/cluster/helm-cluster-setup-aws.md @@ -0,0 +1,72 @@ +* TOC +{:toc} + +This guide will help you to set up TBMQ Cluster using the official Helm [chart](https://artifacthub.io/packages/helm/tbmq-helm-chart/tbmq-cluster) +on AWS using Elastic Kubernetes Service (EKS). + +## Prerequisites + +{% include templates/mqtt-broker/install/helm/aws/prerequisites.md %} + +## Configure your Kubernetes environment + +{% include templates/mqtt-broker/install/helm/aws/configure-deployment.md %} + +## Add the TBMQ Cluster Helm repository + +{% include templates/mqtt-broker/install/helm/common/add-helm-repo.md %} + +## Modify default chart values + +{% include templates/mqtt-broker/install/helm/common/get-default-chart-values.md %} + +### Update nodeSelector for Pods Scheduling + +{% include templates/mqtt-broker/install/helm/aws/pods-scheduling.md %} + +### External PostgreSQL + +{% include templates/mqtt-broker/install/helm/common/external-postgres.md %} + +If you're deploying on Amazon EKS and plan to use AWS RDS for PostgreSQL, follow this +[guide](/docs/{{docsPrefix}}mqtt-broker/install/cluster/aws-cluster-setup/#step-4-amazon-postgresql-db-configuration) to provision and configure your RDS instance. + +### Load Balancer configuration + +{% include templates/mqtt-broker/install/helm/aws/modify-load-balancer.md %} + +## Create namespace + +{% include templates/mqtt-broker/install/helm/common/create-namespace.md %} + +## Install the TBMQ Helm chart + +{% include templates/mqtt-broker/install/helm/common/install-chart.md %} + +## Validate HTTP Access + +{% include templates/mqtt-broker/install/helm/aws/validate-http.md %} + +## Validate MQTT Access + +{% include templates/mqtt-broker/install/helm/aws/validate-mqtt.md %} + +## Troubleshooting + +{% include templates/mqtt-broker/install/helm/common/helm-setup-troubleshooting.md %} + +## Upgrading + +{% include templates/mqtt-broker/install/helm/common/upgrading.md %} + +## Uninstalling TBMQ Helm chart + +{% include templates/mqtt-broker/install/helm/common/uninstall-chart.md %} + +## Delete Kubernetes Cluster + +{% include templates/mqtt-broker/install/helm/aws/delete-cluster.md %} + +## Next steps + +{% assign currentGuide = "InstallationGuides" %}{% include templates/mqtt-broker-guides-banner.md %} diff --git a/_includes/docs/mqtt-broker/install/cluster/helm-cluster-setup-azure.md b/_includes/docs/mqtt-broker/install/cluster/helm-cluster-setup-azure.md new file mode 100644 index 0000000000..8a48ddaacb --- /dev/null +++ b/_includes/docs/mqtt-broker/install/cluster/helm-cluster-setup-azure.md @@ -0,0 +1,68 @@ +* TOC +{:toc} + +This guide will help you to set up TBMQ Cluster using the official Helm [chart](https://artifacthub.io/packages/helm/tbmq-helm-chart/tbmq-cluster) +on Azure using Azure Kubernetes Service (AKS). + +## Prerequisites + +{% include templates/mqtt-broker/install/helm/azure/prerequisites.md %} + +## Configure your Kubernetes environment + +{% include templates/mqtt-broker/install/helm/azure/configure-deployment.md %} + +## Add the TBMQ Cluster Helm repository + +{% include templates/mqtt-broker/install/helm/common/add-helm-repo.md %} + +## Modify default chart values + +{% include templates/mqtt-broker/install/helm/common/get-default-chart-values.md %} + +### External PostgreSQL + +{% include templates/mqtt-broker/install/helm/common/external-postgres.md %} + +If you're deploying on Azure AKS and plan to use Azure Database for PostgreSQL, follow this +[guide](/docs/{{docsPrefix}}mqtt-broker/install/cluster/azure-cluster-setup/#step-5-provision-postgresql-db) to provision and configure your PostgreSQL instance. + +### Load Balancer configuration + +{% include templates/mqtt-broker/install/helm/azure/modify-load-balancer.md %} + +## Create namespace + +{% include templates/mqtt-broker/install/helm/common/create-namespace.md %} + +## Install the TBMQ Helm chart + +{% include templates/mqtt-broker/install/helm/common/install-chart.md %} + +## Validate HTTP Access + +{% include templates/mqtt-broker/install/helm/azure/validate-http.md %} + +## Validate MQTT Access + +{% include templates/mqtt-broker/install/helm/azure/validate-mqtt.md %} + +## Troubleshooting + +{% include templates/mqtt-broker/install/helm/common/helm-setup-troubleshooting.md %} + +## Upgrading + +{% include templates/mqtt-broker/install/helm/common/upgrading.md %} + +## Uninstalling TBMQ Helm chart + +{% include templates/mqtt-broker/install/helm/common/uninstall-chart.md %} + +## Delete Kubernetes Cluster + +{% include templates/mqtt-broker/install/helm/azure/delete-cluster.md %} + +## Next steps + +{% assign currentGuide = "InstallationGuides" %}{% include templates/mqtt-broker-guides-banner.md %} diff --git a/_includes/docs/mqtt-broker/install/cluster/helm-cluster-setup-gcp.md b/_includes/docs/mqtt-broker/install/cluster/helm-cluster-setup-gcp.md new file mode 100644 index 0000000000..1436ae11b7 --- /dev/null +++ b/_includes/docs/mqtt-broker/install/cluster/helm-cluster-setup-gcp.md @@ -0,0 +1,69 @@ +* TOC +{:toc} + +This guide will help you to set up TBMQ Cluster using the official Helm [chart](https://artifacthub.io/packages/helm/tbmq-helm-chart/tbmq-cluster) +on Google Cloud Platform (GCP) using Google Kubernetes Engine (GKE). + +## Prerequisites + +{% include templates/mqtt-broker/install/helm/gcp/prerequisites.md %} + +## Configure your Kubernetes environment + +{% include templates/mqtt-broker/install/helm/gcp/configure-deployment.md %} + +## Add the TBMQ Cluster Helm repository + +{% include templates/mqtt-broker/install/helm/common/add-helm-repo.md %} + +## Modify default chart values + +{% include templates/mqtt-broker/install/helm/common/get-default-chart-values.md %} + +### External PostgreSQL + +{% include templates/mqtt-broker/install/helm/common/external-postgres.md %} + +If you're deploying on GCP GKE and plan to use a Google Cloud SQL (PostgreSQL) instance, +make sure to first [enable the required GCP services](/docs/{{docsPrefix}}mqtt-broker/install/cluster/gcp-cluster-setup/#enable-gcp-services), then follow this +[instructions](/docs/{{docsPrefix}}mqtt-broker/install/cluster/gcp-cluster-setup/#step-5-provision-google-cloud-sql-postgresql-instance) to provision and configure your PostgreSQL instance. + +### Load Balancer configuration + +{% include templates/mqtt-broker/install/helm/gcp/modify-load-balancer.md %} + +## Create namespace + +{% include templates/mqtt-broker/install/helm/common/create-namespace.md %} + +## Install the TBMQ Helm chart + +{% include templates/mqtt-broker/install/helm/common/install-chart.md %} + +## Validate HTTP Access + +{% include templates/mqtt-broker/install/helm/gcp/validate-http.md %} + +## Validate MQTT Access + +{% include templates/mqtt-broker/install/helm/gcp/validate-mqtt.md %} + +## Troubleshooting + +{% include templates/mqtt-broker/install/helm/common/helm-setup-troubleshooting.md %} + +## Upgrading + +{% include templates/mqtt-broker/install/helm/common/upgrading.md %} + +## Uninstalling TBMQ Helm chart + +{% include templates/mqtt-broker/install/helm/common/uninstall-chart.md %} + +## Delete Kubernetes Cluster + +{% include templates/mqtt-broker/install/helm/gcp/delete-cluster.md %} + +## Next steps + +{% assign currentGuide = "InstallationGuides" %}{% include templates/mqtt-broker-guides-banner.md %} diff --git a/_includes/docs/mqtt-broker/install/cluster/helm-cluster-setup-minikube.md b/_includes/docs/mqtt-broker/install/cluster/helm-cluster-setup-minikube.md new file mode 100644 index 0000000000..cff6be85ff --- /dev/null +++ b/_includes/docs/mqtt-broker/install/cluster/helm-cluster-setup-minikube.md @@ -0,0 +1,66 @@ +* TOC +{:toc} + +This guide will help you to set up TBMQ Cluster using the official Helm [chart](https://artifacthub.io/packages/helm/tbmq-helm-chart/tbmq-cluster). +Minikube used as the reference environment for the self-hosted kubernetes deployment. +If you're deploying TBMQ in a self-managed cluster without cloud-specific load balancer integrations, Minikube provides a simple way to test the setup end-to-end. + +## Prerequisites + +{% include templates/mqtt-broker/install/helm/minikube/prerequisites.md %} + +## Configure your Kubernetes environment + +{% include templates/mqtt-broker/install/helm/minikube/configure-deployment.md %} + +## Add the TBMQ Cluster Helm repository + +{% include templates/mqtt-broker/install/helm/common/add-helm-repo.md %} + +## Modify default chart values + +{% include templates/mqtt-broker/install/helm/common/get-default-chart-values.md %} + +### External PostgreSQL + +{% include templates/mqtt-broker/install/helm/common/external-postgres.md %} + +### Load Balancer configuration + +{% include templates/mqtt-broker/install/helm/minikube/modify-load-balancer.md %} + +## Create namespace + +{% include templates/mqtt-broker/install/helm/common/create-namespace.md %} + +## Install the TBMQ Helm chart + +{% include templates/mqtt-broker/install/helm/common/install-chart.md %} + +## Validate HTTP Access + +{% include templates/mqtt-broker/install/helm/minikube/validate-http.md %} + +## Validate MQTT Access + +{% include templates/mqtt-broker/install/helm/minikube/validate-mqtt.md %} + +## Troubleshooting + +{% include templates/mqtt-broker/install/helm/common/helm-setup-troubleshooting.md %} + +## Upgrading + +{% include templates/mqtt-broker/install/helm/common/upgrading.md %} + +## Uninstalling TBMQ Helm chart + +{% include templates/mqtt-broker/install/helm/common/uninstall-chart.md %} + +## Delete Kubernetes Cluster + +{% include templates/mqtt-broker/install/helm/minikube/delete-cluster.md %} + +## Next steps + +{% assign currentGuide = "InstallationGuides" %}{% include templates/mqtt-broker-guides-banner.md %} diff --git a/_includes/docs/mqtt-broker/install/cluster/helm-cluster-setup-options.md b/_includes/docs/mqtt-broker/install/cluster/helm-cluster-setup-options.md new file mode 100644 index 0000000000..0e7d6dc06a --- /dev/null +++ b/_includes/docs/mqtt-broker/install/cluster/helm-cluster-setup-options.md @@ -0,0 +1,45 @@ +{% if (docsPrefix == "pe/") %} + +
+
+
+
+
+

Kubernetes environment options for TBMQ PE cluster setup using Helm

+
+

The core TBMQ PE installation process using Helm is consistent across Kubernetes environments. However, the full installation guide—including steps for configuring the Kubernetes cluster—varies depending on the platform. To proceed, please select your Kubernetes environment below. You’ll then be guided through the complete TBMQ PE installation tailored to your chosen platform, including environment-specific Kubernetes setup and other relevant configurations.

+
+
+
+
+ {% include installation-options-cards.liquid installationOptions="installation-options-pe-mqtt-broker-helm" active=true %} +
+
+
+
+
+
+ +{% else %} + +
+
+
+
+
+

Kubernetes environment options for TBMQ cluster setup using Helm

+
+

The core TBMQ installation process using Helm is consistent across Kubernetes environments. However, the full installation guide—including steps for configuring the Kubernetes cluster—varies depending on the platform. To proceed, please select your Kubernetes environment below. You’ll then be guided through the complete TBMQ installation tailored to your chosen platform, including environment-specific Kubernetes setup and other relevant configurations.

+
+
+
+
+ {% include installation-options-cards.liquid installationOptions="installation-options-mqtt-broker-helm" active=true %} +
+
+
+
+
+
+ +{% endif %} diff --git a/_includes/docs/mqtt-broker/install/cluster/helm-cluster-upgrading-options.md b/_includes/docs/mqtt-broker/install/cluster/helm-cluster-upgrading-options.md new file mode 100644 index 0000000000..fddea3e86f --- /dev/null +++ b/_includes/docs/mqtt-broker/install/cluster/helm-cluster-upgrading-options.md @@ -0,0 +1,25 @@ +{% if (docsPrefix == "pe/") %} + {% assign installationOptionsValue = "installation-options-pe-mqtt-broker-helm-cluster-upgrading-options" %} +{% else %} + {% assign installationOptionsValue = "installation-options-mqtt-broker-helm-cluster-upgrading-options" %} +{% endif %} + +
+
+
+
+
+

Upgrade options for TBMQ cluster setup using Helm

+
+

To proceed, please select your Kubernetes environment below. You’ll then be guided through the complete TBMQ upgrade process tailored to your chosen platform.

+
+
+
+
+ {% include installation-options-cards.liquid installationOptions=installationOptionsValue active=true %} +
+
+
+
+
+
\ No newline at end of file diff --git a/_includes/docs/mqtt-broker/install/cluster/minikube-cluster-setup-old.md b/_includes/docs/mqtt-broker/install/cluster/minikube-cluster-setup-old.md new file mode 100644 index 0000000000..0425e78930 --- /dev/null +++ b/_includes/docs/mqtt-broker/install/cluster/minikube-cluster-setup-old.md @@ -0,0 +1,170 @@ +* TOC +{:toc} + +This guide will help you to set up TBMQ in cluster mode using Minikube. + +## Prerequisites + +You need to have a Kubernetes cluster, and the `kubectl` command-line tool must be configured to communicate with your cluster. +If you don't have Minikube installed, please follow [these instructions](https://kubernetes.io/docs/setup/learning-environment/minikube/). +Additionally, you will need [helm](https://helm.sh/docs/intro/install/) to be installed. + +## Step 1. Clone TBMQ repository + +```bash +git clone -b {{ site.release.broker_branch }} https://github.com/thingsboard/tbmq.git +cd tbmq/k8s/minikube +``` +{: .copy-code} + +## Step 2. Installation + +To install TBMQ execute the following command: + +```bash +./k8s-install-tbmq.sh +``` +{: .copy-code} + +## Step 3. Running + +Execute the following command to deploy TBMQ: + +```bash +./k8s-deploy-tbmq.sh +``` +{: .copy-code} + +After a while when all resources will be successfully started you can open `http://{your-cluster-ip}:30001` in your browser (e.g. **http://192.168.49.2:30001**). +You can check your cluster IP using command: +```bash +minikube ip +``` +{: .copy-code} + +{% include templates/mqtt-broker/login.md %} + +## Step 4. Logs, delete statefulsets and services + +In case of any issues, you can examine service logs for errors. +For example to see TBMQ node logs execute the following commands: + +1) Get the list of the running tb-broker pods: + +```bash +kubectl get pods -l app=tb-broker +``` +{: .copy-code} + +2) Fetch logs of the tb-broker pod: + +```bash +kubectl logs -f TB_BROKER_POD_NAME +``` +{: .copy-code} + +Where: + +- `TB_BROKER_POD_NAME` - tb-broker pod name obtained from the list of the running tb-broker pods. + +Or use the next command to see the state of all the pods. +```bash +kubectl get pods +``` +{: .copy-code} + +Use the next command to see the state of all the services. +```bash +kubectl get services +``` +{: .copy-code} + +Use the next command to see the state of all the deployments. +```bash +kubectl get deployments +``` +{: .copy-code} + +Use the next command to see the state of all the statefulsets. +```bash +kubectl get statefulsets +``` +{: .copy-code} + +See [kubectl Cheat Sheet](https://kubernetes.io/docs/reference/kubectl/cheatsheet/) command reference for more details. + +Execute the following command to delete TBMQ nodes: + +```bash +./k8s-delete-tbmq.sh +``` +{: .copy-code} + +Execute the following command to delete all resources (including database): + +```bash +./k8s-delete-all.sh +``` +{: .copy-code} + +## Upgrading + +{% include templates/mqtt-broker/upgrade/upgrading.md %} + +### Backup and restore (Optional) + +While backing up your PostgreSQL database is highly recommended, it is optional before proceeding with the upgrade. +For further guidance, follow the [next instructions](https://github.com/thingsboard/tbmq/blob/main/k8s/minikube/backup-restore/README.md). + +### Upgrade to 2.2.0 + +In this release, the MQTT authentication mechanism was migrated from YAML/env configuration into the database. +During upgrade, TBMQ needs to know which authentication providers are enabled in your deployment. +This information is provided through environment variables passed to the **upgrade pod**. + +The upgrade script requires a file named **`database-setup.yml`** that explicitly defines these variables. +Environment variables from your `tb-broker.yml` file are not applied during the upgrade — only the values in `database-setup.yml` will be used. + +> **Tips** +> If you use only Basic authentication, set `SECURITY_MQTT_SSL_ENABLED=false`. +> If you use only X.509 authentication, set `SECURITY_MQTT_BASIC_ENABLED=false` and `SECURITY_MQTT_SSL_ENABLED=true`. + +**Supported variables** + +* `SECURITY_MQTT_BASIC_ENABLED` (`true|false`) +* `SECURITY_MQTT_SSL_ENABLED` (`true|false`) +* `SECURITY_MQTT_SSL_SKIP_VALIDITY_CHECK_FOR_CLIENT_CERT` (`true|false`) — usually `false`. + +Once the file is prepared and the values verified, proceed with the [upgrade process](#run-upgrade). + +### Upgrade to 2.1.0 + +{% include templates/mqtt-broker/upgrade/update-to-2.1.0-release-cluster.md %} + +### Run upgrade + +In case you would like to upgrade, please pull the recent changes from the latest release branch: + +```bash +git pull origin {{ site.release.broker_branch }} +``` +{: .copy-code} + +{% include templates/mqtt-broker/upgrade/upgrade-to-custom-release.md %} + +**Note**: Make sure custom changes of yours if available are not lost during the merge process. + +{% include templates/mqtt-broker/install/upgrade-hint.md %} + +After that, execute the following command: + +{% capture tabspec %}tbmq-upgrade +tbmq-upgrade-without-from-version,Since v2.1.0,shell,resources/upgrade-options/k8s-upgrade-tbmq-without-from-version.sh,/docs/mqtt-broker/install/cluster/resources/upgrade-options/k8s-upgrade-tbmq-without-from-version.sh +tbmq-upgrade-with-from-version,Before v2.1.0,markdown,resources/upgrade-options/k8s-upgrade-tbmq-with-from-version.md,/docs/mqtt-broker/install/cluster/resources/upgrade-options/k8s-upgrade-tbmq-with-from-version.md{% endcapture %} +{% include tabs.html %} + +{% include templates/mqtt-broker/upgrade/stop-tbmq-pods-before-upgrade.md %} + +## Next steps + +{% assign currentGuide = "InstallationGuides" %}{% include templates/mqtt-broker-guides-banner.md %} diff --git a/_includes/docs/mqtt-broker/install/cluster/minikube-cluster-setup.md b/_includes/docs/mqtt-broker/install/cluster/minikube-cluster-setup.md new file mode 100644 index 0000000000..81f2ffbb30 --- /dev/null +++ b/_includes/docs/mqtt-broker/install/cluster/minikube-cluster-setup.md @@ -0,0 +1,197 @@ +* TOC +{:toc} + +This guide will help you set up TBMQ {{tbmqSuffix}} in cluster mode using Minikube. + +## Prerequisites + +You need to have a Kubernetes cluster, and the `kubectl` command-line tool must be configured to communicate with your cluster. +If you don't have Minikube installed, please follow [these instructions](https://kubernetes.io/docs/setup/learning-environment/minikube/). + +{% if docsPrefix == null %} +## Clone TBMQ repository + +```bash +git clone -b {{ site.release.broker_branch }} https://github.com/thingsboard/tbmq.git +cd tbmq/k8s/minikube +``` +{: .copy-code} + +{% else %} +## Clone TBMQ PE K8S repository + +```bash +git clone -b {{ site.release.broker_branch }} https://github.com/thingsboard/tbmq-pe-k8s.git +cd tbmq-pe-k8s/minikube +``` +{: .copy-code} +{% endif %} + +## Installation + +To install TBMQ {{tbmqSuffix}}, execute the following command: + +```bash +./k8s-install-tbmq.sh +``` +{: .copy-code} + +{% include templates/mqtt-broker/install/cluster-common/configure-license-key.md %} + +## Running + +Execute the following command to deploy TBMQ {{tbmqSuffix}}: + +```bash +./k8s-deploy-tbmq.sh +``` +{: .copy-code} + +After a while when all resources will be successfully started you can open `http://{your-cluster-ip}:30001` in your browser (e.g. **http://192.168.49.2:30001**). +You can check your cluster IP using the following command: + +```bash +minikube ip +``` +{: .copy-code} + +{% include templates/mqtt-broker/login.md %} + +## Logs, delete statefulsets and services + +In case of any issues, you can examine service logs for errors. +For example, to see TBMQ node logs execute the following commands: + +1) Get the list of the running tbmq pods: + +```bash +kubectl get pods -l app=tbmq +``` +{: .copy-code} + +2) Fetch logs of the tbmq pod: + +```bash +kubectl logs -f TBMQ_POD_NAME +``` +{: .copy-code} + +Where: + +- `TBMQ_POD_NAME` - tbmq pod name obtained from the list of the running tbmq pods. + +Or use the next command to see the state of all the pods. + +```bash +kubectl get pods +``` +{: .copy-code} + +Use the next command to see the state of all the services. + +```bash +kubectl get services +``` +{: .copy-code} + +Use the next command to see the state of all the deployments. + +```bash +kubectl get deployments +``` +{: .copy-code} + +Use the next command to see the state of all the statefulsets. + +```bash +kubectl get statefulsets +``` +{: .copy-code} + +See [kubectl Cheat Sheet](https://kubernetes.io/docs/reference/kubectl/cheatsheet/) command reference for more details. + +Execute the following command to delete TBMQ nodes: + +```bash +./k8s-delete-tbmq.sh +``` +{: .copy-code} + +Execute the following command to delete all resources (including the databases): + +```bash +./k8s-delete-all.sh +``` +{: .copy-code} + +## Upgrading + +{% include templates/mqtt-broker/upgrade/upgrading.md %} + +### Backup and restore (Optional) + +While backing up your PostgreSQL database is highly recommended, it is optional before proceeding with the upgrade. +{% if docsPrefix == null %} For further guidance, follow the [next instructions](https://github.com/thingsboard/tbmq/blob/main/k8s/minikube/backup-restore/README.md). +{% else %} For further guidance, follow the [next instructions](https://github.com/thingsboard/tbmq-pe-k8s/blob/master/minikube/backup-restore/README.md). +{% endif %} + +{% if docsPrefix == null %} + +### Upgrade to 2.2.0 + +In this release, the MQTT authentication mechanism was migrated from YAML/env configuration into the database. +During upgrade, TBMQ needs to know which authentication providers are enabled in your deployment. +This information is provided through environment variables passed to the **upgrade pod**. + +The upgrade script requires a file named **`database-setup.yml`** that explicitly defines these variables. +Environment variables from your `tb-broker.yml` file are not applied during the upgrade — only the values in `database-setup.yml` will be used. + +> **Tips** +> If you use only Basic authentication, set `SECURITY_MQTT_SSL_ENABLED=false`. +> If you use only X.509 authentication, set `SECURITY_MQTT_BASIC_ENABLED=false` and `SECURITY_MQTT_SSL_ENABLED=true`. + +**Supported variables** + +* `SECURITY_MQTT_BASIC_ENABLED` (`true|false`) +* `SECURITY_MQTT_SSL_ENABLED` (`true|false`) +* `SECURITY_MQTT_SSL_SKIP_VALIDITY_CHECK_FOR_CLIENT_CERT` (`true|false`) — usually `false`. + +Once the file is prepared and the values verified, proceed with the [upgrade process](#run-upgrade). + +### Upgrade to 2.1.0 + +{% include templates/mqtt-broker/upgrade/update-to-2.1.0-release-cluster.md %} + +### Run upgrade + +In case you would like to upgrade, please pull the recent changes from the latest release branch: + +```bash +git pull origin {{ site.release.broker_branch }} +``` +{: .copy-code} + +{% include templates/mqtt-broker/upgrade/upgrade-to-custom-release.md %} + +**Note**: Make sure custom changes of yours if available are not lost during the merge process. + +{% include templates/mqtt-broker/install/upgrade-hint.md %} + +After that, execute the following command: + +{% capture tabspec %}tbmq-upgrade +tbmq-upgrade-without-from-version,Since v2.1.0,shell,resources/upgrade-options/k8s-upgrade-tbmq-without-from-version.sh,/docs/{{docsPrefix}}mqtt-broker/install/cluster/resources/upgrade-options/k8s-upgrade-tbmq-without-from-version.sh +tbmq-upgrade-with-from-version,Before v2.1.0,markdown,resources/upgrade-options/k8s-upgrade-tbmq-with-from-version.md,/docs/{{docsPrefix}}mqtt-broker/install/cluster/resources/upgrade-options/k8s-upgrade-tbmq-with-from-version.md{% endcapture %} +{% include tabs.html %} + +{% include templates/mqtt-broker/upgrade/stop-tbmq-pods-before-upgrade.md %} + +{% else %} + +{% include templates/mqtt-broker/install/cluster-common/k8s-type-upgrade-ce-to-pe.md %} + +{% endif %} + +## Next steps + +{% assign currentGuide = "InstallationGuides" %}{% include templates/mqtt-broker-guides-banner.md %} diff --git a/_includes/docs/mqtt-broker/install/config.md b/_includes/docs/mqtt-broker/install/config.md index cc706cee8c..ea155aa9b4 100644 --- a/_includes/docs/mqtt-broker/install/config.md +++ b/_includes/docs/mqtt-broker/install/config.md @@ -838,7 +838,12 @@ queue.kafka.enable-topic-deletion TB_KAFKA_ENABLE_TOPIC_DELETION true - Enable/disable deletion of topics for Application MQTT Clients + Controls whether TBMQ is allowed to delete Kafka topics that were created for + Application MQTT Clients or Application Shared subscriptions. + When set to 'true', TBMQ may automatically remove topics during cleanup + (for example, when an Application client or shared subscription is deleted). + When set to 'false', TBMQ will skip topic deletions and simply stop using them. + This helps prevent accidental data loss in production environments queue.kafka.default.consumer.partition-assignment-strategy diff --git a/_includes/docs/mqtt-broker/install/configuration.md b/_includes/docs/mqtt-broker/install/configuration.md new file mode 100644 index 0000000000..dd135609b2 --- /dev/null +++ b/_includes/docs/mqtt-broker/install/configuration.md @@ -0,0 +1,48 @@ +* TOC +{:toc} + +This guide will help you become familiar with TBMQ {{tbmqSuffix}} configuration files and parameters. +We **strongly recommend** configuring TBMQ using environment variables. +This way, you won't need to merge the configuration files when a new platform release arrives. + +The list of available configuration parameters and corresponding environment variables can be found [here](#configuration-parameters). + +## How to change configuration parameters? + +### Docker-Based deployment + +If TBMQ is installed in a Docker Compose environment, you can edit the scripts and add environment variables for +the corresponding containers. For more details, refer to the [Docker documentation](https://docs.docker.com/compose/environment-variables/#/the-envfile-configuration-option). + +### K8S-Based deployment + +If TBMQ is installed in a K8S environment, you can edit the scripts and add environment variables for the +corresponding deployments/stateful sets. For more details, refer to the [K8S documentation](https://kubernetes.io/docs/tasks/inject-data-application/define-environment-variable-container/). + +## Configuration parameters + +The configuration file is written in YAML format. All configuration parameters have corresponding environment variable names and default values. +To change a configuration parameter, simply modify its default value. For example: + +```bash +server: + address: "${HTTP_BIND_ADDRESS:0.0.0.0}" +``` + +In this case, *'HTTP_BIND_ADDRESS'* is the environment variable name and *'0.0.0.0'* is the default value. + +You can use the simple example below to add a new environment variable 'HTTP_BIND_PORT' with the value '8084'. + +```bash +... +export HTTP_BIND_PORT=8084 +``` + +The parameters are grouped by system components. The list contains the name (address in **thingsboard-mqtt-broker.yml** file), +environment variable, default value, and description. + +{% if docsPrefix == "pe/" %} +{% include docs/pe/mqtt-broker/install/config.md %} +{% else %} +{% include docs/mqtt-broker/install/config.md %} +{% endif %} diff --git a/_includes/docs/mqtt-broker/install/docker-windows.md b/_includes/docs/mqtt-broker/install/docker-windows.md new file mode 100644 index 0000000000..4a820b7bb7 --- /dev/null +++ b/_includes/docs/mqtt-broker/install/docker-windows.md @@ -0,0 +1,360 @@ +{% if docsPrefix == null %} +{% assign cacheUrl = "redis_url" %} +{% else %} +{% assign cacheUrl = "valkey_url" %} +{% endif %} + +* TOC +{:toc} + +This guide will help you install and start standalone TBMQ {{tbmqSuffix}} using Docker on Windows. +If you are looking for a cluster installation instruction, please visit [cluster setup page](/docs/{{docsPrefix}}mqtt-broker/install/cluster/docker-compose-setup/). + +## Prerequisites + +To run TBMQ {{tbmqSuffix}} on a single machine, you will need at least 2Gb of RAM. + +- [Install Docker](https://docs.docker.com/engine/installation/) + +{% if docsPrefix == "pe/" %} +## Get the license key + +Before proceeding, make sure you’ve selected your subscription plan or chosen to purchase a perpetual license. +If you haven’t done this yet, please visit the [Pricing page](/pricing/?section=tbmq-options){: target="_blank"} to compare available options +and obtain your license key. + +> **Note:** Throughout this guide, we’ll refer to your license key as **YOUR_LICENSE_KEY_HERE**. + +{% endif %} + +## Installation + +Execute the following commands to download the script that will install and start TBMQ {{tbmqSuffix}}: + +{% include templates/mqtt-broker/install/windows/windows-install.md %} + +The script downloads the _docker-compose.yml_ file, creates necessary docker volumes, installs the database for TBMQ, and starts TBMQ. +Key configuration points for TBMQ in the docker-compose file: + +{% if docsPrefix == "pe/" %} +- `TBMQ_LICENSE_SECRET: YOUR_LICENSE_KEY_HERE` - placeholder for your license secret obtained earlier; +{% endif %} +- `8083:8083` - connect local port 8083 to exposed internal HTTP port 8083; +- `1883:1883` - connect local port 1883 to exposed internal MQTT port 1883; +- `8084:8084` - connect local port 8084 to exposed internal MQTT over WebSockets port 8084; +{% if docsPrefix == null %} +- `tbmq-redis-data:/bitnami/redis/data` - maps the `tbmq-redis-data` volume to TBMQ Redis database data directory; +{% else %} +- `tbmq-valkey-data:/data` - maps the `tbmq-valkey-data` volume to TBMQ Valkey database data directory; +{% endif %} +- `tbmq-postgres-data:/var/lib/postgresql/data` - maps the `tbmq-postgres-data` volume to TBMQ Postgres database data directory; +{% if docsPrefix == null %} +- `tbmq-kafka-data:/bitnami/kafka` - maps the `tbmq-kafka-data` volume to Kafka data directory; +{% else %} +- `tbmq-kafka-data:/var/lib/kafka/data` - maps the `tbmq-kafka-data` volume to Kafka data directory; +{% endif %} +- `tbmq-logs:/var/log/thingsboard-mqtt-broker` - maps the `tbmq-logs` volume to TBMQ logs directory; +- `tbmq-data:/data` - maps the `tbmq-data` volume to TBMQ data directory that contains _.firstlaunch_ file after the DB is installed; +- `tbmq` - friendly local name of this machine; +- `restart: always` - automatically start TBMQ in case of system reboot and restart in case of failure. + +{% if docsPrefix == "pe/" %} + +{% capture replace_tbmq_license_secret %} +Update your `docker-compose.yml` file with the license secret you obtained earlier. +Open the file, find the **TBMQ_LICENSE_SECRET** environment variable, +and replace **YOUR_LICENSE_KEY_HERE** with your actual license secret. +After updating the file, restart TBMQ by running the following command. +{% endcapture %} +{% include templates/warn-banner.md content=replace_tbmq_license_secret %} + +```shell +.\tbmq-install-and-run.ps1 +``` +{: .copy-code} + +{% endif %} + +**Note**: In case the TBMQ is being installed on the same host where ThingsBoard is already running, the following issue can be seen: + +``` +Error response from daemon: ... Bind for 0.0.0.0:1883 failed: port is already allocated +``` + +In order to fix this, you need to expose another host's port for the TBMQ container, +i.e. change the `1883:1883` line in the downloaded docker-compose.yml file with, for example, `1889:1883`. After that re-run the script. + +```shell +.\tbmq-install-and-run.ps1 +``` +{: .copy-code} + +Once the installation process is complete you can access TBMQ UI by visiting the following URL `http://{your-host-ip}:8083` in your browser (e.g. **http://localhost:8083**). + +{% include templates/mqtt-broker/login.md %} + +## Logs, stop and start commands + +In case of any issues you can examine service logs for errors. +For example to see TBMQ logs execute the following command: + +``` +docker compose logs -f tbmq +``` +{: .copy-code} + +To stop the containers: + +``` +docker compose stop +``` +{: .copy-code} + +To start the containers: + +``` +docker compose start +``` +{: .copy-code} + +## Upgrading + +{% include templates/mqtt-broker/upgrade/upgrading.md %} + +### Backup and restore (Optional) + +While backing up your PostgreSQL database is highly recommended, it is optional before proceeding with the upgrade. +{% if docsPrefix == null %} For further guidance, follow the [next instructions](https://github.com/thingsboard/tbmq/blob/main/msa/tbmq/configs/README.md). +{% else %} For further guidance, follow the [next instructions](https://github.com/thingsboard/tbmq-pe-docker-compose/blob/master/basic/README.md). +{% endif %} + +{% if docsPrefix == null %} +### Upgrade to 2.2.0 + +In this release, the MQTT authentication mechanism was migrated from YAML/env configuration into the database. +During upgrade, TBMQ needs to know which authentication providers are enabled in your deployment. +This is done using environment variables passed to the **upgrade container**. + +The upgrade script therefore requires a file named **`.tbmq-upgrade.env`** in the same directory as `docker-compose.yml`. +This file is **used only during upgrade** to create the default auth providers. +Make sure the values match what you already run in your `tbmq` service (`docker-compose.yml → environment:`). + +**Create the env file (Windows PowerShell)** + +From the directory containing `docker-compose.yml`: + +```bash +@' +SECURITY_MQTT_BASIC_ENABLED=true +SECURITY_MQTT_SSL_ENABLED=true +SECURITY_MQTT_SSL_SKIP_VALIDITY_CHECK_FOR_CLIENT_CERT=false +'@ | Set-Content -Path .tbmq-upgrade.env -Encoding UTF8 +``` +{: .copy-code} + +> **Tips** +> If you use only Basic authentication, set `SECURITY_MQTT_SSL_ENABLED=false`. +> If you use only X.509 authentication, set `SECURITY_MQTT_BASIC_ENABLED=false` and `SECURITY_MQTT_SSL_ENABLED=true`. + +**Notes** + +* **Required**: If `.tbmq-upgrade.env` is missing, the upgrade script will fail. +* Supported variables: + + * `SECURITY_MQTT_BASIC_ENABLED` (`true|false`) + * `SECURITY_MQTT_SSL_ENABLED` (`true|false`) + * `SECURITY_MQTT_SSL_SKIP_VALIDITY_CHECK_FOR_CLIENT_CERT` (`true|false`) — usually `false`. + +Once the file is created, continue with the [upgrade process](#run-upgrade). + +### Upgrade to 2.1.0 + +{% include templates/mqtt-broker/upgrade/update-to-2.1.0-release.md %} + +### Upgrade to 2.0.0 + +For the TBMQ 2.0.0 release, the installation scripts have been updated to include Redis configuration. + +Please update your `docker-compose.yml` file to incorporate the Redis settings. +You can review the necessary changes by visiting the following [link](https://github.com/thingsboard/tbmq/pull/142/files#diff-18a10097b03fb393429353a8f84ba29498e9b72a21326deb9809865d384e2800). + +
+
+ +Here is the complete docker compose file with the Redis configuration prior to the upgrade + + +```yaml +# +# Copyright © 2016-2024 The Thingsboard Authors +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +services: + postgres: + restart: always + image: "postgres:15" + ports: + - "5432" + environment: + POSTGRES_DB: thingsboard_mqtt_broker + POSTGRES_PASSWORD: postgres + volumes: + - tbmq-postgres-data:/var/lib/postgresql/data + kafka: + restart: always + image: "bitnamilegacy/kafka:3.5.1" + ports: + - "9092" + environment: + KAFKA_CFG_NODE_ID: 0 + KAFKA_CFG_PROCESS_ROLES: controller,broker + KAFKA_CFG_CONTROLLER_QUORUM_VOTERS: 0@kafka:9093 + KAFKA_CFG_LISTENERS: PLAINTEXT://:9092,CONTROLLER://:9093 + KAFKA_CFG_ADVERTISED_LISTENERS: PLAINTEXT://:9092 + KAFKA_CFG_LISTENER_SECURITY_PROTOCOL_MAP: CONTROLLER:PLAINTEXT,PLAINTEXT:PLAINTEXT + KAFKA_CFG_CONTROLLER_LISTENER_NAMES: CONTROLLER + KAFKA_CFG_INTER_BROKER_LISTENER_NAME: PLAINTEXT + volumes: + - tbmq-kafka-data:/bitnami/kafka + redis: + restart: always + image: "bitnamilegacy/redis:7.0" + environment: + # ALLOW_EMPTY_PASSWORD is recommended only for development. + ALLOW_EMPTY_PASSWORD: "yes" + ports: + - "6379" + volumes: + - tbmq-redis-data:/bitnami/redis/data + tbmq: + restart: always + image: "thingsboard/tbmq:1.4.0" + depends_on: + - postgres + - kafka + - redis + ports: + - "8083:8083" + - "1883:1883" + - "8084:8084" + environment: + TB_SERVICE_ID: tbmq + SPRING_DATASOURCE_URL: jdbc:postgresql://postgres:5432/thingsboard_mqtt_broker + SPRING_DATASOURCE_USERNAME: postgres + SPRING_DATASOURCE_PASSWORD: postgres + TB_KAFKA_SERVERS: kafka:9092 + REDIS_HOST: redis + SECURITY_MQTT_BASIC_ENABLED: "true" + #JAVA_OPTS: "-Xmx2048M -Xms2048M -Xss384k -XX:+AlwaysPreTouch" + volumes: + - tbmq-logs:/var/log/thingsboard-mqtt-broker + - tbmq-data:/data + +volumes: + tbmq-postgres-data: + external: true + tbmq-kafka-data: + external: true + tbmq-redis-data: + external: true + tbmq-logs: + external: true + tbmq-data: + external: true +``` +{: .copy-code} + +
+
+ +Additionally, add the following line to your `tbmq-install-and-run.ps1` script (locate `create_volume_if_not_exists` lines) to create a volume for Redis data: + +```bash +create_volume_if_not_exists "tbmq-redis-data" +``` +{: .copy-code} + +Or simply create it with the following command: + +```bash +docker volume create tbmq-redis-data +``` +{: .copy-code} + +Once this is done, run the script to apply the changes: + +```bash +.\tbmq-install-and-run.ps1 +``` +{: .copy-code} + +This will restart TBMQ with Redis enabled. Afterward, you can proceed with the [upgrade process](#run-upgrade). +Please [contact us](https://github.com/thingsboard/tbmq/issues), so we can answer any questions and provide our help if needed. + +{% else %} + +### Upgrade from TBMQ CE to TBMQ PE (v2.2.0) + +To upgrade your existing **TBMQ Community Edition (CE)** to **TBMQ Professional Edition (PE)**, ensure you are running the latest **TBMQ CE {{site.release.broker_full_ver}}** version before starting the process. +Do not forget to [configure the license key](#get-the-license-key). + +The upgrade procedure requires a file named **`.tbmq-upgrade.env`** located in the same directory as your `docker-compose.yml`. +This file is **only used during the upgrade**. + +**Create the `.tbmq-upgrade.env` file (Windows PowerShell)** + +From the directory containing `docker-compose.yml`, run: + +```bash +@' +JAVA_TOOL_OPTIONS=-Dinstall.upgrade.from_version=ce +'@ | Set-Content -Path .tbmq-upgrade.env -Encoding UTF8 +``` +{: .copy-code} + +**Important Notes** + +* **Required:** The upgrade script will fail if `.tbmq-upgrade.env` is missing. +* After creating the file, proceed with the [upgrade process](#run-upgrade). + +{% endif %} + +### Run upgrade + +In order to update to the latest version, execute the following commands: + +{% if docsPrefix == null %} +```shell +Invoke-WebRequest -Uri "https://raw.githubusercontent.com/thingsboard/tbmq/{{ site.release.broker_branch }}/msa/tbmq/configs/windows/tbmq-upgrade.ps1" ` +-OutFile ".\tbmq-upgrade.ps1"; .\tbmq-upgrade.ps1 +``` +{: .copy-code} +{% else %} +```shell +Invoke-WebRequest -Uri "https://raw.githubusercontent.com/thingsboard/tbmq-pe-docker-compose/{{ site.release.broker_branch }}/basic/windows/tbmq-upgrade.ps1" ` +-OutFile ".\tbmq-upgrade.ps1"; .\tbmq-upgrade.ps1 +``` +{: .copy-code} +{% endif %} + +**NOTE**: replace `{{cacheUrl}}`, `db_url`, `db_username`, and `db_password` variables in the script with the corresponding values used during DB initialization. + +{% include templates/mqtt-broker/upgrade/upgrade-to-custom-release.md %} + +{% include templates/mqtt-broker/install/ssl/mqtts.md %} + +## Next steps + +{% assign currentGuide = "InstallationGuides" %}{% include templates/mqtt-broker-guides-banner.md %} diff --git a/_includes/docs/mqtt-broker/install/docker.md b/_includes/docs/mqtt-broker/install/docker.md new file mode 100644 index 0000000000..9ef19d052e --- /dev/null +++ b/_includes/docs/mqtt-broker/install/docker.md @@ -0,0 +1,362 @@ +{% if docsPrefix == null %} +{% assign cacheUrl = "redis_url" %} +{% else %} +{% assign cacheUrl = "valkey_url" %} +{% endif %} + +* TOC +{:toc} + +This guide will help you install and start standalone TBMQ {{tbmqSuffix}} using Docker on Linux or macOS. +If you are looking for a cluster installation instruction, please visit [cluster setup page](/docs/{{docsPrefix}}mqtt-broker/install/cluster/docker-compose-setup/). + +## Prerequisites + +To run TBMQ {{tbmqSuffix}} on a single machine, you will need at least 2Gb of RAM. + +- [Install Docker](https://docs.docker.com/engine/installation/) + +{% include templates/install/docker-install-note.md %} + +{% if docsPrefix == "pe/" %} +## Get the license key + +Before proceeding, make sure you’ve selected your subscription plan or chosen to purchase a perpetual license. +If you haven’t done this yet, please visit the [Pricing page](/pricing/?section=tbmq-options){: target="_blank"} to compare available options +and obtain your license key. + +> **Note:** Throughout this guide, we’ll refer to your license key as **YOUR_LICENSE_KEY_HERE**. + +{% endif %} + +## Installation + +Execute the following commands to download the script that will install and start TBMQ {{tbmqSuffix}}: + +{% include templates/mqtt-broker/install/linux-macos/linux-macos-install.md %} + +The script downloads the _docker-compose.yml_ file, creates necessary docker volumes, installs the database for TBMQ, and starts TBMQ. +Key configuration points for TBMQ in the docker-compose file: + +{% if docsPrefix == "pe/" %} +- `TBMQ_LICENSE_SECRET: YOUR_LICENSE_KEY_HERE` - placeholder for your license secret obtained earlier; +{% endif %} +- `8083:8083` - connect local port 8083 to exposed internal HTTP port 8083; +- `1883:1883` - connect local port 1883 to exposed internal MQTT port 1883; +- `8084:8084` - connect local port 8084 to exposed internal MQTT over WebSockets port 8084; +{% if docsPrefix == null %} +- `tbmq-redis-data:/bitnami/redis/data` - maps the `tbmq-redis-data` volume to TBMQ Redis database data directory; +{% else %} +- `tbmq-valkey-data:/data` - maps the `tbmq-valkey-data` volume to TBMQ Valkey database data directory; +{% endif %} +- `tbmq-postgres-data:/var/lib/postgresql/data` - maps the `tbmq-postgres-data` volume to TBMQ Postgres database data directory; +{% if docsPrefix == null %} +- `tbmq-kafka-data:/bitnami/kafka` - maps the `tbmq-kafka-data` volume to Kafka data directory; +{% else %} +- `tbmq-kafka-data:/var/lib/kafka/data` - maps the `tbmq-kafka-data` volume to Kafka data directory; +{% endif %} +- `tbmq-logs:/var/log/thingsboard-mqtt-broker` - maps the `tbmq-logs` volume to TBMQ logs directory; +- `tbmq-data:/data` - maps the `tbmq-data` volume to TBMQ data directory that contains _.firstlaunch_ file after the DB is installed; +- `tbmq` - friendly local name of this machine; +- `restart: always` - automatically start TBMQ in case of system reboot and restart in case of failure. + +{% if docsPrefix == "pe/" %} + +{% capture replace_tbmq_license_secret %} +Update your `docker-compose.yml` file with the license secret you obtained earlier. +Open the file, find the **TBMQ_LICENSE_SECRET** environment variable, +and replace **YOUR_LICENSE_KEY_HERE** with your actual license secret. +After updating the file, restart TBMQ by running the following command. +{% endcapture %} +{% include templates/warn-banner.md content=replace_tbmq_license_secret %} + +```shell +./tbmq-install-and-run.sh +``` +{: .copy-code} + +{% endif %} + +**Note**: In case the TBMQ is being installed on the same host where ThingsBoard is already running, the following issue can be seen: + +``` +Error response from daemon: ... Bind for 0.0.0.0:1883 failed: port is already allocated +``` + +In order to fix this, you need to expose another host's port for the TBMQ container, +i.e. change the `1883:1883` line in the downloaded docker-compose.yml file with, for example, `1889:1883`. After that re-run the script. + +```shell +./tbmq-install-and-run.sh +``` +{: .copy-code} + +Once the installation process is complete you can access TBMQ UI by visiting the following URL `http://{your-host-ip}:8083` in your browser (e.g. **http://localhost:8083**). + +{% include templates/mqtt-broker/login.md %} + +## Logs, stop and start commands + +In case of any issues you can examine service logs for errors. +For example to see TBMQ logs execute the following command: + +``` +docker compose logs -f tbmq +``` +{: .copy-code} + +To stop the containers: + +``` +docker compose stop +``` +{: .copy-code} + +To start the containers: + +``` +docker compose start +``` +{: .copy-code} + +## Upgrading + +{% include templates/mqtt-broker/upgrade/upgrading.md %} + +### Backup and restore (Optional) + +While backing up your PostgreSQL database is highly recommended, it is optional before proceeding with the upgrade. +{% if docsPrefix == null %} For further guidance, follow the [next instructions](https://github.com/thingsboard/tbmq/blob/main/msa/tbmq/configs/README.md). +{% else %} For further guidance, follow the [next instructions](https://github.com/thingsboard/tbmq-pe-docker-compose/blob/master/basic/README.md). +{% endif %} + +{% if docsPrefix == null %} +### Upgrade to 2.2.0 + +In this release, the MQTT authentication mechanism was migrated from YAML/env configuration into the database. +During upgrade, TBMQ needs to know which authentication providers are enabled in your deployment. +This is done using environment variables passed to the **upgrade container**. + +The upgrade script therefore requires a file named **`.tbmq-upgrade.env`** in the same directory as `docker-compose.yml`. +This file is **used only during upgrade** to create the default auth providers. +Make sure the values match what you already run in your `tbmq` service (`docker-compose.yml → environment:`). + +**Create the env file** + +From the directory containing `docker-compose.yml`: + +```bash +cat > .tbmq-upgrade.env <<'EOF' +SECURITY_MQTT_BASIC_ENABLED=true +SECURITY_MQTT_SSL_ENABLED=true +SECURITY_MQTT_SSL_SKIP_VALIDITY_CHECK_FOR_CLIENT_CERT=false +EOF +``` +{: .copy-code} + +> **Tips** +> If you use only Basic authentication, set `SECURITY_MQTT_SSL_ENABLED=false`. +> If you use only X.509 authentication, set `SECURITY_MQTT_BASIC_ENABLED=false` and `SECURITY_MQTT_SSL_ENABLED=true`. + +**Notes** + +* **Required**: If `.tbmq-upgrade.env` is missing, the upgrade script will fail. +* Supported variables: + + * `SECURITY_MQTT_BASIC_ENABLED` (`true|false`) + * `SECURITY_MQTT_SSL_ENABLED` (`true|false`) + * `SECURITY_MQTT_SSL_SKIP_VALIDITY_CHECK_FOR_CLIENT_CERT` (`true|false`) — usually `false`. + +Once the file is created, continue with the [upgrade process](#run-upgrade). + +### Upgrade to 2.1.0 + +{% include templates/mqtt-broker/upgrade/update-to-2.1.0-release.md %} + +### Upgrade to 2.0.0 + +For the TBMQ 2.0.0 release, the installation scripts have been updated to include Redis configuration. + +Please update your `docker-compose.yml` file to incorporate the Redis settings. +You can review the necessary changes by visiting the following [link](https://github.com/thingsboard/tbmq/pull/142/files#diff-18a10097b03fb393429353a8f84ba29498e9b72a21326deb9809865d384e2800). + +
+
+ +Here is the complete docker compose file with the Redis configuration prior to the upgrade + + +```yaml +# +# Copyright © 2016-2024 The Thingsboard Authors +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +services: + postgres: + restart: always + image: "postgres:15" + ports: + - "5432" + environment: + POSTGRES_DB: thingsboard_mqtt_broker + POSTGRES_PASSWORD: postgres + volumes: + - tbmq-postgres-data:/var/lib/postgresql/data + kafka: + restart: always + image: "bitnamilegacy/kafka:3.5.1" + ports: + - "9092" + environment: + KAFKA_CFG_NODE_ID: 0 + KAFKA_CFG_PROCESS_ROLES: controller,broker + KAFKA_CFG_CONTROLLER_QUORUM_VOTERS: 0@kafka:9093 + KAFKA_CFG_LISTENERS: PLAINTEXT://:9092,CONTROLLER://:9093 + KAFKA_CFG_ADVERTISED_LISTENERS: PLAINTEXT://:9092 + KAFKA_CFG_LISTENER_SECURITY_PROTOCOL_MAP: CONTROLLER:PLAINTEXT,PLAINTEXT:PLAINTEXT + KAFKA_CFG_CONTROLLER_LISTENER_NAMES: CONTROLLER + KAFKA_CFG_INTER_BROKER_LISTENER_NAME: PLAINTEXT + volumes: + - tbmq-kafka-data:/bitnami/kafka + redis: + restart: always + image: "bitnamilegacy/redis:7.0" + environment: + # ALLOW_EMPTY_PASSWORD is recommended only for development. + ALLOW_EMPTY_PASSWORD: "yes" + ports: + - "6379" + volumes: + - tbmq-redis-data:/bitnami/redis/data + tbmq: + restart: always + image: "thingsboard/tbmq:1.4.0" + depends_on: + - postgres + - kafka + - redis + ports: + - "8083:8083" + - "1883:1883" + - "8084:8084" + environment: + TB_SERVICE_ID: tbmq + SPRING_DATASOURCE_URL: jdbc:postgresql://postgres:5432/thingsboard_mqtt_broker + SPRING_DATASOURCE_USERNAME: postgres + SPRING_DATASOURCE_PASSWORD: postgres + TB_KAFKA_SERVERS: kafka:9092 + REDIS_HOST: redis + SECURITY_MQTT_BASIC_ENABLED: "true" + #JAVA_OPTS: "-Xmx2048M -Xms2048M -Xss384k -XX:+AlwaysPreTouch" + volumes: + - tbmq-logs:/var/log/thingsboard-mqtt-broker + - tbmq-data:/data + +volumes: + tbmq-postgres-data: + external: true + tbmq-kafka-data: + external: true + tbmq-redis-data: + external: true + tbmq-logs: + external: true + tbmq-data: + external: true +``` +{: .copy-code} + +
+
+ +Additionally, add the following line to your `tbmq-install-and-run.sh` script (locate `create_volume_if_not_exists` lines) to create a volume for Redis data: + +```bash +create_volume_if_not_exists tbmq-redis-data +``` +{: .copy-code} + +Or simply create it with the following command: + +```bash +docker volume create tbmq-redis-data +``` +{: .copy-code} + +Once this is done, run the script to apply the changes: + +```bash +./tbmq-install-and-run.sh +``` +{: .copy-code} + +This will restart TBMQ with Redis enabled. Afterward, you can proceed with the [upgrade process](#run-upgrade). +Please [contact us](https://github.com/thingsboard/tbmq/issues), so we can answer any questions and provide our help if needed. + +{% else %} + +### Upgrade from TBMQ CE to TBMQ PE (v2.2.0) + +To upgrade your existing **TBMQ Community Edition (CE)** to **TBMQ Professional Edition (PE)**, ensure you are running the latest **TBMQ CE {{site.release.broker_full_ver}}** version before starting the process. +Do not forget to [configure the license key](#get-the-license-key). + +The upgrade procedure requires a file named **`.tbmq-upgrade.env`** located in the same directory as your `docker-compose.yml`. +This file is **only used during the upgrade**. + +**Create the `.tbmq-upgrade.env` file** + +From the directory containing `docker-compose.yml`, run: + +```bash +cat > .tbmq-upgrade.env <<'EOF' +JAVA_TOOL_OPTIONS=-Dinstall.upgrade.from_version=ce +EOF +``` +{: .copy-code} + +**Important Notes** + +* **Required:** The upgrade script will fail if `.tbmq-upgrade.env` is missing. +* After creating the file, proceed with the [upgrade process](#run-upgrade). + +{% endif %} + +### Run upgrade + +In order to update to the latest version, execute the following commands: + +{% if docsPrefix == null %} +```shell +wget -O tbmq-upgrade.sh https://raw.githubusercontent.com/thingsboard/tbmq/{{ site.release.broker_branch }}/msa/tbmq/configs/tbmq-upgrade.sh && +sudo chmod +x tbmq-upgrade.sh && ./tbmq-upgrade.sh +``` +{: .copy-code} +{% else %} +```shell +wget -O tbmq-upgrade.sh https://raw.githubusercontent.com/thingsboard/tbmq-pe-docker-compose/{{ site.release.broker_branch }}/basic/tbmq-upgrade.sh && +sudo chmod +x tbmq-upgrade.sh && ./tbmq-upgrade.sh +``` +{: .copy-code} +{% endif %} + +**NOTE**: replace `{{cacheUrl}}`, `db_url`, `db_username`, and `db_password` variables in the script with the corresponding values used during DB initialization. + +{% include templates/mqtt-broker/upgrade/upgrade-to-custom-release.md %} + +{% include templates/mqtt-broker/install/ssl/mqtts.md %} + +## Next steps + +{% assign currentGuide = "InstallationGuides" %}{% include templates/mqtt-broker-guides-banner.md %} diff --git a/_includes/docs/mqtt-broker/install/ie-config.md b/_includes/docs/mqtt-broker/install/ie-config.md index 3f73c4c3df..1dd2240947 100644 --- a/_includes/docs/mqtt-broker/install/ie-config.md +++ b/_includes/docs/mqtt-broker/install/ie-config.md @@ -80,7 +80,12 @@ queue.kafka.enable-topic-deletion TB_KAFKA_ENABLE_TOPIC_DELETION true - Enable/disable deletion of topics for Application MQTT Clients + Controls whether TBMQ is allowed to delete Kafka topics that were created for + Integrations. + When set to 'true', TBMQ may automatically remove topics during cleanup + (for example, when the Integration is deleted). + When set to 'false', TBMQ will skip topic deletions and simply stop using them. + This helps prevent accidental data loss in production environments queue.kafka.default.consumer.partition-assignment-strategy diff --git a/_includes/docs/mqtt-broker/install/ie-configuration.md b/_includes/docs/mqtt-broker/install/ie-configuration.md new file mode 100644 index 0000000000..f9c39c7b7d --- /dev/null +++ b/_includes/docs/mqtt-broker/install/ie-configuration.md @@ -0,0 +1,48 @@ +* TOC +{:toc} + +This guide will help you become familiar with TBMQ {{tbmqSuffix}} Integration Executor (IE) configuration files and parameters. +We **strongly recommend** configuring TBMQ IE using environment variables. +This way, you won't need to merge the configuration files when a new platform release arrives. + +The list of available configuration parameters and corresponding environment variables can be found [here](#configuration-parameters). + +## How to change configuration parameters? + +### Docker-Based deployment + +If TBMQ IE is installed in a Docker Compose environment, you can edit the scripts and add environment variables for +the corresponding containers. For more details, refer to the [Docker documentation](https://docs.docker.com/compose/environment-variables/#/the-envfile-configuration-option). + +### K8S-Based deployment + +If TBMQ IE is installed in a K8S environment, you can edit the scripts and add environment variables for the +corresponding deployments/stateful sets. For more details, refer to the [K8S documentation](https://kubernetes.io/docs/tasks/inject-data-application/define-environment-variable-container/). + +## Configuration parameters + +The configuration file is written in YAML format. All configuration parameters have corresponding environment variable names and default values. +To change a configuration parameter, simply modify its default value. For example: + +```bash +server: + address: "${HTTP_BIND_ADDRESS:0.0.0.0}" +``` + +In this case, *'HTTP_BIND_ADDRESS'* is the environment variable name and *'0.0.0.0'* is the default value. + +You can use the simple example below to add a new environment variable 'HTTP_BIND_PORT' with the value '8084'. + +```bash +... +export HTTP_BIND_PORT=8084 +``` + +The parameters are grouped by system components. The list contains the name (address in **tbmq-integration-executor.yml** file), +environment variable, default value, and description. + +{% if docsPrefix == "pe/" %} +{% include docs/pe/mqtt-broker/install/ie-config.md %} +{% else %} +{% include docs/mqtt-broker/install/ie-config.md %} +{% endif %} diff --git a/_includes/docs/mqtt-broker/install/upgrade-instructions.md b/_includes/docs/mqtt-broker/install/upgrade-instructions.md new file mode 100644 index 0000000000..266dc649c2 --- /dev/null +++ b/_includes/docs/mqtt-broker/install/upgrade-instructions.md @@ -0,0 +1,352 @@ + +* TOC +{:toc} + +{% if (docsPrefix == "pe/") %} + +
+
+
+
+
+

TBMQ Professional Edition upgrade options

+
+
+
+ {% include installation-options-cards.liquid installationOptions="installation-options-pe-mqtt-broker-upgrade-instructions" active=true %} +
+
+
+
+
+
+ +{% else %} + +
+
+
+
+
+

TBMQ upgrade options

+
+
+
+ {% include installation-options-cards.liquid installationOptions="installation-options-mqtt-broker-upgrade-instructions" active=true %} +
+
+
+
+
+
+ +{% endif %} + +{% if docsPrefix == "pe/" %} + +### Upgrade from TBMQ CE to TBMQ PE (v2.2.0) + +{% capture difference %} +**NOTE**: +
+These steps are applicable for 2.2.0 TBMQ CE version. In order to upgrade to TBMQ PE 2.2.0 you need to [upgrade to 2.2.0 TBMQ CE first](/docs/mqtt-broker/install/upgrade-instructions/#upgrading-to-220). +**Notice the Bitnami Images information.** +{% endcapture %} +{% include templates/info-banner.md content=difference %} + +#### Notice: Third-Party Component Updates in TBMQ PE v2.2.0 + +We’d like to inform you about several **third-party component updates** introduced in **TBMQ Professional Edition (PE) v2.2.0** compared to the Community Edition (CE). +These changes improve performance, stability, and align TBMQ with officially supported open-source technologies. + +These updates follow the modernization plan outlined here: +[Bitnami Image Migration](https://github.com/thingsboard/thingsboard-ce-k8s/blob/master/BITNAMI-IMAGE-MIGRATION.md#3-long-term-production-solution). + +#### What’s Changed + +| Component | TBMQ CE v2.2.0 | TBMQ PE v2.2.0 | What Changed & Why | +| ------------------ | --------------------------- | -------------------- |-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| +| **PostgreSQL** | `postgres:16` | `postgres:17` | Upgraded to a newer major version with improved performance, reliability, and better resource efficiency. Existing data volumes remain fully compatible. | +| **Kafka** | `bitnamilegacy/kafka:3.7.0` | `apache/kafka:4.0.0` | Updated according to the plan to migrate from Bitnami to official open-source images. New volumes were introduced and all of them are mapped to new paths required by the Apache Kafka image. | +| **Redis → Valkey** | `bitnamilegacy/redis:7.2.5` | `valkey/valkey:8.0` | Updated according to the plan to migrate from Bitnami to open-source images. Redis was replaced by Valkey (a community-driven fork of Redis 7). A new volume (`tbmq-valkey-data`) was introduced and mapped to the appropriate data directory used by the Valkey image. | + +#### Important Notes + +Upgrading from TBMQ CE 2.2.0 to TBMQ PE 2.2.0 introduces several component changes that require attention before and during the migration process. + +Before starting the upgrade, it is **strongly recommended to create full backups** of your existing environment. +This includes the **PostgreSQL database** (for example, using `pg_dump`), as well as your **Kafka** and **Redis** data volumes if you plan to migrate them. +Backups ensure that your environment can be safely restored in case of configuration or compatibility issues during the upgrade. + +The PostgreSQL version is upgraded from **16 to 17**, providing improved performance, reliability, and resource efficiency. +Although existing data volumes remain compatible, you still need to perform a proper database version upgrade (for example, using `pg_upgrade`) +to ensure data integrity and full compatibility with the new version. + +Both Kafka and Redis have been migrated from Bitnami images to official open-source ones — **Apache Kafka** and **Valkey**, respectively. +This migration is part of the long-term modernization plan to move away from Bitnami images. +Along with this change, **Kafka was upgraded from version 3.7.0 to 4.0.0**, introducing improvements in performance, scalability, and message handling efficiency. +The new images use **different internal data directories and volume mappings**, so existing Bitnami volumes cannot be reused directly. +You must either **migrate your Kafka and Redis data manually** or **start from new, empty volumes**. +> **⚠️ Be cautious:** starting from new volumes will remove all data currently stored in Kafka and Redis, including client session states, undelivered and retained messages, and any other persisted broker data. + +The standard upgrade script focuses only on updating the PostgreSQL database schema and does not include data migration logic for Kafka or Valkey. + +--- + +Navigate to the appropriate documentation to proceed with the next upgrade steps by [choosing one of the cards](/docs/{{docsPrefix}}mqtt-broker/install/upgrade-instructions/) +on top of the page. + +{% else %} + +{% if docsPrefix != 'pe/' %} +{% capture difference %} +Interested in the **TBMQ Professional Edition**? Upgrade your TBMQ CE to [TBMQ PE](/docs/pe/mqtt-broker/install/upgrade-instructions/){:target="_blank"}. +{% endcapture %} +{% include templates/info-banner.md content=difference %} +{% endif %} + +### Upgrading to 2.2.0 + +{% capture difference %} +**NOTE**: +
+These steps are applicable for 2.1.0 TBMQ version. In order to upgrade to 2.2.0 you need to [upgrade to 2.1.0 first](#upgrading-to-210). +{% endcapture %} +{% include templates/info-banner.md content=difference %} + +#### Notice About Bitnami Images in TBMQ Deployments + +In our TBMQ deployments, we use **Bitnami images** for third-party components such as PostgreSQL, Redis, and Kafka. +The Bitnami team [**has announced important upcoming changes**](https://github.com/bitnami/charts/issues/35164) to their catalog that affect these images. + +**What’s happening:** + +* Starting **August 28, 2025**, the public `docker.io/bitnami` registry will only provide a small set of “latest” hardened images for development use. +* All versioned images will be moved to a temporary legacy registry: `docker.io/bitnamilegacy`. These images will remain available but will not receive updates or security patches. +* The long-term, supported solution is Bitnami’s new Secure Images (subscription-based). + +**Temporary solution:** +To avoid disruption in your TBMQ deployments, please update your image references from `docker.io/bitnami/...` to `docker.io/bitnamilegacy/...`. +This ensures that your clusters continue to work after August 28, 2025. + +**Next steps:** +We are currently evaluating a **long-term strategy** for TBMQ third-party images. We’ll share the details once the new approach is finalized. + +--- + +Navigate to the appropriate documentation to proceed with the next upgrade steps by [choosing one of the cards](/docs/{{docsPrefix}}mqtt-broker/install/upgrade-instructions/) +on top of the page. + +### Upgrading to 2.1.0 + +{% capture difference %} +**NOTE**: +
+These steps are applicable for 2.0.0 and 2.0.1 TBMQ versions. +In order to upgrade to 2.1.0, your current version should be greater or equal to 2.0.0 version. +{% endcapture %} +{% include templates/info-banner.md content=difference %} + +#### Pull TBMQ image (Optional) + +Pull 2.1.0 version TBMQ image depending on your current installation. + +{% capture tabspec %}tbmq-pull-2-1-0 +tbmq-pull-2-1-0-single,Single node,shell,resources/2.1.0/tbmq-single-node-pull.sh,/docs/{{docsPrefix}}mqtt-broker/install/resources/2.1.0/tbmq-single-node-pull.sh +tbmq-pull-2-1-0-cluster,Cluster mode,shell,resources/2.1.0/tbmq-cluster-mode-pull.sh,/docs/{{docsPrefix}}mqtt-broker/install/resources/2.1.0/tbmq-cluster-mode-pull.sh{% endcapture %} +{% include tabs.html %} + +#### From version (automatically detected since 2.1.0) + +Starting from version 2.1.0, the _fromVersion_ parameter has been removed from the upgrade script and is no longer supported. +As of 2.1.0, the upgrade script automatically detects the currently installed version and determines whether the upgrade can proceed based on a predefined list of supported versions. + +Navigate to the appropriate documentation to proceed with the next upgrade steps by [choosing one of the cards](/docs/{{docsPrefix}}mqtt-broker/install/upgrade-instructions/) +on top of the page. + +### Upgrading to 2.0.1 + +{% capture difference %} +**NOTE**: +
+These steps are applicable for 2.0.0 TBMQ version. In order to upgrade to 2.0.1 you need to [upgrade to 2.0.0 first](#upgrading-to-200). +{% endcapture %} +{% include templates/info-banner.md content=difference %} + +#### Pull TBMQ image (Optional) + +Pull 2.0.1 version TBMQ image depending on your current installation. + +{% capture tabspec %}tbmq-pull-2-0-1 +tbmq-pull-2-0-1-single,Single node,shell,resources/2.0.1/tbmq-single-node-pull.sh,/docs/{{docsPrefix}}mqtt-broker/install/resources/2.0.1/tbmq-single-node-pull.sh +tbmq-pull-2-0-1-cluster,Cluster mode,shell,resources/2.0.1/tbmq-cluster-mode-pull.sh,/docs/{{docsPrefix}}mqtt-broker/install/resources/2.0.1/tbmq-cluster-mode-pull.sh{% endcapture %} +{% include tabs.html %} + +#### From version + +The _fromVersion_ should be set to **2.0.0**. + +Navigate to the appropriate documentation to proceed with the next upgrade steps by [choosing one of the cards](/docs/{{docsPrefix}}mqtt-broker/install/upgrade-instructions/) +on top of the page. + +### Upgrading to 2.0.0 + +{% capture difference %} +**NOTE**: +
+These steps are applicable for 1.4.0 TBMQ version. In order to upgrade to 2.0.0 you need to [upgrade to 1.4.0 first](#upgrading-to-140). +{% endcapture %} +{% include templates/info-banner.md content=difference %} + +This release of TBMQ introduces significant improvements, including key new features and a migration from PostgreSQL to Redis for storing messages for persistent DEVICE clients. +For more details, refer to the [architecture documentation](/docs/{{docsPrefix}}mqtt-broker/architecture/). + +Before upgrading, it is strongly recommended to back up your PostgreSQL database to ensure data safety. +Follow the steps by selecting an appropriate guide from [one of the cards](/docs/{{docsPrefix}}mqtt-broker/install/upgrade-instructions/) on top of the page. + +#### Pull TBMQ image (Optional) + +Pull 2.0.0 version TBMQ image depending on your current installation. + +{% capture tabspec %}tbmq-pull-2-0-0 +tbmq-pull-2-0-0-single,Single node,shell,resources/2.0.0/tbmq-single-node-pull.sh,/docs/{{docsPrefix}}mqtt-broker/install/resources/2.0.0/tbmq-single-node-pull.sh +tbmq-pull-2-0-0-cluster,Cluster mode,shell,resources/2.0.0/tbmq-cluster-mode-pull.sh,/docs/{{docsPrefix}}mqtt-broker/install/resources/2.0.0/tbmq-cluster-mode-pull.sh{% endcapture %} +{% include tabs.html %} + +#### From version + +The _fromVersion_ should be set to **1.4.0**. + +Navigate to the appropriate documentation to proceed with the next upgrade steps by [choosing one of the cards](/docs/{{docsPrefix}}mqtt-broker/install/upgrade-instructions/) +on top of the page. + +### Upgrading to 1.4.0 + +{% capture difference %} +**NOTE**: +
+These steps are applicable for 1.3.0 TBMQ version. In order to upgrade to 1.4.0 you need to [upgrade to 1.3.0 first](#upgrading-to-130). +{% endcapture %} +{% include templates/info-banner.md content=difference %} + +#### Pull TBMQ image (Optional) + +Pull 1.4.0 version TBMQ image depending on your current installation. + +{% capture tabspec %}tbmq-pull-1-4-0 +tbmq-pull-1-4-0-single,Single node,shell,resources/1.4.0/tbmq-single-node-pull.sh,/docs/{{docsPrefix}}mqtt-broker/install/resources/1.4.0/tbmq-single-node-pull.sh +tbmq-pull-1-4-0-cluster,Cluster mode,shell,resources/1.4.0/tbmq-cluster-mode-pull.sh,/docs/{{docsPrefix}}mqtt-broker/install/resources/1.4.0/tbmq-cluster-mode-pull.sh{% endcapture %} +{% include tabs.html %} + +#### From version + +The _fromVersion_ should be set to **1.3.0**. + +Navigate to the appropriate documentation to proceed with the next upgrade steps by [choosing one of the cards](/docs/{{docsPrefix}}mqtt-broker/install/upgrade-instructions/) +on top of the page. + +### Upgrading to 1.3.0 + +{% capture difference %} +**NOTE**: +
+These steps are applicable for 1.2.1 TBMQ version. In order to upgrade to 1.3.0 you need to [upgrade to 1.2.1 first](#upgrading-to-121). +{% endcapture %} +{% include templates/info-banner.md content=difference %} + +#### Pull TBMQ image (Optional) + +Pull 1.3.0 version TBMQ image depending on your current installation. + +{% capture tabspec %}tbmq-pull-1-3-0 +tbmq-pull-1-3-0-single,Single node,shell,resources/1.3.0/tbmq-single-node-pull.sh,/docs/{{docsPrefix}}mqtt-broker/install/resources/1.3.0/tbmq-single-node-pull.sh +tbmq-pull-1-3-0-cluster,Cluster mode,shell,resources/1.3.0/tbmq-cluster-mode-pull.sh,/docs/{{docsPrefix}}mqtt-broker/install/resources/1.3.0/tbmq-cluster-mode-pull.sh{% endcapture %} +{% include tabs.html %} + +#### From version + +The _fromVersion_ should be set to **1.2.1**. + +Navigate to the appropriate documentation to proceed with the next upgrade steps by [choosing one of the cards](/docs/{{docsPrefix}}mqtt-broker/install/upgrade-instructions/) +on top of the page. + +### Upgrading to 1.2.1 + +{% capture difference %} +**NOTE**: +
+These steps are applicable for 1.2.0 TBMQ version. In order to upgrade to 1.2.1 you need to [upgrade to 1.2.0 first](#upgrading-to-120). +{% endcapture %} +{% include templates/info-banner.md content=difference %} + +#### Pull TBMQ image (Optional) + +Pull 1.2.1 version TBMQ image depending on your current installation. + +{% capture tabspec %}tbmq-pull-1-2-1 +tbmq-pull-1-2-1-single,Single node,shell,resources/1.2.1/tbmq-single-node-pull.sh,/docs/{{docsPrefix}}mqtt-broker/install/resources/1.2.1/tbmq-single-node-pull.sh +tbmq-pull-1-2-1-cluster,Cluster mode,shell,resources/1.2.1/tbmq-cluster-mode-pull.sh,/docs/{{docsPrefix}}mqtt-broker/install/resources/1.2.1/tbmq-cluster-mode-pull.sh{% endcapture %} +{% include tabs.html %} + +#### From version + +The _fromVersion_ should be set to **1.2.0**. + +Navigate to the appropriate documentation to proceed with the next upgrade steps by [choosing one of the cards](/docs/{{docsPrefix}}mqtt-broker/install/upgrade-instructions/) +on top of the page. + +### Upgrading to 1.2.0 + +{% capture difference %} +**NOTE**: +
+These steps are applicable for 1.1.0 TBMQ version. In order to upgrade to 1.2.0 you need to [upgrade to 1.1.0 first](#upgrading-to-110). +{% endcapture %} +{% include templates/info-banner.md content=difference %} + +#### Pull TBMQ image (Optional) + +Pull 1.2.0 version TBMQ image depending on your current installation. + +{% capture tabspec %}tbmq-pull-1-2-0 +tbmq-pull-1-2-0-single,Single node,shell,resources/1.2.0/tbmq-single-node-pull.sh,/docs/{{docsPrefix}}mqtt-broker/install/resources/1.2.0/tbmq-single-node-pull.sh +tbmq-pull-1-2-0-cluster,Cluster mode,shell,resources/1.2.0/tbmq-cluster-mode-pull.sh,/docs/{{docsPrefix}}mqtt-broker/install/resources/1.2.0/tbmq-cluster-mode-pull.sh{% endcapture %} +{% include tabs.html %} + +#### From version + +The _fromVersion_ should be set to **1.1.0**. + +Navigate to the appropriate documentation to proceed with the next upgrade steps by [choosing one of the cards](/docs/{{docsPrefix}}mqtt-broker/install/upgrade-instructions/) +on top of the page. + +### Upgrading to 1.1.0 + +{% capture difference %} +**NOTE**: +
+These steps are applicable for 1.0.0, and 1.0.1 TBMQ versions. +{% endcapture %} +{% include templates/info-banner.md content=difference %} + +#### Pull TBMQ image (Optional) + +Pull 1.1.0 version TBMQ image depending on your current installation. + +{% capture tabspec %}tbmq-pull-1-1-0 +tbmq-pull-1-1-0-single,Single node,shell,resources/1.1.0/tbmq-single-node-pull.sh,/docs/{{docsPrefix}}mqtt-broker/install/resources/1.1.0/tbmq-single-node-pull.sh +tbmq-pull-1-1-0-cluster,Cluster mode,shell,resources/1.1.0/tbmq-cluster-mode-pull.sh,/docs/{{docsPrefix}}mqtt-broker/install/resources/1.1.0/tbmq-cluster-mode-pull.sh{% endcapture %} +{% include tabs.html %} + +#### From version + +The _fromVersion_ can be set to either **1.0.0** or **1.0.1** values. + +Navigate to the appropriate documentation to proceed with the next upgrade steps by [choosing one of the cards](/docs/{{docsPrefix}}mqtt-broker/install/upgrade-instructions/) +on top of the page. + +{% endif %} + +### Next steps + +{% assign currentGuide = "InstallationGuides" %}{% include templates/mqtt-broker-guides-banner.md %} diff --git a/_includes/docs/mqtt-broker/integrations/http.md b/_includes/docs/mqtt-broker/integrations/http.md index 35f054fafa..be5a4e457b 100644 --- a/_includes/docs/mqtt-broker/integrations/http.md +++ b/_includes/docs/mqtt-broker/integrations/http.md @@ -19,9 +19,9 @@ TBMQ HTTP Integration enables forwarding MQTT messages to an external HTTP servi Before setting up the integration, ensure the following: -- A running **[TBMQ](/docs/mqtt-broker/install/installation-options/)** instance. +- A running **[TBMQ](/docs/{{docsPrefix}}mqtt-broker/install/installation-options/)** instance. - An external service ready to receive HTTP requests (e.g., **[ThingsBoard Cloud](/docs/paas/getting-started-guides/what-is-thingsboard-cloud/)**). -- A client capable of publishing MQTT messages (e.g., **[TBMQ WebSocket Client](/docs/mqtt-broker/user-guide/ui/websocket-client/)**). +- A client capable of publishing MQTT messages (e.g., **[TBMQ WebSocket Client](/docs/{{docsPrefix}}mqtt-broker/user-guide/ui/websocket-client/)**). ## Create ThingsBoard Integration diff --git a/_includes/docs/mqtt-broker/integrations/index.md b/_includes/docs/mqtt-broker/integrations/index.md index c60c13ac6e..85f6b32b50 100644 --- a/_includes/docs/mqtt-broker/integrations/index.md +++ b/_includes/docs/mqtt-broker/integrations/index.md @@ -2,8 +2,10 @@ * TOC {:toc} +{% if docsPrefix != "pe/" %} {% assign sinceVersion = "2.1.0" %} {% include templates/mqtt-broker/since.md %} +{% endif %} ## Overview @@ -179,7 +181,7 @@ This pattern provides a **durable, distributed configuration source** backed by Although downlink topics are not used for message processing (which is useful for parallel processing), separating them by integration type provides several key benefits: -- **Executor Specialization**: You can assign specific Integration Executor instances to process only certain integration types using the `TB_SERVICE_INTEGRATIONS_SUPPORTED` and `TB_SERVICE_INTEGRATIONS_EXCLUDED` [environment variables](/docs/mqtt-broker/install/ie-config/#service-parameters). +- **Executor Specialization**: You can assign specific Integration Executor instances to process only certain integration types using the `TB_SERVICE_INTEGRATIONS_SUPPORTED` and `TB_SERVICE_INTEGRATIONS_EXCLUDED` [environment variables](/docs/{{docsPrefix}}mqtt-broker/install/ie-config/#service-parameters). - **Targeted Consumption**: Executors subscribe only to topics they are configured to handle. - **Improved Isolation**: Different integration types often have different configuration payloads and validation logic. Dedicated topics ensure that only relevant messages are received by each executor. - **Operational Simplicity**: Easier to debug and monitor traffic per integration type. @@ -238,7 +240,7 @@ The integration will not be saved. ![image](/images/mqtt-broker/integrations/tbmq-ie-admin-ok.png) The Integration Executor is running and the configuration is valid. Result: **Success**. -Once validation succeeds, the integration entity is saved in the database, the integration subscriptions are persisted in the [Subscription Trie](/docs/mqtt-broker/architecture/#subscriptions-trie), +Once validation succeeds, the integration entity is saved in the database, the integration subscriptions are persisted in the [Subscription Trie](/docs/{{docsPrefix}}mqtt-broker/architecture/#subscriptions-trie), and integration configuration event is sent to the Integration Executor for processing. ### Integration Message Processing Topic @@ -464,9 +466,9 @@ This architecture supports modern cloud-native deployment models and ensures tha TBMQ currently supports three outbound integration types, each designed for specific use cases: -- [**HTTP Integration**](/docs/mqtt-broker/integrations/http/) – Send MQTT messages to REST APIs or Webhooks via HTTP(S). -- [**MQTT Integration**](/docs/mqtt-broker/integrations/mqtt/) – Forward messages to external MQTT brokers for cross-broker communication via MQTT(S). -- [**Kafka Integration**](/docs/mqtt-broker/integrations/kafka/) – Stream messages into Kafka topics for real-time processing via TCP(TLS). +- [**HTTP Integration**](/docs/{{docsPrefix}}mqtt-broker/integrations/http/) – Send MQTT messages to REST APIs or Webhooks via HTTP(S). +- [**MQTT Integration**](/docs/{{docsPrefix}}mqtt-broker/integrations/mqtt/) – Forward messages to external MQTT brokers for cross-broker communication via MQTT(S). +- [**Kafka Integration**](/docs/{{docsPrefix}}mqtt-broker/integrations/kafka/) – Stream messages into Kafka topics for real-time processing via TCP(TLS). ## Roadmap diff --git a/_includes/docs/mqtt-broker/integrations/kafka.md b/_includes/docs/mqtt-broker/integrations/kafka.md index 6bd6543884..64dcb48662 100644 --- a/_includes/docs/mqtt-broker/integrations/kafka.md +++ b/_includes/docs/mqtt-broker/integrations/kafka.md @@ -23,7 +23,7 @@ TBMQ Kafka Integration processes messages and forwards them to an external Kafka Before setting up the integration, ensure the following: -- A running **[TBMQ](/docs/mqtt-broker/install/installation-options/) instance**. +- A running **[TBMQ](/docs/{{docsPrefix}}mqtt-broker/install/installation-options/) instance**. - An external service ready to receive Kafka message (e.g. **Confluent Cloud**). - A client capable of publishing MQTT messages (e.g., **TBMQ WebSocket Client**). diff --git a/_includes/docs/mqtt-broker/integrations/mqtt.md b/_includes/docs/mqtt-broker/integrations/mqtt.md index 3cec3dd59f..1e83224be9 100644 --- a/_includes/docs/mqtt-broker/integrations/mqtt.md +++ b/_includes/docs/mqtt-broker/integrations/mqtt.md @@ -22,7 +22,7 @@ MQTT Integration processes messages and forwards them to an external MQTT broker Before setting up the integration, ensure the following: -- A running **[TBMQ](/docs/mqtt-broker/install/installation-options/) instance**. +- A running **[TBMQ](/docs/{{docsPrefix}}mqtt-broker/install/installation-options/) instance**. - A client capable of publishing MQTT messages (e.g., **TBMQ WebSocket Client**). - A client capable of receiving MQTT messages (e.g., **TBMQ WebSocket Client**). diff --git a/_includes/docs/mqtt-broker/mqtt-client-credentials-management.md b/_includes/docs/mqtt-broker/mqtt-client-credentials-management.md new file mode 100644 index 0000000000..1cf5590f17 --- /dev/null +++ b/_includes/docs/mqtt-broker/mqtt-client-credentials-management.md @@ -0,0 +1,91 @@ +* TOC +{:toc} + +MQTT Client Credentials provide the means to configure security measures for connecting clients within the system. + +To create new client credentials within the system, it is imperative to first authenticate as an Admin user. +This authorization process grants you the necessary privileges and access rights to perform administrative tasks. + +By authenticating as an Admin user, you will have the authority to create and manage client credentials, +enabling you to enforce robust security measures for the clients connecting to the system. +This approach ensures that the system remains secure and that only authorized clients can establish connections and interact with TBMQ. + +{% include templates/mqtt-broker/authentication.md %} + +## Create/update MQTT Client Credentials + +**MQTT_BASIC** credentials example: + +```bash +curl --location --request POST 'http://localhost:8083/api/mqtt/client/credentials' \ +--header "X-Authorization: Bearer $ACCESS_TOKEN" \ +--header 'Content-Type: application/json' \ +--data-raw '{ + "name": "testCreds", + "credentialsType":"MQTT_BASIC", + "credentialsValue":"{ \"clientId\": null, \"userName\": \"test_user\", \"password\": \"test_pass\", \"authRules\": { \"pubAuthRulePatterns\": [\"test\/.*\"], \"subAuthRulePatterns\": [\"my\/.*\"] } }" +}' +``` +{: .copy-code} + +By implementing the above configuration, clients with the username **test_user** and password **test_pass** will be able to successfully log in to the system. +However, it's important to note that these clients will have restricted privileges based on the specified topic access permissions. + +Clients authenticated with these credentials will be limited to publishing messages solely to topics that start with _test/_. +Additionally, they will be allowed to subscribe exclusively to topics that start with _my/_. +This configuration ensures that the clients' access is constrained to specific topic patterns, thereby maintaining a controlled and secure environment. + +**SSL** credentials examples: + +```bash +curl --location --request POST 'http://localhost:8083/api/mqtt/client/credentials' \ +--header "X-Authorization: Bearer $ACCESS_TOKEN" \ +--header 'Content-Type: application/json' \ +--data-raw '{ + "name": "testSSLCreds", + "credentialsType":"X_509", + "credentialsValue":"{ \"certCnPattern\": \"Root Common Name\", \"certCnIsRegex\": false, \"authRulesMapping\": { \"test\": { \"pubAuthRulePatterns\": [\"test_ssl\/.*\"], \"subAuthRulePatterns\": [\"test_ssl\/.*\"] } } }" +}' +``` +{: .copy-code} + +```bash +curl --location --request POST 'http://localhost:8083/api/mqtt/client/credentials' \ +--header "X-Authorization: Bearer $ACCESS_TOKEN" \ +--header 'Content-Type: application/json' \ +--data-raw '{ + "name": "testSSLCredsWithPattern", + "credentialsType":"X_509", + "credentialsValue":"{ \"certCnPattern\": \".* Pattern Common Name .*\", \"certCnIsRegex\": true, \"authRulesMapping\": { \"test\": { \"pubAuthRulePatterns\": [\"test_ssl\/.*\"], \"subAuthRulePatterns\": [\"test_ssl\/.*\"] } } }" +}' +``` +{: .copy-code} + +Where: +- **certCnPattern** - the pattern for the common name that should be present in the certificate chain. +- **certCnIsRegex** - option to control whether the common name (CN) pattern is treated as a regular expression (regex) for matching. +- **authRulesMapping** - mapping rules to map extracted from the client's CN keyword to the authorization rules (to allow clients to publish and subscribe only to certain topics). + +By employing the above configurations, clients connecting with an X.509 Certificate chain will be permitted to log in based on specific criteria. +The X.509 Certificate chain should have the certificate CN that matches exactly with the _Root Common Name_ string in the first case, +matches with _.* Pattern Common Name .*_ in the second case, and the certificate's CN should contain the string _test_. +Once authenticated using these credentials, clients will gain access to publishing and subscribing privileges limited to topics that start with _test_ssl/_. + +## Get all MQTT Client Credentials + +```bash +curl --location --request GET 'http://localhost:8083/api/mqtt/client/credentials?pageSize=100&page=0' \ +--header "X-Authorization: Bearer $ACCESS_TOKEN" +``` +{: .copy-code} +**Note**, _pageSize_ parameter equal to 100 and _page_ parameter equal to 0, so the above request will fetch first 100 MQTT client credentials. + +## Delete MQTT Client Credentials + +```bash +curl --location --request DELETE 'http://localhost:8083/api/mqtt/client/credentials/$CREDENTIALS_ID' \ +--header "X-Authorization: Bearer $ACCESS_TOKEN" +``` +{: .copy-code} + +Paste actual ID of the MQTT client credentials you want to delete instead of _$CREDENTIALS_ID_. diff --git a/_includes/docs/mqtt-broker/other/blocked-client.md b/_includes/docs/mqtt-broker/other/blocked-client.md new file mode 100644 index 0000000000..ae94bb7fe6 --- /dev/null +++ b/_includes/docs/mqtt-broker/other/blocked-client.md @@ -0,0 +1,107 @@ + +* TOC +{:toc} + +The **Blocked Clients** feature in TBMQ allows administrators to restrict access to the broker based on specific client identifiers or pattern-based rules. +It strengthens security, helps conserve system resources, and provides fine-grained control over who can initiate and maintain connections with the MQTT broker. + +Blocked Clients are stored in memory for fast and efficient matching and are synchronized across all broker nodes in the cluster using Kafka. +This ensures consistent enforcement of block rules in distributed deployments. + +Each Blocked Client entry can include an optional expiration timestamp. Once expired, the entry is treated as inactive and automatically cleaned up during the periodic cleanup process. + +Importantly, Blocked Client checks are performed **before** the authentication phase. +This ensures that unauthorized or potentially malicious connection attempts are rejected early—before any credentials are evaluated—resulting in reduced system load and faster rejection of disallowed clients. + +> **Scenario**: You’ve detected a client (clientId: attack-bot-23) trying to flood the broker with connection attempts or malformed packets. +> **Action**: Create a CLIENT_ID block entry to immediately prevent further connections from this client. +> **Benefit**: Immediate mitigation of malicious behavior without requiring changes to authentication logic or certificates. + +## Supported Block Types + +{% if docsPrefix == "pe/" %} +![image](/images/pe/mqtt-broker/other/blocked-clients.png) +{% else %} +![image](/images/mqtt-broker/other/blocked-clients.png) +{% endif %} + +You can block a client using any of the following identifiers: + +| Block by | Label on UI | Description | +| ------------ |-------------| -------------------------------------- | +| `CLIENT_ID` | Client ID | Block clients with specific client IDs | +| `USERNAME` | Username | Block based on MQTT usernames | +| `IP_ADDRESS` | IP address | Block by the client’s IP address | +| `REGEX` | Regex | Pattern-based blocking using regex | + +The `REGEX` type supports matching based on one of: + +* `BY_CLIENT_ID` (UI label is "Client ID"). +* `BY_USERNAME` (UI label is "Username"). +* `BY_IP_ADDRESS` (UI label is "IP address"). + +To block all clients whose IDs start with `test-` followed by digits, you can use the following regex rule: + +```text +Block by: REGEX +Regex Pattern Value: ^test-\d+$ +Match by: BY_CLIENT_ID +``` + +This will block clients such as: + +* `test-001` +* `test-42` +* `test-9999` + +But **not**: + +* `demo-test-1` +* `test-user` +* `test-` + +Each entry can be in one of the following **three statuses**: + +* ✅ **Active** – The entry is valid and fully operational. +* ⏳ **Expired** – The entry is no longer valid but hasn't been cleaned up yet. +* ⚠️ **Deleting soon** – A transitional state for expired entries. This status appears **when more than half of the cleanup grace period has passed**, signaling that the entry is about to be removed by the system. + +## How It Works + +During the connection phase, each client is evaluated in the following order: + +1. Exact match on `CLIENT_ID`. +2. Exact match on `USERNAME`. +3. Exact match on `IP_ADDRESS`. +4. Regex-based match (if any exist). + +If a match is found and the corresponding entry is not expired, the connection is rejected. +Blocked Client events are also tracked and visible via the [Unauthorized Clients](/docs/{{docsPrefix}}mqtt-broker/user-guide/ui/unauthorized-clients/) feature. + +## Automatic Cleanup + +Expired Blocked Clients are automatically cleaned up in the background. + +```yaml +blocked-client: + cleanup: + # The parameter to specify the period of execution cleanup task for expired blocked clients. Value set in minutes. Default value corresponds to five minutes + period: "${BLOCKED_CLIENT_CLEANUP_PERIOD_MINUTES:5}" + # Time to Live for expired blocked clients. After this time, the expired blocked client is removed completely. Value set in minutes. Default value corresponds to one week + ttl: "${BLOCKED_CLIENT_CLEANUP_TTL_MINUTES:10080}" +``` + +Cleanup is performed only when the Blocked Client is expired and the TTL period has passed. + +## Recommendations + +To ensure optimal performance and maintainability when using the **Blocked Clients** feature, consider the following best practices: + +* **Avoid using regex rules unless truly needed**: Pattern matching with regular expressions can slow down the system, +as all regex rules must be checked for every client connection. Use this only when exact matches by client ID, username, or IP address are not enough. + +* **Use authentication to reject the majority of clients**: It’s better to block clients using standard authentication methods. +Blocking should be used as an additional method, not the main one. + +* **Keep the number of Blocked Clients low**: A large number of blocked entries, especially regex-based ones, can use more memory and slow down lookups. +Keeping the list small ensures faster performance and better scalability. \ No newline at end of file diff --git a/_includes/docs/mqtt-broker/other/health.md b/_includes/docs/mqtt-broker/other/health.md new file mode 100644 index 0000000000..bbb7a592df --- /dev/null +++ b/_includes/docs/mqtt-broker/other/health.md @@ -0,0 +1,246 @@ +* TOC +{:toc} + +TBMQ supports **health checks** through the Spring Boot Actuator framework. +Health checks allow monitoring systems to assess the state of TBMQ and its dependencies. +TBMQ health checks are available through the `/actuator/health` endpoint on **8083** port, +which can be customized to include specific details about the connection health to critical services such as **PostgreSQL**, **Kafka**, and **Redis**. + +## Health Endpoint Response Status Codes + +* **200 OK**: The system is healthy, and all components are functioning properly. +* **503 Service Unavailable**: One or more components have failed, and the system is deemed unhealthy. + +## Key Configuration Parameters + +The following parameters are used to configure health checks and expose them through the actuator endpoint. + +```yaml +management: + health: + diskspace: + # Enable/disable disk space health check + enabled: "${HEALTH_DISKSPACE_ENABLED:false}" + endpoint: + health: + # Controls whether health endpoint shows full component details (e.g., Redis, DB, TBMQ). + # Options: + # - 'never': always hide details (default if security is enabled). + # - 'when-authorized': show details only to authenticated users. + # - 'always': always include full health details in the response + show-details: "${HEALTH_SHOW_DETAILS:never}" + endpoints: + web: + exposure: + # Specify which Actuator endpoints should be exposed via HTTP. + # Use 'health,info' to expose only basic health and information endpoints. + # For exposing Prometheus metrics, update this to include 'prometheus' in the list (e.g., 'health,info,prometheus') + include: "${METRICS_ENDPOINTS_EXPOSE:health,info,prometheus}" +``` + +### Explanation of Parameters + +1. **`health.diskspace.enabled`**: + + * **Description**: Enables or disables the disk space health check. + * **Default**: Disabled (`false`). + * **Use case**: If enabled, it checks the disk usage of the container and reports if disk space is running low. + +2. **`endpoint.health.show-details`**: + + * **Description**: Controls the visibility of detailed health information for the `/actuator/health` endpoint. + * **Options**: + * `never`: Always hides detailed component information (default when security is enabled). + * `when-authorized`: Shows details only to authenticated users. + * `always`: Always includes full health details in the response. + * **Default**: `never`. + * **Use case**: This is used to manage the exposure of health details based on security and access controls. + +3. **`endpoints.web.exposure.include`**: + + * **Description**: Specifies which Actuator endpoints should be exposed via HTTP. + * **Example**: `health,info,prometheus`. + * **Use case**: This controls which endpoints are publicly accessible, e.g., `health`, `info`, or even `prometheus` metrics. + +### Example Health Check Endpoint Output + +The `/actuator/health` endpoint provides JSON data that reflects both the overall system status and the status of individual components, +including custom checks such as **TBMQ** and **Kafka**. +This detailed information is included when the `show-details` setting is not configured to `never`. +If `show-details` is set to `never`, the endpoint will only return the overall status without component details. + +**Healthy Response**: + +```json +{ + "status":"UP", + "components":{ + "db":{ + "status":"UP", + "details":{ + "database":"PostgreSQL", + "validationQuery":"isValid()" + } + }, + "kafka":{ + "status":"UP", + "details":{ + "brokerCount":3 + } + }, + "ping":{ + "status":"UP" + }, + "redis":{ + "status":"UP", + "details":{ + "version":"7.0.15" + } + }, + "tbmq":{ + "status":"UP" + } + } +} +``` + +**Unhealthy Response**: + +```json +{ + "status":"DOWN", + "components":{ + "db":{ + "status":"UP", + "details":{ + "database":"PostgreSQL", + "validationQuery":"isValid()" + } + }, + "kafka":{ + "status":"UP", + "details":{ + "brokerCount":1 + } + }, + "ping":{ + "status":"UP" + }, + "redis":{ + "status":"DOWN", + "details":{ + "error":"org.springframework.dao.QueryTimeoutException: Redis command timed out" + } + }, + "tbmq":{ + "status":"UP" + } + } +} +``` + +In the example above: + +* If the system is **UP**, the health check will return a status of `UP` for individual components (e.g., `db`, `redis`, `tbmq`, `kafka`). +This means the TBMQ is running smoothly and all dependencies are healthy. +* If any individual component fails (e.g., `redis`, `kafka`), the health check will return `DOWN` for that specific service +and provide an error message explaining why the service is unavailable (e.g., "Redis connection failed" or "Kafka broker not reachable"). +* If **any** of the services (e.g., `db`, `redis`, `tbmq`, `kafka`) is down, the **overall status** of the health check will be `DOWN`. +This means that even if one of the components is unavailable, the entire system is considered unhealthy. + +### Timeouts Configuration + +The health checks verify the connectivity to essential dependencies, such as Kafka, Redis, and PostgreSQL, +by executing specific commands designed to test the connection. +Each command is subject to a timeout, which determines how long the health check will wait before considering the +connectivity test to have failed. +The timeout for each third-party service can be customized to suit your application's requirements. + +```yaml +# Kafka Admin client command timeout (in seconds). Applies to operations like describeCluster, listTopics, etc +queue.command-timeout: "${TB_KAFKA_ADMIN_COMMAND_TIMEOUT_SEC:30}" + +# Maximum time (in seconds) to wait for a lettuce command to complete. +# This affects health checks and any command execution (e.g. GET, SET, PING). +# Reduce this to fail fast if Redis is unresponsive +lettuce.command-timeout: "${REDIS_LETTUCE_COMMAND_TIMEOUT_SEC:30}" + +# Maximum time (in milliseconds) HikariCP will wait to acquire a connection from the pool. +# If exceeded, an exception is thrown. Default is 30 seconds +spring.connectionTimeout: "${SPRING_DATASOURCE_CONNECTION_TIMEOUT_MS:30000}" +``` + +## Integration Executor Microservice + +The **TBMQ Integration Executor (IE)** also has a health check exposed through Spring Boot Actuator. +This health check monitors the health of the Integration Executor, ensuring it can connect to Kafka. + +* **Endpoint**: The health check is available at `/actuator/health`. +* **Health Check URL**: The health check verifies the status of the service by sending an HTTP request to the `/actuator/health` endpoint on port **8082**. + +**Healthy Response**: + +```json +{ + "status":"UP", + "components":{ + "kafka":{ + "status":"UP", + "details":{ + "brokerCount":3 + } + }, + "ping":{ + "status":"UP" + } + } +} +``` + +## Conclusion + +* **Health Checks**: TBMQ uses Spring Boot Actuator’s health check mechanism to monitor its own state and dependencies like **PostgreSQL**, **Kafka**, and **Redis**. +* **Configurable Health Details**: You can customize the level of detail shown in health check responses, whether always, based on authorization, or hidden. + +By configuring health checks and exposing detailed health information, +you can ensure that TBMQ's operational state is properly monitored and alerting systems can be set up based on this data. + +**Docker Compose Configuration Example**: + +```yaml +healthcheck: + test: ["CMD", "curl", "-f", "http://localhost:8083/actuator/health"] + interval: 30s + retries: 3 + start_period: 30s + timeout: 10s +``` +{: .copy-code} + +**In Kubernetes**, you can configure liveness and readiness probes in your pod/statefulset/deployment configuration: + +```yaml +livenessProbe: + httpGet: + path: /actuator/health + port: 8083 + initialDelaySeconds: 30 + periodSeconds: 30 + timeoutSeconds: 10 + failureThreshold: 3 + +readinessProbe: + httpGet: + path: /actuator/health + port: 8083 + initialDelaySeconds: 30 + periodSeconds: 30 + timeoutSeconds: 10 + failureThreshold: 3 +``` +{: .copy-code} + +These resources provide detailed information on configuring and utilizing health checks in **Docker** and **Kubernetes** environments. + +* **Docker Health Checks Documentation**: [Docker Health Checks](https://docs.docker.com/reference/dockerfile/#healthcheck). +* **Kubernetes Probes**: [Kubernetes Probes](https://kubernetes.io/docs/tasks/configure-pod-container/configure-liveness-readiness-startup-probes/). diff --git a/_includes/docs/mqtt-broker/other/msg-delivery-strategy.md b/_includes/docs/mqtt-broker/other/msg-delivery-strategy.md new file mode 100644 index 0000000000..115cde9004 --- /dev/null +++ b/_includes/docs/mqtt-broker/other/msg-delivery-strategy.md @@ -0,0 +1,181 @@ + +* TOC +{:toc} + +This feature addresses how messages are delivered to MQTT subscribers in TBMQ. When a client subscribes to a topic and a new matching message is published, +TBMQ delivers the message to the subscriber using its underlying networking layer—**Netty**. + +Netty provides two main ways to send messages over a network channel: +- `writeAndFlush()`: Sends the message and immediately flushes the channel, pushing data to the network right away. +- `write()` (without `flush()`): Writes the message to the channel's buffer but does not send it immediately. It remains in the buffer until a separate `flush()` call is made. + +TBMQ leverages this capability to offer two **delivery strategies**: +- **Write and flush for each message**; +- **Buffer messages and flush periodically or based on count**. + +These strategies are configurable for [two types of clients](/docs/{{docsPrefix}}mqtt-broker/user-guide/mqtt-client-type/): +- **Device clients** (non-persistent and persistent clients); +- **Application clients** (persistent clients). + + +## Write and Flush for Each Message + +- **Behavior**: TBMQ calls `writeAndFlush()` for every message sent to a subscriber. +- **Pros**: + - Ensures low latency — messages are delivered as soon as they are available. + - Simple and reliable, ideal for low-throughput environments. +- **Cons**: + - High CPU and I/O overhead under heavy load. + - Can cause performance bottlenecks due to excessive flushing. + +## Buffered Delivery (Write without Flush) + +- **Behavior**: TBMQ calls `write()` to queue the message in the Netty channel buffer. A `flush()` is triggered: + - After a configured number of messages (`buffered-msg-count`) are buffered. + - If a session becomes idle for the duration specified by `idle-session-flush-timeout-ms` (i.e., no new messages are sent to the subscriber during this time), the buffer is automatically flushed. This behavior applies only to Device clients. +- **Pros**: + - Greatly reduces the number of flush operations, improving throughput. + - More efficient under high-load or bursty message traffic. +- **Cons**: + - May introduce delivery delays, particularly in low-throughput scenarios where messages are published infrequently. + +## Configuration + +You can configure the strategy separately for **Device clients** and **Application clients** via application properties. + +### Device Clients + +```yaml +# If enabled, each message is published to non-persistent subscribers with flush. When disabled, the messages are buffered in the channel and are flushed once in a while +write-and-flush: "${MQTT_MSG_WRITE_AND_FLUSH:true}" +# Number of messages buffered in the channel before the flush is made. Used when `MQTT_MSG_WRITE_AND_FLUSH` = false +buffered-msg-count: "${MQTT_BUFFERED_MSG_COUNT:5}" + +# If enabled, each message is published to persistent DEVICE client subscribers with flush. When disabled, the messages are buffered in the channel and are flushed once in a while +persistent-session.device.write-and-flush: "${MQTT_PERSISTENT_MSG_WRITE_AND_FLUSH:true}" +# Number of messages buffered in the channel before the flush is made. Used when `MQTT_PERSISTENT_MSG_WRITE_AND_FLUSH` = false +persistent-session.device.buffered-msg-count: "${MQTT_PERSISTENT_BUFFERED_MSG_COUNT:5}" +``` + +### Additional Buffered Delivery Settings (Device Clients) + +When message buffering is enabled, TBMQ maintains a cache of active client sessions to track buffered messages and determine when to flush them. +The parameters below define the cache size, expiration policies, and scheduler behavior responsible for flushing message buffers based on activity or thresholds. + +```yaml +# When either `MQTT_MSG_WRITE_AND_FLUSH` or `MQTT_PERSISTENT_MSG_WRITE_AND_FLUSH` is set to false, +# the broker buffers outgoing messages in the outbound channel to improve throughput. +# The respective buffer sizes are controlled by `MQTT_BUFFERED_MSG_COUNT` (for non-persistent clients) +# and `MQTT_PERSISTENT_BUFFERED_MSG_COUNT` (for persistent clients). +# This property defines the maximum number of session entries that can be stored in the flush state cache. +# When the cache exceeds this size, the least recently used sessions are evicted +# and their pending message buffers are flushed automatically +session-cache-max-size: "${MQTT_BUFFERED_CACHE_MAX_SIZE:10000}" +# Time in milliseconds after which an inactive session entry in the flush cache expires. +# A session is considered inactive if it receives no new messages during this period. +# Upon expiration, the session is evicted from the cache and its buffer is flushed. +# Default is 5 minutes +session-cache-expiration-ms: "${MQTT_BUFFERED_CACHE_EXPIRY_MS:300000}" +# Interval in milliseconds at which the scheduler checks all sessions in the cache +# for potential flushing. A smaller value results in more frequent flush checks +scheduler-execution-interval-ms: "${MQTT_BUFFERED_SCHEDULER_INTERVAL_MS:100}" +# Maximum duration in milliseconds that a session can remain idle (i.e., without being flushed) +# before its message buffer is automatically flushed to the client. +# In essence, a flush occurs either when the buffer limit is reached or when this timeout elapses +idle-session-flush-timeout-ms: "${MQTT_BUFFERED_IDLE_FLUSH_MS:200}" +``` + +### Application Clients + +```yaml +# If enabled, each message is published to persistent APPLICATION client subscribers with flush. When disabled, the messages are buffered in the channel and are flushed once in a while +write-and-flush: "${MQTT_APP_MSG_WRITE_AND_FLUSH:false}" +# Number of messages buffered in the channel before the flush is made. Used when `MQTT_APP_MSG_WRITE_AND_FLUSH` = false +buffered-msg-count: "${MQTT_APP_BUFFERED_MSG_COUNT:10}" +``` + +## How It Works + +When a **Device client** session is active and buffering is enabled: + +1. **Session Buffer Creation** + TBMQ stores the session state in a cache with a `SessionFlushState` object that holds: + - The count of buffered messages. + - The timestamp of the last flush. + - The client’s Netty channel context. + +2. **Message Write without Flush** + When a message is delivered: + - It's written using `channel.write()`, without an immediate flush. + - The buffer count is incremented. + +3. **Flush Trigger** + A flush is triggered in any of the following cases: + - **Buffered count** reaches the configured threshold (e.g., 5). + - **Session is idle** for more than the configured timeout. + - **Session is evicted** from cache (due to expiration or max size), and pending messages are flushed to avoid data loss. + +4. **Scheduled Background Flusher** + A background thread periodically scans the cache and flushes idle session buffers. + +5. **Shutdown Handling** + On service shutdown, all buffered sessions are flushed to ensure message delivery consistency. + +For **Application clients**, buffered delivery is applied during message processing in batches. + +- Messages are written to the Netty channel using `write()` without an immediate flush. +- A flush is triggered **after a configured number of messages** (`buffered-msg-count`, default: 10) have been written. +- Once the entire batch is processed, **any remaining unflushed messages are flushed explicitly**. +- This approach avoids idle-time-based flushing and is optimized for high-throughput, batched delivery scenarios. + +This strategy is made possible because each Application client is processed in a dedicated thread (consumer) that polls messages from dedicated Kafka topic, allowing TBMQ to control flushing independently per client. +This design provides precise batching and flushing without requiring shared caches or background schedulers, leading to both scalability and consistency in message delivery. + +## Recommendations + +Choosing the right message delivery strategy depends on your workload characteristics, performance goals, and client behavior. Below are some practical recommendations to guide your configuration. + +**Use `write-and-flush = true` (No Buffering) When:** + +- You prioritize **low latency** over throughput. +- Your system experiences **low to moderate message rates**. +- Clients expect **immediate delivery** (e.g., real-time dashboards, alerts). +- Simplicity and predictability are more important than raw performance. + +**Use `write-and-flush = false` (Buffered Delivery) When:** + +- You expect **high-throughput** workloads with **frequent publications**. +- Minimizing **system call overhead and I/O pressure** is important. +- Clients can tolerate slight delivery delays in exchange for improved efficiency. +- You want to **scale to thousands of clients** without saturating the CPU or network. + +### Tuning Tips + +- Start with `buffered-msg-count` values between **5–10** and adjust based on profiling. +- For Device clients, tune `idle-session-flush-timeout-ms` to balance between delay and timely delivery. +- Monitor logs for cache evictions and flush timings to identify performance bottlenecks. +- If messages are frequently delayed in low-throughput setups, consider enabling immediate flushing. + +### Recommendation Summary + +| Scenario | Recommended Setting | +|------------------------------------|------------------------------------------| +| Low-latency, real-time delivery | `write-and-flush = true` | +| High message volume | `write-and-flush = false`, with tuning | +| Batch-based Application processing | Application buffering with custom count | +| Low-frequency messages | Avoid buffering to prevent delays | + +> In our 3 million messages per second (3M msg/sec) performance test on a single TBMQ node, buffered delivery was enabled to maximize throughput and overall system performance. +> This configuration significantly reduced CPU overhead and improved latency, resulting in more efficient message processing under high load. +> See the [performance test results](/docs/{{docsPrefix}}mqtt-broker/reference/3m-throughput-single-node-performance-test/) and +> [configuration details](https://github.com/thingsboard/tbmq/blob/3M-single-node-perf-test/k8s/aws/tb-broker-configmap.yml) for more information. + +## Conclusion + +The Buffered Message Delivery mechanism provides a smart and flexible way to manage how messages are sent to MQTT subscribers in TBMQ. By leveraging Netty’s ability to defer flushing, TBMQ can significantly reduce I/O overhead and increase throughput in demanding environments. + +**Choose the delivery strategy that best matches your deployment needs:** +- Use **write-and-flush** for low-latency, low-throughput scenarios. +- Enable **buffering** for high-throughput workloads where performance optimization is crucial. + +This feature ensures that your MQTT message delivery pipeline remains efficient, reliable, and adaptable to varying client behaviors and system loads. diff --git a/_includes/docs/mqtt-broker/other/proxy-protocol.md b/_includes/docs/mqtt-broker/other/proxy-protocol.md new file mode 100644 index 0000000000..75f7a20990 --- /dev/null +++ b/_includes/docs/mqtt-broker/other/proxy-protocol.md @@ -0,0 +1,194 @@ + +* TOC +{:toc} + + +The [PROXY Protocol](https://www.haproxy.org/download/1.8/doc/proxy-protocol.txt) is a simple protocol used to safely transport connection information such as the client's IP address across multiple layers of proxies or load balancers. + +TBMQ supports both **PROXY Protocol v1** and **v2**, enabling it to receive and process the real client IP and port, +which is critical for accurate auditing, rate limiting, access control, and understanding the actual source of client connections. + +- **PROXY Protocol v1**: A human-readable ASCII-based format that prepends connection metadata (e.g., IP addresses and ports) to the TCP stream. +- **PROXY Protocol v2**: A more efficient binary format that provides the same information as v1 but with enhanced protocol support and better performance in high-throughput environments. + +By using PROXY Protocol, TBMQ can log, filter, and apply policies based on the real IP address of clients, which is otherwise masked by the proxy or load balancer. + +## How does the PROXY protocol work? + +The PROXY Protocol appends **meta-information** about the original client connection at the very start of the TCP stream. +This metadata is sent by the proxy or load balancer **before** any protocol-specific data, such as the MQTT CONNECT packet or the TLS handshake. + +![image](/images/mqtt-broker/other/proxy-protocol.png) + +When a client connects to TBMQ through a proxy that supports PROXY Protocol, the connection flow is as follows: + +1. The proxy accepts the TCP connection from the client. +2. The proxy immediately sends a **PROXY Protocol header** containing: + - The client's **source IP** and **port**. + - The proxy's **destination IP** and **port**. + - The **protocol type** (TCP over IPv4 or IPv6). +3. TBMQ, with PROXY Protocol enabled, reads this header first, extracts the real client information, and then continues processing the application data: + - For plain MQTT/WS connections: TBMQ processes the MQTT CONNECT packet next. + - For TLS-secured MQTT/WS connections: TBMQ proceeds with the **TLS handshake** after parsing the header. + +- In **PROXY Protocol v1**, this header is sent in **ASCII** format, e.g.: + ``` + PROXY TCP4 192.0.2.1 198.51.100.1 12345 1883\r\n + ``` +- In **PROXY Protocol v2**, the header is in a **binary** format, more compact and efficient for high-performance systems. + +This means TBMQ treats the very first bytes of every incoming connection as PROXY Protocol data, before interpreting it as an MQTT connection. + +## When to use the protocol? + +You should enable the PROXY Protocol in TBMQ when: + +- TBMQ is deployed **behind a load balancer** or **reverse proxy** (e.g., HAProxy, AWS NLB, NGINX) that supports the PROXY Protocol. +- You need to capture the **real IP address** of clients for: + - Accurate **logging** of client connection details. + - Applying **IP-based security policies** and **rate limiting**. + - Detailed **auditing** and **analytics** based on the true client origin. + +TBMQ stores the client IP address as part of the **client session information**. +This IP address is also used in the **Unauthorized Clients** feature, where TBMQ tracks connection attempts from clients that fail authentication. +Having the correct IP address helps in identifying the source of unauthorized access attempts and improving security monitoring. + +Without PROXY Protocol, TBMQ will only see the IP of the proxy or load balancer, making it impossible to distinguish between individual clients behind the proxy. +Enabling PROXY Protocol ensures TBMQ receives the actual client IP and port at connection time. + +> **Important**: Do **not** enable PROXY Protocol unless your proxy is properly configured to send PROXY Protocol headers. When enabled, TBMQ expects the PROXY Protocol header at the beginning of each TCP connection. + +## How to enable the protocol? + +To enable PROXY Protocol support in TBMQ, you need to update the configuration settings for MQTT listeners. + +- **Before TBMQ v2.3**: The PROXY Protocol setting applies **globally** to all MQTT listeners in TBMQ and **cannot** be configured per listener. + +```yaml +# MQTT listeners parameters +listener: + # Enable proxy protocol support. Disabled by default. If enabled, supports both v1 and v2. + # Useful to get the real IP address of the client in the logs, for session details info and unauthorized clients feature + proxy_enabled: "${MQTT_PROXY_PROTOCOL_ENABLED:false}" +``` + +Set the environment variable `MQTT_PROXY_PROTOCOL_ENABLED` to "**true**". + +- **Since TBMQ v2.3**: In addition to the global setting, you can also configure PROXY Protocol **per MQTT listener**. + Per-listener settings are unset by default and inherit the global value. + If explicitly set, the per-listener value overrides the global one. + +```yaml +# MQTT listeners parameters +listener: + # Enable proxy protocol support as a global setting for all listeners. Disabled by default. If enabled, supports both v1 and v2. + # Useful to get the real IP address of the client in the logs, for session details info and unauthorized clients feature + proxy_enabled: "${MQTT_PROXY_PROTOCOL_ENABLED:false}" + +# Per-listener overrides (inherit global if unset) + tcp: + # Enable proxy protocol support for the MQTT TCP listener. Unset by default – in this case it inherits the global MQTT_PROXY_PROTOCOL_ENABLED value. + # If explicitly set, supports both v1 and v2 and takes precedence over the global setting. + # Useful to get the real IP address of the client in the logs, for session details info and unauthorized clients feature + proxy_enabled: "${MQTT_TCP_PROXY_PROTOCOL_ENABLED:}" + ssl: + # Enable proxy protocol support for the MQTT TLS listener. Unset by default – in this case it inherits the global MQTT_PROXY_PROTOCOL_ENABLED value. + # If explicitly set, supports both v1 and v2 and takes precedence over the global setting. + # Useful to get the real IP address of the client in the logs, for session details info and unauthorized clients feature + proxy_enabled: "${MQTT_SSL_PROXY_PROTOCOL_ENABLED:}" + ws: + # Enable proxy protocol support for the MQTT WS listener. Unset by default – in this case it inherits the global MQTT_PROXY_PROTOCOL_ENABLED value. + # If explicitly set, supports both v1 and v2 and takes precedence over the global setting. + # Useful to get the real IP address of the client in the logs, for session details info and unauthorized clients feature + proxy_enabled: "${MQTT_WS_PROXY_PROTOCOL_ENABLED:}" + wss: + # Enable proxy protocol support for the MQTT WSS listener. Unset by default – in this case it inherits the global MQTT_PROXY_PROTOCOL_ENABLED value. + # If explicitly set, supports both v1 and v2 and takes precedence over the global setting. + # Useful to get the real IP address of the client in the logs, for session details info and unauthorized clients feature + proxy_enabled: "${MQTT_WSS_PROXY_PROTOCOL_ENABLED:}" +``` + +**Example** + +```yaml +MQTT_PROXY_PROTOCOL_ENABLED=true # PROXY protocol is globally enabled +MQTT_TCP_PROXY_PROTOCOL_ENABLED=false # MQTT TCP listener explicitly disable PROXY protocol -> disabled +MQTT_SSL_PROXY_PROTOCOL_ENABLED= # TLS listener has PROXY protocol setting unset thus it inherits global setting -> enabled +``` + +**Important Notes:** + +- When `proxy_enabled` is set to `true`, TBMQ automatically supports both **PROXY Protocol v1 and v2**. +- This setting ensures that TBMQ correctly interprets the PROXY Protocol headers sent at the start of each TCP connection, **before** any MQTT or TLS-specific data. + +### HAProxy + +To forward the real client IP to TBMQ using PROXY Protocol, configure **HAProxy** as follows: + +```text +server tbmq1 192.168.1.100:1883 send-proxy +``` + +- `send-proxy`: Instructs HAProxy to send PROXY Protocol v1 headers to TBMQ. +- Replace `192.168.1.100:1883` with your TBMQ broker’s IP and port. + +To use PROXY Protocol v2, change to: + +```text +server tbmq1 192.168.1.100:1883 send-proxy-v2 +``` + +- `send-proxy-v2`: Sends PROXY Protocol v2 headers to TBMQ. + +You can find the full HAProxy configuration guide for enabling PROXY Protocol [here](https://www.haproxy.com/documentation/haproxy-configuration-tutorials/proxying-essentials/client-ip-preservation/enable-proxy-protocol/). + +### AWS Network Load Balancer (NLB) + +To use PROXY Protocol with **AWS NLB**, enable **PROXY Protocol v2**: + +1. Ensure your NLB is **TCP** or **TLS** type. +2. Enable PROXY Protocol v2 using the AWS CLI: + +```bash +aws elbv2 modify-target-group-attributes \ + --target-group-arn \ + --attributes Key=proxy_protocol_v2.enabled,Value=true +``` +{: .copy-code} + +> **Note**: AWS NLB only supports **PROXY Protocol v2**. + +Alternatively, to enable **PROXY Protocol v2** with AWS NLB in a Kubernetes environment, add the following annotation to your Service definition: + +```yaml +service.beta.kubernetes.io/aws-load-balancer-proxy-protocol: "*" +``` +{: .copy-code} + +- The `*` enables **PROXY Protocol v2** for all source IPs. + +See official [AWS documentation](https://kubernetes-sigs.github.io/aws-load-balancer-controller/latest/guide/service/nlb/#protocols) for more details. + +### Other Load Balancers + +You are not limited to HAProxy or AWS NLB — any load balancer that supports the PROXY Protocol can be used with TBMQ. +Examples include **Google Cloud Load Balancer**, **Azure Load Balancer**, **NGINX**, or other reverse proxies. + +The setup steps are straightforward: + +1. Enable PROXY Protocol on your chosen load balancer according to its **official documentation**. +2. Enable PROXY Protocol on the TBMQ side (globally or per-listener, depending on your version). + +Once both sides are properly configured, TBMQ will correctly interpret the PROXY Protocol headers and capture the real client IP and port, regardless of which load balancer you use. + +## Considerations + +* If PROXY Protocol is enabled in TBMQ but not used by your proxy/load balancer, TBMQ will fail to interpret the initial bytes, potentially rejecting the connection. +* If PROXY Protocol is disabled in TBMQ but enabled on your proxy/load balancer, TBMQ will misinterpret the PROXY Protocol header as part of the MQTT or TLS data, leading to connection errors or protocol parsing failures. +* Ensure all connections to TBMQ are routed through a properly configured proxy when PROXY Protocol support is enabled. +* PROXY Protocol should only be enabled if TBMQ is deployed behind a trusted proxy, as it allows the proxy to define client IPs. + +> **Note:** TBMQ is not protocol-agnostic regarding PROXY Protocol support. +> When PROXY Protocol is enabled, all connections must include the PROXY header. +> Mixing connections with and without the PROXY header on the same listener is not supported. +> Future releases may introduce more flexible handling to support mixed connection types. diff --git a/_includes/docs/mqtt-broker/reference/100m-connections-performance-test.md b/_includes/docs/mqtt-broker/reference/100m-connections-performance-test.md index 0f880455cf..e4bbde718f 100644 --- a/_includes/docs/mqtt-broker/reference/100m-connections-performance-test.md +++ b/_includes/docs/mqtt-broker/reference/100m-connections-performance-test.md @@ -14,7 +14,7 @@ while effectively managing a throughput of **6M MQTT publish messages per second We have chosen Amazon Web Services (AWS) as the target cloud provider to conduct the performance test. We have deployed the TBMQ cluster of 25 nodes in the [EKS](https://aws.amazon.com/eks/) cluster (on a single EC2 instance, or node, 1 broker pod is deployed) with the connection to [RDS](https://aws.amazon.com/rds/) and [Kafka](https://kafka.apache.org/). -For a comprehensive understanding of TBMQ architecture, please refer to the subsequent [page](/docs/mqtt-broker/architecture/). +For a comprehensive understanding of TBMQ architecture, please refer to the subsequent [page](/docs/{{docsPrefix}}mqtt-broker/architecture/). RDS has been deployed as a single instance while the Kafka setup consists of 9 brokers distributed across 3 distinct Availability Zones (AZs). Various IoT device profiles differ based on the number of messages they produce and the size of each message. @@ -53,7 +53,7 @@ This is because only the persistent clients categorized as `APPLICATION` are inc **Tip**: to plan and manage the Kafka disk space, please, adjust the [size retention policy](https://kafka.apache.org/documentation/#brokerconfigs_log.retention.bytes) and [period retention policy](https://www.baeldung.com/kafka-message-retention). -For detailed information regarding the configurations associated with each topic, please refer to the [configuration](/docs/mqtt-broker/install/config/) document. +For detailed information regarding the configurations associated with each topic, please refer to the [configuration](/docs/{{docsPrefix}}mqtt-broker/install/config/) document. Every individual MQTT client establishes a distinct connection to the broker. This approach ensures that each client operates independently and maintains its own dedicated connection for seamless communication with the broker. @@ -229,7 +229,7 @@ where * _subscribers_ - number of subscriber clients in the group; * _topicFilter_ - respectively topic filter to subscribe to; * _expectedPublisherGroups_ - list of ids of publisher groups whose messages current subscribers will receive (parameter is used for debugging and statistics purposes); -* _persistentSessionInfo_ - persistent info object containing [client type](/docs/mqtt-broker/user-guide/mqtt-client-type/); +* _persistentSessionInfo_ - persistent info object containing [client type](/docs/{{docsPrefix}}mqtt-broker/user-guide/mqtt-client-type/); * _clientIdPrefix_ - client id prefix of subscribers. **Test run** @@ -279,7 +279,7 @@ Here is the JMX monitoring for TBMQ. The broker nodes are operating steadily and ## How to repeat the tests -Please refer to the subsequent [installation guide](/docs/mqtt-broker/install/cluster/aws-cluster-setup/) to learn how to deploy TBMQ on AWS. +Please refer to the subsequent [installation guide](/docs/{{docsPrefix}}mqtt-broker/install/cluster/aws-cluster-setup/) to learn how to deploy TBMQ on AWS. In addition, you may explore the [branch](https://github.com/thingsboard/tbmq/tree/100M/k8s/aws#readme) containing the scripts and parameters employed for running TBMQ during this performance test. Lastly, the [performance tests tool](https://github.com/thingsboard/tb-mqtt-perf-tests/tree/100M) available for conducting performance tests, diff --git a/_includes/docs/mqtt-broker/reference/1m-throughput-p2p-performance-test.md b/_includes/docs/mqtt-broker/reference/1m-throughput-p2p-performance-test.md index aa11a82e69..ec073204cb 100644 --- a/_includes/docs/mqtt-broker/reference/1m-throughput-p2p-performance-test.md +++ b/_includes/docs/mqtt-broker/reference/1m-throughput-p2p-performance-test.md @@ -4,8 +4,8 @@ Point-to-point (P2P) communication is one of the core MQTT patterns, enabling devices to exchange messages directly in a one-to-one manner. This pattern is especially relevant for IoT scenarios requiring reliable, targeted messaging, like private messaging, command delivery, and other direct interaction use cases. -We aimed to evaluate how well the broker performs with [persistent DEVICE clients](/docs/mqtt-broker/architecture/#persistent-device-client) in a P2P communication scenario. -Persistent DEVICE clients are well-suited for P2P messaging because they use a shared Kafka topic, reducing the load on [Kafka](/docs/mqtt-broker/architecture/#kafka-topics), while leveraging [Redis](/docs/mqtt-broker/architecture/#redis) +We aimed to evaluate how well the broker performs with [persistent DEVICE clients](/docs/{{docsPrefix}}mqtt-broker/architecture/#persistent-device-client) in a P2P communication scenario. +Persistent DEVICE clients are well-suited for P2P messaging because they use a shared Kafka topic, reducing the load on [Kafka](/docs/{{docsPrefix}}mqtt-broker/architecture/#kafka-topics), while leveraging [Redis](/docs/{{docsPrefix}}mqtt-broker/architecture/#redis) to ensure reliable message delivery even if the client is temporarily offline. The tests involved scaling the infrastructure while progressively increasing the load from 200,000 to **1,000,000 messages per second**, demonstrating TBMQ’s scalability and consistent performance. @@ -28,7 +28,7 @@ Here, `$number` used as the unique identifier for each pair of publisher and sub ### Test agent setup -The [test agent](/docs/mqtt-broker/reference/1m-throughput-p2p-performance-test/#how-to-repeat-the-1m-msgsec-throughput-test) +The [test agent](/docs/{{docsPrefix}}mqtt-broker/reference/1m-throughput-p2p-performance-test/#how-to-repeat-the-1m-msgsec-throughput-test) was designed to simulate publishers and subscribers, ensuring a realistic evaluation of TBMQ's performance under growing message traffic. It consisted of a cluster of performance test pods (runners) and an orchestrator pod to supervise their operation. We have two types of runner pods: publishers and subscribers. In our tests, the number of publisher pods always matches the number of subscriber pods, @@ -112,11 +112,11 @@ Where, These results demonstrate TBMQ's ability to provide reliable and scalable point-to-point messaging with excellent performance. Our focus remains on further optimization to enhance performance without compromising reliability. -For more details on potential improvements, see the [Future optimizations](/docs/mqtt-broker/reference/1m-throughput-p2p-performance-test/#future-optimizations) section. +For more details on potential improvements, see the [Future optimizations](/docs/{{docsPrefix}}mqtt-broker/reference/1m-throughput-p2p-performance-test/#future-optimizations) section. ## How to repeat the 1M Msg/sec throughput test -We recommend referring to our [installation guide](/docs/mqtt-broker/install/cluster/aws-cluster-setup/), which provides step-by-step instructions on how to deploy TBMQ on AWS. +We recommend referring to our [installation guide](/docs/{{docsPrefix}}mqtt-broker/install/cluster/aws-cluster-setup/), which provides step-by-step instructions on how to deploy TBMQ on AWS. In addition, you may explore the [branch](https://github.com/thingsboard/tbmq/tree/p2p-perf-test/k8s/aws#readme) containing the scripts and parameters used for running TBMQ during this performance test, enabling you to gain deeper insights into our configuration. For the practical execution of performance tests, we offer a dedicated [performance testing tool](https://github.com/thingsboard/tb-mqtt-perf-tests/tree/p2p-perf-test) capable of generating MQTT clients and simulating the desired message load. Especially for the P2P scenario testing, we improved our testing tool to have the ability to autogenerate the configuration for publishers and subscribers instead of loading it from a JSON configuration file. diff --git a/_includes/docs/mqtt-broker/reference/3m-throughput-single-node-performance-test.md b/_includes/docs/mqtt-broker/reference/3m-throughput-single-node-performance-test.md index a4095f91aa..4c981e5851 100644 --- a/_includes/docs/mqtt-broker/reference/3m-throughput-single-node-performance-test.md +++ b/_includes/docs/mqtt-broker/reference/3m-throughput-single-node-performance-test.md @@ -90,7 +90,7 @@ This finding indicates that TBMQ demonstrates substantial processing capacity, s ## How to repeat the test -We recommend referring to our [installation guide](/docs/mqtt-broker/install/cluster/aws-cluster-setup/), which provides step-by-step instructions on how to deploy TBMQ on AWS. +We recommend referring to our [installation guide](/docs/{{docsPrefix}}mqtt-broker/install/cluster/aws-cluster-setup/), which provides step-by-step instructions on how to deploy TBMQ on AWS. In addition, you may explore the [branch](https://github.com/thingsboard/tbmq/tree/3M-single-node-perf-test/k8s/aws#readme) containing the scripts and parameters used for running TBMQ during this performance test, enabling you to gain deeper insights into our configuration. For the practical execution of performance tests, we offer a dedicated [performance testing tool](https://github.com/thingsboard/tb-mqtt-perf-tests/tree/3M-single-node-perf-test) diff --git a/_includes/docs/mqtt-broker/rest-api.md b/_includes/docs/mqtt-broker/rest-api.md index 880875f736..02346b8e6d 100644 --- a/_includes/docs/mqtt-broker/rest-api.md +++ b/_includes/docs/mqtt-broker/rest-api.md @@ -43,14 +43,14 @@ This ensures the secure transmission of credentials and allows the API client to maintaining the integrity and confidentiality of the exchanged information. The main token is short-lived token you should use to perform the API calls. The refresh token is used to get new main token once it is expired. -The expiration time of main and refresh tokens is [configurable](/docs/mqtt-broker/install/config/) in system settings +The expiration time of main and refresh tokens is [configurable](/docs/{{docsPrefix}}mqtt-broker/install/config/) in system settings via `JWT_TOKEN_EXPIRATION_TIME` and `JWT_REFRESH_TOKEN_EXPIRATION_TIME` parameters. Default expiration time values are 2.5 hours and 1 week respectively. See sample command below to get the token for user "sysadmin@thingsboard.org", password "sysadmin" and server "THINGSBOARD_MQTT_BROKER_URL": {% capture tabspec %}token -A,get-token.sh,shell,reference/resources/get-token.sh,/docs/mqtt-broker/reference/resources/get-token.sh -B,response.json,json,reference/resources/get-token-response.json,/docs/mqtt-broker/reference/resources/get-token-response.json{% endcapture %} +A,get-token.sh,shell,reference/resources/get-token.sh,/docs/{{docsPrefix}}mqtt-broker/reference/resources/get-token.sh +B,response.json,json,reference/resources/get-token-response.json,/docs/{{docsPrefix}}mqtt-broker/reference/resources/get-token-response.json{% endcapture %} {% include tabs.html %} - Now, you should set ‘X-Authorization’ header to “Bearer $YOUR_JWT_TOKEN”. **Make sure** you use main JWT token and not the refresh token. diff --git a/_includes/docs/mqtt-broker/security/authentication/basic.md b/_includes/docs/mqtt-broker/security/authentication/basic.md index 275c4ad0ff..21d80703f4 100644 --- a/_includes/docs/mqtt-broker/security/authentication/basic.md +++ b/_includes/docs/mqtt-broker/security/authentication/basic.md @@ -9,7 +9,7 @@ When combined with secure transport (TLS), it provides a reliable and widely ado ### Basic authentication overview Basic authentication allows MQTT clients to authenticate using credentials sent in the `CONNECT` packet — such as clientId, username, and password. -TBMQ uses these credentials to generate a unique `credentialsId` and match against the stored [MQTT client credential](/docs/mqtt-broker/user-guide/ui/mqtt-client-credentials/) records using flexible matching strategies. +TBMQ uses these credentials to generate a unique `credentialsId` and match against the stored [MQTT client credential](/docs/{{docsPrefix}}mqtt-broker/user-guide/ui/mqtt-client-credentials/) records using flexible matching strategies. To optimize authentication performance, TBMQ maintains credentials in Redis for fast lookups, while PostgreSQL ensures reliable persistence. The following sections explain provider configuration, credential matching, `credentialsId` generation, and how authorization is applied after successful authentication. @@ -87,7 +87,7 @@ where: ### MQTTS Example based on Client ID, Username and Password One-way SSL authentication is a standard authentication mode, where your client device verifies the identity of a server using server certificate. -Follow the [MQTT over SSL](/docs/mqtt-broker/security/mqtts/) guide to provision server certificate for your own TBMQ instance. +Follow the [MQTT over SSL](/docs/{{docsPrefix}}mqtt-broker/security/mqtts/) guide to provision server certificate for your own TBMQ instance. Let's review a simple command to publish message using MQTT client ID, username and password to the TBMQ. The command is using MQTTS: diff --git a/_includes/docs/mqtt-broker/security/authentication/jwt.md b/_includes/docs/mqtt-broker/security/authentication/jwt.md index 73136402ec..a1eeda4355 100644 --- a/_includes/docs/mqtt-broker/security/authentication/jwt.md +++ b/_includes/docs/mqtt-broker/security/authentication/jwt.md @@ -5,7 +5,7 @@ In the same way as other ThingsBoard family products, TBMQ uses [JWT](https://jw JWT tokens serve as a mechanism to exchange information securely. When a user logs in, their credentials are exchanged for a pair of JWT tokens: an access token, which is used to authenticate API calls, and a refresh token, which is used to obtain a new access token once the original expires. These tokens contain essential information about the user’s identity and permissions, enabling secure communication with the platform. -For more information, please refer to the [Administration REST API](https://thingsboard.io/docs/mqtt-broker/rest-api/#swagger-ui) documentation. +For more information, please refer to the [Administration REST API](https://thingsboard.io/docs/{{docsPrefix}}mqtt-broker/rest-api/#swagger-ui) documentation. Starting from version [2.2.0](https://github.com/thingsboard/tbmq/releases/tag/v2.2.0), TBMQ also supports JWT-based authentication for MQTT clients as one of its pluggable MQTT authentication providers. This enables secure, flexible, and scalable identity verification without relying on static credentials like usernames or passwords. @@ -13,7 +13,7 @@ Instead, clients present a signed token that contains all the necessary authenti ## JWT authentication overview -When a client connects using a JWT token, TBMQ performs a multi-step validation process to verify the token, check its claims, and determine the client’s permissions. +When a client connects using a JWT token, TBMQ performs a multistep validation process to verify the token, check its claims, and determine the client’s permissions. The client includes a signed JWT token in the `password` field of the `MQTT CONNECT` packet. TBMQ uses the configured verifier (HMAC-based, PEM, or JWKS) to validate the token's signature. If the signature is valid, the broker proceeds to check the token’s claims. It validates: @@ -287,7 +287,7 @@ mosquitto_pub -d -q 1 -h "YOUR_TBMQ_HOST" -p "1883" -t "sensors/temperature" -i ### MQTTS Example based on HMAC-based algorithm One-way TLS ensures your client verifies the server’s identity using its certificate. -Follow the [MQTT over SSL](/docs/mqtt-broker/security/mqtts/) guide to provision a server certificate for TBMQ. +Follow the [MQTT over SSL](/docs/{{docsPrefix}}mqtt-broker/security/mqtts/) guide to provision a server certificate for TBMQ. Here’s an example of connecting with JWT authentication over MQTTS (TLS): diff --git a/_includes/docs/mqtt-broker/security/authentication/x509.md b/_includes/docs/mqtt-broker/security/authentication/x509.md index f92ca7e48f..6a180efac1 100644 --- a/_includes/docs/mqtt-broker/security/authentication/x509.md +++ b/_includes/docs/mqtt-broker/security/authentication/x509.md @@ -7,7 +7,7 @@ Instead of relying on a username and password, clients present a certificate dur ### X.509 authentication overview With X.509 Certificate Chain Authentication, the client presents its certificate chain as part of the TLS handshake. -TBMQ extracts the Common Name (CN) from the client’s certificate, or any certificate in the chain to generate `credentialsId` and match it against the configured [MQTT client credentials](/docs/mqtt-broker/user-guide/ui/mqtt-client-credentials/). +TBMQ extracts the Common Name (CN) from the client’s certificate, or any certificate in the chain to generate `credentialsId` and match it against the configured [MQTT client credentials](/docs/{{docsPrefix}}mqtt-broker/user-guide/ui/mqtt-client-credentials/). TBMQ supports two matching modes: @@ -102,9 +102,9 @@ subscribe to topics that start with **example_sub_topic/**. Clients with a certi ### Example X.509 Certificates are used to set up [mutual](https://en.wikipedia.org/wiki/Mutual_authentication) (two-way) authentication for MQTT over TLS. -Instructions below will describe how to connect MQTT client using X.509 Certificate to TBMQ. +The instructions below will describe how to connect MQTT client using X.509 Certificate to TBMQ. -In particular, there are two strategies that can be used for establishing connection between client and TBMQ: +In particular, there are two strategies that can be used for establishing connection between the client and TBMQ: - **X.509 Certificate chain**.
Configure TBMQ to trust all client certificates from a specific trust anchor (*intermediate certificate*). diff --git a/_includes/docs/mqtt-broker/security/https.md b/_includes/docs/mqtt-broker/security/https.md new file mode 100644 index 0000000000..a6ef3cb68d --- /dev/null +++ b/_includes/docs/mqtt-broker/security/https.md @@ -0,0 +1,71 @@ +* TOC +{:toc} + +TBMQ provides the ability to run HTTP server that hosts Web UI and serves REST API calls over SSL. + +Most of the TBMQ environments use the load balancer as a termination point for the SSL connection between the client and the broker. +In other words, internet traffic is encrypted between the user browser and the load balancer, but is decrypted between the load balancer and broker services. +The advantage of such options is a simple configuration. +Most of the cloud load balancers (AWS, Google Cloud, etc.) have built-in certificate generation tools and rich documentation on how to configure SSL. + +Nevertheless, it is possible to configure TBMQ to enable SSL and avoid SSL termination on the Load Balancer. +We recommend using valid SSL certificates generated using trusted CA authorities and avoid spending time on resolving issues with [self-signed certificates](#self-signed-certificates-generation). +See the instructions below on how to configure SSL for certificates stored in PEM file format or Java Keystore. + +## SSL configuration using PEM certificates file + +Configure the following environment variables via [configuration](/docs/{{docsPrefix}}mqtt-broker/install/config/#http-server-parameters) file, docker-compose or kubernetes scripts. + +```bash +... +export SSL_ENABLED=true +export SSL_CREDENTIALS_TYPE=PEM +export SSL_PEM_CERT=server.pem +export SSL_PEM_KEY=server_key.pem +export SSL_PEM_KEY_PASSWORD=secret +... +``` + +where: + +* SSL_ENABLED — Enable/disable SSL support; +* SSL_CREDENTIALS_TYPE — Server credentials type. PEM — pem certificate file; KEYSTORE — java keystore; +* SSL_PEM_CERT — Path to the server certificate file. Holds server certificate or certificate chain, may also include the server private key; +* SSL_PEM_KEY — Path to the server certificate private key file. Optional by default. Required if the private key is not present in the server certificate file; +* SSL_PEM_KEY_PASSWORD — Optional server certificate private key password. + +After completing the setup, start or restart the TBMQ server. + +{% include templates/mqtt-broker/ssl/pem_files_location.md %} + +## SSL configuration using Java Keystore + +Configure the following environment variables via [configuration](/docs/{{docsPrefix}}mqtt-broker/install/config/#http-server-parameters) file, docker-compose or kubernetes scripts. + +```bash +... +export SSL_ENABLED=true +export SSL_CREDENTIALS_TYPE=KEYSTORE +export SSL_KEY_STORE_TYPE=PKCS12 +export SSL_KEY_STORE=keystore.p12 +export SSL_KEY_STORE_PASSWORD=tbmq +export SSL_KEY_PASSWORD=tbmq +... +``` + +where: + +* SSL_ENABLED — Enable/disable SSL support; +* SSL_CREDENTIALS_TYPE — Server credentials type. PEM — pem certificate file; KEYSTORE — java keystore; +* SSL_KEY_STORE_TYPE — Type of the key store (JKS or PKCS12); +* SSL_KEY_STORE — Path to the key store that holds the SSL certificate or certificate chain, also include the server private key; +* SSL_KEY_STORE_PASSWORD — Password used to access the key store; +* SSL_KEY_PASSWORD — Password used to access the server private key. + +After completing the setup, start or restart the TBMQ server. + +{% include templates/mqtt-broker/ssl/keystore_files_location.md %} + +{% include docs/user-guide/ssl/self-signed-ecc.md %} + +{% include templates/mqtt-broker/ssl/pem-to-keystore.md %} diff --git a/_includes/docs/mqtt-broker/security/listeners.md b/_includes/docs/mqtt-broker/security/listeners.md index f67dd4856d..f5858d369d 100644 --- a/_includes/docs/mqtt-broker/security/listeners.md +++ b/_includes/docs/mqtt-broker/security/listeners.md @@ -1,14 +1,14 @@ * TOC {:toc} -TBMQ provides the flexibility to configure its listening capabilities for both the TCP and SSL/TLS protocols as well as for MQTT over WebSockets. +TBMQ provides flexible configuration options for its listeners, supporting TCP, SSL/TLS, and MQTT over WebSockets protocols. ### TCP Listener By default, TBMQ has the TCP listener enabled on port `1883`. However, if you wish to disable the TCP listener, you can set the `LISTENER_TCP_ENABLED` environment variable to `false`. -Furthermore, if you need to change the host address that the broker is binding to or the port it is listening on, +Furthermore, if you need to change the host address that the broker is binding to or the port it is listening to, you can modify the `LISTENER_TCP_BIND_ADDRESS` and `LISTENER_TCP_BIND_PORT` variables, respectively. This gives you the flexibility to configure the broker to listen on a specific network interface and port of your choice. @@ -20,7 +20,7 @@ To enable the SSL/TLS listener, set the `LISTENER_SSL_ENABLED` environment varia To change the host and/or port that the broker is listening to, update the `LISTENER_SSL_BIND_ADDRESS` and `LISTENER_SSL_BIND_PORT` variables, respectively. Choose the type of credentials you want to use by setting the `LISTENER_SSL_CREDENTIALS_TYPE` parameter. Currently, the supported options are `PEM` and `KEYSTORE`. -Note that you can find a list of all available properties in the [configuration documentation](/docs/mqtt-broker/install/config/). +Note that you can find a list of all available properties in the [configuration documentation](/docs/{{docsPrefix}}mqtt-broker/install/config/). If you choose KeyStore as the credentials type, you need to configure the following: - Set `LISTENER_SSL_KEY_STORE` variable to the path to your `.jks` file with the server certificate chain. @@ -33,14 +33,14 @@ If you choose Pem as the credentials type, you need to configure the following: - Set `LISTENER_SSL_PEM_KEY_PASSWORD` variable to the password of your server certificate private key. If you require two-way TLS, you also need to configure the TrustStore by adding the trusted certificates/chains to the configured KeyStore/PEM files. -For more information about configuration possibilities and certificate generation, please review the following security [pages](/docs/mqtt-broker/security/mqtts/). +For more information about configuration possibilities and certificate generation, please review the following security [pages](/docs/{{docsPrefix}}mqtt-broker/security/mqtts/). ### WS Listener By default, TBMQ has the WebSocket listener enabled on port `8084`. However, in case you want to disable the WS listener, you can set the `LISTENER_WS_ENABLED` environment variable to `false`. -Additionally, if you need to change the host address that the broker is binding to or the port it is listening on, +Additionally, if you need to change the host address that the broker is binding to or the port it is listening to, you can modify the `LISTENER_WS_BIND_ADDRESS` and `LISTENER_WS_BIND_PORT` variables, respectively. WS listener is configured to negotiate via all MQTT versions by default, i.e. `WS_NETTY_SUB_PROTOCOLS` is set to `mqttv3.1,mqtt`. @@ -69,5 +69,5 @@ WSS listener is set to the same negotiation subprotocols as [WS](#ws-listener) l ### Next steps -- [**Connectivity settings**](/docs/mqtt-broker/user-guide/ui/settings/#connectivity) - Learn how to configure hosts and ports in the TBMQ UI for use in different protocol-based features. -{% assign currentGuide = "SecurityGuide" %}{% include templates/mqtt-broker-guides-banner.md %} \ No newline at end of file +- [**Connectivity settings**](/docs/{{docsPrefix}}mqtt-broker/user-guide/ui/settings/#connectivity) - Learn how to configure hosts and ports in the TBMQ UI for use in different protocol-based features. +{% assign currentGuide = "SecurityGuide" %}{% include templates/mqtt-broker-guides-banner.md %} diff --git a/_includes/docs/mqtt-broker/security/mqtts.md b/_includes/docs/mqtt-broker/security/mqtts.md new file mode 100644 index 0000000000..7f9de80c3e --- /dev/null +++ b/_includes/docs/mqtt-broker/security/mqtts.md @@ -0,0 +1,129 @@ +* TOC +{:toc} + +TBMQ provides the ability to run MQTT server and MQTT over WebSocket over SSL. Both one-way and two-way SSL are supported. + +Most of the TBMQ environments use the load balancer as a termination point for the SSL connection between the devices and the broker. +In other words, MQTT traffic is encrypted between the device and the load balancer but is decrypted between the load balancer and broker services. +The advantage of such an option is the simplicity of configuration. +Most of the cloud load balancers (AWS, Google Cloud, etc.) have built-in certificate generation tools and rich documentation on how to configure SSL over TCP. +The disadvantage of such an option is that two-way SSL is not possible. The information about the client certificate is not passed from the load balancer to the broker services. + +Nevertheless, it is possible to configure TBMQ to two-way SSL for MQTT and avoid SSL termination on the Load Balancer. +We recommend using valid SSL certificates generated using trusted CA authorities and avoid spending time on resolving issues with [self-signed certificates](#self-signed-certificates-generation). +See the instructions below on how to configure SSL for certificates stored in PEM file format or Java Keystore. + +## SSL configuration using PEM certificates file + +Configure the following environment variables via [configuration](/docs/{{docsPrefix}}mqtt-broker/install/config/#mqtt-listeners-parameters) file, docker-compose or kubernetes scripts. + +```bash +... +export LISTENER_SSL_ENABLED=true +export LISTENER_SSL_CREDENTIALS_TYPE=PEM +export LISTENER_SSL_PEM_CERT=server.pem +export LISTENER_SSL_PEM_KEY=server_key.pem +export LISTENER_SSL_PEM_KEY_PASSWORD=secret +... +``` + +where: + +* LISTENER_SSL_ENABLED — Enable/disable SSL support; +* LISTENER_SSL_CREDENTIALS_TYPE — Server credentials type. PEM — pem certificate file; KEYSTORE — java keystore; +* LISTENER_SSL_PEM_CERT — Path to the server certificate file. Holds server certificate or certificate chain, may also include the server private key; +* LISTENER_SSL_PEM_KEY — Path to the server certificate private key file. Optional by default. Required if the private key is not present in the server certificate file; +* LISTENER_SSL_PEM_KEY_PASSWORD — Optional server certificate private key password. + +After completing the setup, start or restart the TBMQ server. + +{% include templates/mqtt-broker/ssl/pem_files_location.md %} + +## SSL configuration using Java Keystore + +Configure the following environment variables via [configuration](/docs/{{docsPrefix}}mqtt-broker/install/config/#mqtt-listeners-parameters) file, docker-compose or kubernetes scripts. + +```bash +... +export LISTENER_SSL_ENABLED=true +export LISTENER_SSL_CREDENTIALS_TYPE=KEYSTORE +export LISTENER_SSL_KEY_STORE_TYPE=PKCS12 +export LISTENER_SSL_KEY_STORE=keystore.p12 +export LISTENER_SSL_KEY_STORE_PASSWORD=tbmq +export LISTENER_SSL_KEY_PASSWORD=tbmq +... +``` + +where: + +* LISTENER_SSL_ENABLED — Enable/disable SSL support; +* LISTENER_SSL_CREDENTIALS_TYPE — Server credentials type. PEM - pem certificate file; KEYSTORE — java keystore; +* LISTENER_SSL_KEY_STORE_TYPE — Type of the key store (JKS or PKCS12); +* LISTENER_SSL_KEY_STORE — Path to the key store that holds the SSL certificate or certificate chain, also include the server private key; +* LISTENER_SSL_KEY_STORE_PASSWORD — Password used to access the key store; +* LISTENER_SSL_KEY_PASSWORD — Password used to access the server private key. + +After completing the setup, start or restart the TBMQ server. + +{% include templates/mqtt-broker/ssl/keystore_files_location.md %} + +## Additional configuration properties + +You may configure following additional environment variables via [configuration](/docs/{{docsPrefix}}mqtt-broker/install/config/#mqtt-listeners-parameters) file, docker-compose or kubernetes scripts. + +* LISTENER_SSL_BIND_ADDRESS — the bind address for the MQTT server. Default value *0.0.0.0* indicates all interfaces; +* LISTENER_SSL_BIND_PORT — the bind port for the MQTT server. The default value is *8883*; +* LISTENER_SSL_PROTOCOL — ssl protocol name. The default value is *TLSv1.2*. See [java doc](https://docs.oracle.com/en/java/javase/17/docs/specs/security/standard-names.html#sslcontext-algorithms) for more details. + +{% include docs/user-guide/ssl/self-signed-ecc.md %} + +> It is recommended to include the **ca.pem** file in TBMQ’s Truststore. +> This is especially important if you plan to issue client certificates signed by the same CA that signed the server certificate. +> By doing so, TBMQ will be able to validate these client certificates during the TLS handshake, allowing secure MQTT client connections. + +To achieve this, you need to create a certificate chain by concatenating the server certificate and the CA certificate: + +```bash +cat server.pem ca.pem > serverChain.pem +``` +{: .copy-code} + +The resulting `serverChain.pem` file should then be configured in TBMQ by setting the following environment variable: + +```bash +LISTENER_SSL_PEM_CERT=serverChain.pem +``` +{: .copy-code} + +This ensures that both the server certificate and the CA certificate are properly recognized, enabling secure mutual authentication when client certificates are used. + +{% include templates/mqtt-broker/ssl/pem-to-keystore.md %} + +## Adding certificate into Java Truststore + +In Java-based applications, a **truststore** is a special keystore that contains certificates of entities (Certificate Authorities or servers) that the application trusts. +Adding a certificate to the truststore ensures that Java applications running with that truststore will accept SSL/TLS connections signed by that certificate or its issuing CA. + +```bash +keytool -importcert -file CERT.pem -alias ALIAS -keystore keystore.p12 -storepass KEYSTOREPASS +``` +{: .copy-code} + +**Explanation of parameters:** + +* `-importcert` — tells `keytool` to import a certificate into the specified keystore/truststore. +* `-file CERT.pem` — the path to the certificate file you want to import. +* `-alias ALIAS` — a unique name to reference this certificate within the keystore. +* `-keystore keystore.p12` — the Java keystore/truststore file (.jks or .p12) to which the certificate will be added. If it doesn’t exist, it will be created. +* `-storepass KEYSTOREPASS` — the password protecting the keystore. + +> Ensure you configure TBMQ to enable MQTTS using the appropriate [Keystore parameters](#ssl-configuration-using-java-keystore). + +To use the *keytool* command, a Java Development Kit (JDK) must be installed on your system. + +## MQTT over WebSocket Secure + +To enable secure MQTT over WebSockets (WSS), you can follow the same SSL configuration steps described above. +Just make sure to use the corresponding WebSocket-specific environment variables (e.g., `LISTENER_WSS_ENABLED`, `LISTENER_WSS_CREDENTIALS_TYPE`, etc.) in your configuration file, Docker Compose, or Kubernetes manifests. + +The SSL setup using PEM or Keystore works identically for both raw MQTT over TLS and WebSocket over TLS endpoints. diff --git a/_includes/docs/mqtt-broker/security/overview.md b/_includes/docs/mqtt-broker/security/overview.md index 920d3cb918..af713da179 100644 --- a/_includes/docs/mqtt-broker/security/overview.md +++ b/_includes/docs/mqtt-broker/security/overview.md @@ -11,7 +11,7 @@ Each section below explains the role of these components, how they can be config Connection-level security focuses on configuring how clients connect to the broker. It defines supported transport protocols, encryption options, and network-level parameters — all essential to establishing a secure communication channel before authentication and authorization are applied. -In TBMQ, this is achieved through the configuration of [MQTT listeners](/docs/mqtt-broker/security/listeners/), which support both encrypted and unencrypted protocols (TCP, TLS, WebSockets). +In TBMQ, this is achieved through the configuration of [MQTT listeners](/docs/{{docsPrefix}}mqtt-broker/security/listeners/), which support both encrypted and unencrypted protocols (TCP, TLS, WebSockets). Each listener exposes configurable properties — such as ports, host addresses, and performance tuning options — that can be set via configuration files or overridden using environment variables. For TLS and WebSocket Secure (WSS) listeners, encryption parameters such as certificates and supported protocols can also be configured. @@ -23,15 +23,17 @@ Supported authentication methods include: Basic (username/password), X.509 Certi ### Providers management +{% if docsPrefix != "pe/" %} {% assign sinceVersion = "2.2" %} {% include templates/mqtt-broker/since.md %} +{% endif %} Authentication methods are implemented as pluggable authentication providers: -- [Basic](/docs/mqtt-broker/security/authentication/basic/) — Authenticates clients using a clientId, username, and password sent in the `CONNECT` packet. -- [X.509 Certificate Chain](/docs/mqtt-broker/security/authentication/x509/) — Uses the client’s X.509 certificate chain during TLS handshake for authentication. -- [JWT (JSON Web Token)](/docs/mqtt-broker/security/authentication/jwt/) — Authenticates clients using a signed JWT passed in the **password** field of the `CONNECT` packet. -- [SCRAM](/docs/mqtt-broker/security/authentication/scram/) — Performs a secure challenge-response using hashed credentials to authenticate without sending the actual password (MQTT 5.0 only). +- [Basic](/docs/{{docsPrefix}}mqtt-broker/security/authentication/basic/) — Authenticates clients using a clientId, username, and password sent in the `CONNECT` packet. +- [X.509 Certificate Chain](/docs/{{docsPrefix}}mqtt-broker/security/authentication/x509/) — Uses the client’s X.509 certificate chain during TLS handshake for authentication. +- [JWT (JSON Web Token)](/docs/{{docsPrefix}}mqtt-broker/security/authentication/jwt/) — Authenticates clients using a signed JWT passed in the **password** field of the `CONNECT` packet. +- [SCRAM](/docs/{{docsPrefix}}mqtt-broker/security/authentication/scram/) — Performs a secure challenge-response using hashed credentials to authenticate without sending the actual password (MQTT 5.0 only). Each provider can be individually enabled, disabled, and configured to meet requirements for different deployment use cases. @@ -44,11 +46,13 @@ Adding or deleting authentication providers is not allowed. Users can only edit ### Providers execution order +{% if docsPrefix != "pe/" %} {% assign sinceVersion = "2.2" %} {% include templates/mqtt-broker/since.md %} +{% endif %} TBMQ processes authentication providers in a configurable execution order. -This can be configured from the [MQTT Authentication Settings](/docs/mqtt-broker/user-guide/ui/settings/#mqtt-authentication) page designed to configure key MQTT authentication-related parameters. +This can be configured from the [MQTT Authentication Settings](/docs/{{docsPrefix}}mqtt-broker/user-guide/ui/settings/#mqtt-authentication) page designed to configure key MQTT authentication-related parameters. {% include docs/mqtt-broker/user-guide/ui/authentication-settings.md %} @@ -56,7 +60,7 @@ This can be configured from the [MQTT Authentication Settings](/docs/mqtt-broker Authorization involves granting or denying access to specific resources or actions based on the authenticated client’s privileges. To achieve this, define topic-level access control by applying configurable rules that determine whether a client can publish to or subscribe from specific topics. TBMQ uses regular expression–based topic patterns to enforce these rules. -Authorization settings are typically configured per [client credentials](/docs/mqtt-broker/user-guide/ui/mqtt-client-credentials). Only JWT-based authentication supports defining authorization rules at the provider level, allowing dynamic, token-driven access control. +Authorization settings are typically configured per [client credentials](/docs/{{docsPrefix}}mqtt-broker/user-guide/ui/mqtt-client-credentials). Only JWT-based authentication supports defining authorization rules at the provider level, allowing dynamic, token-driven access control. ## Next steps diff --git a/_includes/docs/mqtt-broker/subscription.md b/_includes/docs/mqtt-broker/subscription.md new file mode 100644 index 0000000000..2e22f28327 --- /dev/null +++ b/_includes/docs/mqtt-broker/subscription.md @@ -0,0 +1,180 @@ +TBMQ provides dedicated Private Cloud plans based on the **pay-as-you-go** model. + +### Limits + +Please see table below to compare the limits of the Private Cloud plans. The values are monthly limits, unless stated otherwise. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Parameter nameLaunchGrowthScaleEnterpriseDescription
Sessions2K5K20KUnlimitedMaximum number of client sessions managed by the broker, including both active connections and persistent sessions that are temporarily disconnected but still maintained by the broker for quick reconnection. +Once a session is expired or explicitly removed, it no longer counts toward the session limit and the slot becomes available for a new session
Total msg/sec1K2K10KUnlimitedTotal throughput of messages processed per second, including both incoming and outgoing `MQTT_PUBLISH` packets. +It does not include acknowledgment packets used in QoS 1 and 2 flows (such as `PUBACK`, `PUBREC`, etc.), nor other MQTT control packets like `CONNECT`, `SUBSCRIBE`, `UNSUBSCRIBE`, etc.
Monthly traffic100GB200GB1TBUnlimitedMonthly traffic refers to the total amount of data transmitted through the TBMQ broker, including both incoming and outgoing MQTT messages. +Traffic is measured as the sum of all MQTT packet payloads sent and received by clients. If the monthly allowance is exceeded, additional usage is billed at $0.15 per GB
Applications / Integrations51050UnlimitedMaximum number of persistent Application clients and +Integrations managed by the broker, including both connected and temporarily disconnected ones
Application topic size1 GB1 GB1 GBUnlimitedMaximum size of the Kafka topic used to store persisted messages for a disconnected Application client. Each client has a dedicated topic, and messages are retained until delivered or the size limit is reached
Application topic TTL1 day1 day1 dayUnlimitedTime-to-live for messages stored in Kafka topics for Application clients. If a client remains disconnected beyond this period, undelivered messages will be discarded automatically
Integration topic size1 GB1 GB1 GBUnlimitedMaximum size of the Kafka topic used to store persisted messages for a disconnected Integration. Each Integration has a dedicated topic, and messages are retained until delivered or the size limit is reached
Integration topic TTL1 day1 day1 dayUnlimitedTime-to-live for messages stored in dedicated Kafka topics for each Integration. If the Integration remains disconnected beyond this period, undelivered messages will be automatically discarded
Message rate limits for default ('Device') persistent sessions50 per second100 per second500 per secondUnlimitedTotal number of messages processed per second for all Device clients with persistent sessions. +These clients are subscribers, and if they are offline, the messages are stored in Redis to be delivered when they reconnect
Messages storage for default ('Device') persistent sessions100 per session200 per session1K per sessionUnlimitedMaximum number of messages that can be stored for each Device client with a persistent session while it is offline. Once the limit is reached, older messages are dropped to make room for new ones
Device persisted messages TTL1 day1 day1 dayUnlimited"Time to live" parameter for messages stored for Device persisted clients while they are offline
Stats TTL1 month1 month1 monthUnlimited"Time to live" parameter for statistics persistence. This includes metrics visible on the UI: sessions, subscriptions, incoming messages, outgoing messages, etc.
Session TTL1 day1 day1 dayUnlimited"Time to live" parameter for persistent session that is disconnected. If a client remains disconnected beyond this duration, its session data will be automatically removed from the broker
Client incoming messages rate limitUp to 10 per second, not exceeding 300 per minuteUp to 10 per second, not exceeding 300 per minuteUp to 10 per second, not exceeding 300 per minuteUnlimitedTotal number of incoming messages per publisher client with any Quality of Service (QoS) level
Client outgoing messages rate limitUp to 10 per second, not exceeding 300 per minuteUp to 10 per second, not exceeding 300 per minuteUp to 10 per second, not exceeding 300 per minuteUnlimitedTotal number of outgoing messages per non-persistent subscriber client with Quality of Service (QoS) level equal to 0 ("AT_MOST_ONCE")
In-flight messages per publisher100100100UnlimitedMaximum number of incoming QoS 1 and QoS 2 messages from a publisher that can be awaiting acknowledgment. Acknowledgment is sent after the message is successfully persisted by the broker. +If this limit is exceeded, the client is disconnected to prevent overload
Client pre-connect messages100100100UnlimitedMaximum number of messages the broker will queue per client during the connection handshake phase. If this limit is exceeded before the client completes the connection, the client will be disconnected
Message size1 MB1 MB1 MBUnlimitedMaximum size of the payload in an MQTT_PUBLISH packet that the broker will accept. Larger messages will be rejected unless using the Enterprise plan with custom limits
Uptime SLA99.9%99.9%99.95%CustomRepresents the percentage of time a broker is expected to be fully operational and accessible
+ +where "**K**" means 1 thousand, "**M**" means 1 million, "**B**" means 1 billion. diff --git a/_includes/docs/mqtt-broker/troubleshooting.md b/_includes/docs/mqtt-broker/troubleshooting.md index 5cc8d85aa0..9f838e11f1 100644 --- a/_includes/docs/mqtt-broker/troubleshooting.md +++ b/_includes/docs/mqtt-broker/troubleshooting.md @@ -11,7 +11,7 @@ you can analyze the overall state of the broker. TBMQ provides the ability to monitor whether the rate of producing messages to Kafka is faster than the rate of consuming and processing them. In such cases, you will experience a growing latency for message processing. -To enable this functionality, ensure that Kafka consumer-stats are enabled (see the **queue.kafka.consumer-stats** section of the [Configuration properties](/docs/mqtt-broker/install/config/)). +To enable this functionality, ensure that Kafka consumer-stats are enabled (see the **queue.kafka.consumer-stats** section of the [Configuration properties](/docs/{{docsPrefix}}mqtt-broker/install/config/)). Once Kafka consumer-stats are enabled, logs (see [Troubleshooting](#logs)) about offset lag for consumer groups will be generated. @@ -195,18 +195,28 @@ Please note that in order to achieve maximum performance, **TBMQ uses several qu ## Getting help
-
If you are unable to find a solution to your problem from any of the guides provided above, please do not hesitate to contact the ThingsBoard team for further assistance. -Contact us +Contact us diff --git a/_includes/docs/mqtt-broker/user-guide/backpressure.md b/_includes/docs/mqtt-broker/user-guide/backpressure.md new file mode 100644 index 0000000000..0495ea105b --- /dev/null +++ b/_includes/docs/mqtt-broker/user-guide/backpressure.md @@ -0,0 +1,188 @@ +* TOC +{:toc} + +In high-throughput messaging systems like TBMQ, [backpressure](https://medium.com/@jayphelps/backpressure-explained-the-flow-of-data-through-software-2350b3e77ce7) +handling is essential to ensure stability, maintain performance, and prevent out-of-memory (OOM) errors under heavy load. +Backpressure can occur in two directions: **inbound**, when data is flowing into the broker from publishers, and **outbound**, when the broker delivers data to subscribers. +TBMQ is designed to effectively handle both. + +TBMQ uses Netty as the backbone for its MQTT communication, handling all low-level networking and I/O operations. +While Netty provides high performance and scalability, it also requires careful control of inbound and outbound message flow. + +## Inbound Backpressure + +TBMQ is architected to handle virtually unlimited load from publishers. +Incoming messages are not stored in memory indefinitely — instead, they are immediately persisted to **Kafka**, which acts as the backbone for further processing and routing. +This design ensures that even under extreme publisher throughput, memory usage remains stable and predictable. + +To support growing workloads, TBMQ can be **horizontally scaled** by deploying multiple broker instances, distributing the load and increasing throughput capacity. +However, in cases where users prefer not to scale horizontally or avoid investing heavily in infrastructure or advanced configuration tuning, +TBMQ offers additional mechanisms to manage incoming traffic effectively. + +These include TCP-level backpressure, controlled via Netty's socket receive buffer, and application-level rate limiting, which allows enforcing both per-client and cluster-wide message rate policies. +Together, these options provide flexible, cost-efficient ways to protect the broker from overload and ensure stable performance under varying traffic conditions. + +### TCP-Level Backpressure + +One of the key mechanisms is TCP-level backpressure, enabled through the Netty socket receive buffer. This buffer can be configured using the `so_receive_buffer` parameter: + +```yaml +# Socket receive buffer size for Netty in KB. +# If the buffer limit is reached, TCP will trigger backpressure and notify the sender to slow down. +# If set to 0 (default), the system's default buffer size will be used. +so_receive_buffer: "${NETTY_SO_RECEIVE_BUFFER:0}" +``` + +When the receive buffer is filled and not being drained fast enough (e.g., due to high load or slow downstream processing), TCP will signal the remote sender to apply backpressure. +This allows the broker to slow down inbound traffic naturally without immediately dropping connections or overloading memory. + +> In most cases, it is recommended to leave this value at 0, which lets the operating system apply an optimized default. +> Only consider tuning this parameter in low-latency or high-throughput scenarios after profiling, or when you want tighter control over memory usage and backpressure behavior. + +### Rate limiting + +While not a reactive backpressure mechanism, rate limiting in TBMQ serves as an additional layer of protection by proactively controlling the volume of incoming messages. +It complements true backpressure mechanisms by enforcing traffic constraints before the system becomes overloaded. +TBMQ supports both cluster-wide rate limits (to control total incoming traffic) and per-client rate limits (to prevent individual publishers from overwhelming the broker). +These settings allow operators to define message rate policies that help maintain system stability, fairness across clients, and protect against spikes in traffic. + +```yaml +rate-limits: + total: + # Enable/disable total incoming and outgoing messages rate limits for the broker (per whole cluster) + enabled: "${MQTT_TOTAL_RATE_LIMITS_ENABLED:false}" + # Limit the total message rate across the cluster (e.g., 1000 messages per second, 50000 per minute) + config: "${MQTT_TOTAL_RATE_LIMITS_CONFIG:1000:1,50000:60}" + + incoming-publish: + # Enable/disable per-client publish rate limits + enabled: "${MQTT_INCOMING_RATE_LIMITS_ENABLED:false}" + # Limit how many messages each client can send over time (e.g., 10 messages per second, 300 per minute) + client-config: "${MQTT_INCOMING_RATE_LIMITS_CLIENT_CONFIG:10:1,300:60}" +``` + +Together, TCP backpressure and configurable rate limits make TBMQ highly resilient and capable of self-regulating traffic before any internal processing bottlenecks or memory pressure occur. + +## Outbound Backpressure + +If a subscriber cannot keep up, the broker’s outbound channel buffer may become overwhelmed. +Without backpressure control, this can lead to uncontrolled memory growth and eventually cause the broker to run out of memory. +To address this, TBMQ introduces a backpressure-aware delivery mechanism that detects when a Netty channel becomes non-writable and temporarily pauses message delivery. +Delivery resumes automatically once the channel becomes writable again. +This ensures efficient memory usage and stable operation even under heavy load. + +### Netty Channel Writability Monitoring + +TBMQ uses Netty as the underlying network framework, which provides built-in support for monitoring the **writability** (`channelWritabilityChanged` event) of each channel. +This allows TBMQ to detect when a subscriber’s connection becomes overwhelmed with outbound data and apply backpressure by pausing further writes to that channel. + +Netty determines writability based on **write buffer watermarks** — a pair of thresholds: + +- **High Watermark**: If the outbound buffer size exceeds this threshold, the channel is marked as **non-writable**. TBMQ will stop sending messages to that client until the buffer drains. +- **Low Watermark**: When the buffer size drops below this value, the channel becomes **writable** again, and TBMQ resumes message delivery. + +These thresholds are configurable via environment variables: + +- `NETTY_WRITE_BUFFER_LOW_WATER_MARK` – defines the low watermark in bytes (default: `32768`, i.e. 32 KB) +- `NETTY_WRITE_BUFFER_HIGH_WATER_MARK` – defines the high watermark in bytes (default: `65536`, i.e. 64 KB) + +These values are applied during Netty server bootstrap using the `WRITE_BUFFER_WATER_MARK` channel option. + +By leveraging this mechanism, TBMQ ensures that no client connection can consume excessive memory due to unchecked message delivery. +Instead, delivery is paused and resumed dynamically based on channel health, preserving broker stability under load. + +### Handling Non-Persistent and Persistent Clients + +TBMQ differentiates backpressure behavior based on whether the subscriber client is **persistent** or **non-persistent**, ensuring efficient use of memory and storage resources. + +#### Non-Persistent Clients + +For non-persistent clients, TBMQ does **not store messages** if the channel becomes non-writable. Instead, when backpressure is detected: + +- The broker **skips** delivery of messages to that client. +- These dropped messages are not retained or retried, which aligns with MQTT expectations for non-persistent sessions. +- A global dropped message counter is maintained to track how many messages were skipped due to backpressure. This metric provides visibility into system behavior under load and helps identify bottlenecks. + +This approach avoids memory buildup for short-lived or unreliable clients that are not expected to maintain state. + +#### Persistent Clients + +Persistent clients have guaranteed message delivery, so skipping messages is not acceptable. +TBMQ ensures durability even under backpressure by using persistent storage for message queuing and controlling delivery based on channel writability. + +For **Device clients**, messages are stored in **Redis** before delivery. If the channel becomes non-writable, message sending is paused. +Once the channel becomes writable again, TBMQ resumes delivery by reading pending messages from Redis. + +- Redis has a **per-client message queue limit** (e.g., 10,000 messages). If this limit is exceeded before the client becomes writable, older messages may be dropped. +- This limit is configurable via an environment variable `MQTT_PERSISTENT_SESSION_DEVICE_PERSISTED_MESSAGES_LIMIT`. +- Additionally, each message stored in Redis has a **time-to-live (TTL)** to ensure stale messages are eventually cleaned up. +The TTL is configurable via the environment variable `MQTT_PERSISTENT_SESSION_DEVICE_PERSISTED_MESSAGES_TTL`. +For MQTT 5.0 clients that specify a `message expiry interval`, TBMQ respects the client-defined value and uses it in place of the configured default. + +For **Application clients**, messages are stored in **Kafka**. If the channel to the client becomes non-writable, +TBMQ temporarily **pauses the Kafka consumer** for that client to avoid polling and buffering unnecessary messages. +Once the channel becomes writable, the consumer is resumed and message delivery continues. + +- Kafka's **retention policy** ensures that even when consumers are paused, messages remain available for a defined period: +``` +retention.ms=604800000 (7 days) +retention.bytes=1048576000 (1 GB) +``` +- These settings can be customized via the following environment variable `TB_KAFKA_APP_PERSISTED_MSG_TOPIC_PROPERTIES`. + +This mechanism ensures that persistent clients can reliably receive messages even under backpressure, without overloading the broker or losing data. + +### Shared Subscriptions and Backpressure Handling + +TBMQ also applies backpressure handling logic in the context of [shared subscriptions](/docs/{{docsPrefix}}mqtt-broker/user-guide/shared-subscriptions/), ensuring reliable and efficient message delivery across all subscription types. +A shared subscription group may contain one or more subscribers, and messages are distributed among them according to MQTT 5.0 rules. +When backpressure is detected, the broker adjusts delivery based on the type and persistence level of the shared group. + +#### Non-Persistent Shared Subscription Group + +If a subscriber in the group becomes non-writable, TBMQ skips it and attempts to deliver the message to another writable subscriber in the group. +If all subscribers in the group are non-writable, the message is dropped entirely and not queued or retained. +This behavior matches the expectation for non-persistent clients, where message loss is acceptable under overload conditions. + +#### Persistent Device Shared Subscription Group + +If a subscriber is non-writable, it is skipped, and the message is routed to another writable subscriber in the same group. +If none of the subscribers are writable, the message is saved to Redis, using a per-group queue associated with the shared subscription key. +Redis ensures that once any subscriber in the group becomes writable again, delivery resumes from the stored messages. +Queue size and TTL are controlled via the same configuration as for individual persistent device clients. + +#### Persistent Application Shared Subscription Group + +When a subscriber in the group becomes non-writable, TBMQ removes it from the Kafka consumer group associated with the shared subscription. +Other writable subscribers continue polling messages from Kafka as usual. +If all subscribers in the group become non-writable, the consumer group becomes temporarily empty, and no messages are polled. +Kafka retains undelivered messages according to the topic’s configured retention policy (environment variable `TB_KAFKA_APP_PERSISTED_MSG_SHARED_TOPIC_PROPERTIES`), +ensuring that once any subscriber becomes writable and rejoins the group, message delivery resumes. + +This approach ensures that TBMQ maintains performance, reliability, and resource efficiency even when handling shared subscriptions under pressure. Each strategy is tailored to the persistence level of the clients in the group. + +## Recommendations + +To maximize the effectiveness of TBMQ’s backpressure handling and ensure system resilience under variable load, we recommend the following: + +- **Monitor the number of non-writable clients**: Track the number of clients currently under outbound backpressure using the `nonWritableClients` counter. +This metric is available both in logs and through the monitoring system (e.g., Prometheus). +For production environments, it's recommended to set up alerts when the value increases unexpectedly or stays elevated over time. + +- **Start with Default Backpressure Settings**: For most deployments, the default Netty buffer thresholds — 32 KB low watermark and 64 KB high watermark — provide robust performance. +These settings have been tested to support **around 10,000 messages per second per subscriber** under typical conditions. + +- **Ensure Sufficient Redis and Kafka Capacity**: Persistent client buffering relies on Redis and Kafka. Monitor their memory, disk, and throughput to avoid secondary bottlenecks. + +- **Use Horizontal Scaling**: For sustained high throughput, scale broker nodes horizontally. Backpressure is not a substitute for adequate compute and I/O resources. + +- **Test Under Load**: Perform load testing with simulated slow and fast consumers to validate how your configuration handles backpressure in real scenarios. + +By following these practices, you can take full advantage of TBMQ’s backpressure handling mechanisms, ensuring reliable operation, efficient resource usage, and high performance even in demanding MQTT workloads. + +## Conclusion + +The backpressure handling mechanisms in TBMQ significantly enhance the broker’s resilience and efficiency when dealing with varying client consumption rates. +By dynamically monitoring channel writability, intelligently controlling message delivery, and integrating with both transport-level and application-level flow control, +TBMQ ensures reliable performance and optimal resource utilization—even under sustained or bursty high-load conditions. +This makes TBMQ well-suited for demanding MQTT workloads at scale. diff --git a/_includes/docs/mqtt-broker/user-guide/integrations/how-to-connect-thingsboard-to-tbmq.md b/_includes/docs/mqtt-broker/user-guide/integrations/how-to-connect-thingsboard-to-tbmq.md index febae2c237..10fd3d05e8 100644 --- a/_includes/docs/mqtt-broker/user-guide/integrations/how-to-connect-thingsboard-to-tbmq.md +++ b/_includes/docs/mqtt-broker/user-guide/integrations/how-to-connect-thingsboard-to-tbmq.md @@ -7,7 +7,7 @@ In this guide, we integrate the TBMQ with the ThingsBoard using MQTT integration We utilize TBMQ client credentials with the type **APPLICATION** to connect ThingsBoard integration as an APPLICATION client. APPLICATION clients specialize in subscribing to topics with high message rates. The messages will be persisted when the client is offline and will be delivered once it goes online, ensuring the availability of crucial data. -Read more about the APPLICATION client [here](https://thingsboard.io/docs/mqtt-broker/user-guide/mqtt-client-type/). +Read more about the APPLICATION client [here](/docs/{{docsPrefix}}mqtt-broker/user-guide/mqtt-client-type/). ThingsBoard MQTT Integration acts as an MQTT client. It subscribes to topics and converts the received data into telemetry and attribute updates. In case of a downlink message, MQTT integration converts it to the device-suitable format and pushes it to TBMQ. @@ -18,8 +18,8 @@ ThingsBoard instance that is running in the cloud can’t connect to the TBMQ de In this tutorial, we will use: - - The instance of [ThingsBoard Professional Edition](https://thingsboard.io/docs/user-guide/install/pe/installation-options/) installed **locally**; - - [TBMQ](https://thingsboard.io/docs/mqtt-broker/install/installation-options/) installed **locally** and accessible by ThingsBoard PE instance; + - The instance of [ThingsBoard Professional Edition](/docs/user-guide/install/pe/installation-options/) installed **locally**; + - [TBMQ](/docs/{{docsPrefix}}mqtt-broker/install/installation-options/) installed **locally** and accessible by ThingsBoard PE instance; - mosquitto_pub MQTT client to send messages. ## TBMQ setup @@ -33,7 +33,7 @@ To do this, login to your TBMQ user interface and follow the next steps. {% capture difference %} **Please note**:
-The Basic authenticaion must be [enabled](/docs/mqtt-broker/security/authentication/basic/). +The Basic authenticaion must be [enabled](/docs/{{docsPrefix}}mqtt-broker/security/authentication/basic/). {% endcapture %} {% include templates/info-banner.md content=difference %} diff --git a/_includes/docs/mqtt-broker/user-guide/keep-alive.md b/_includes/docs/mqtt-broker/user-guide/keep-alive.md index fd9b4b3861..0e3ad3708f 100644 --- a/_includes/docs/mqtt-broker/user-guide/keep-alive.md +++ b/_includes/docs/mqtt-broker/user-guide/keep-alive.md @@ -27,7 +27,7 @@ The Keep Alive interval is set when a client connects to the broker, in the `CON If the Keep Alive interval **is set to 60 seconds**, the client must send any MQTT control packet (e.g., a `PINGREQ`, `PUBLISH`, `SUBSCRIBE`, etc.) within **90 seconds** (60 * 1.5) to inform the broker that it’s still connected. -If the client fails to do so, the broker assumes the client is disconnected, and it will **terminate the connection** and trigger a **[Last Will message](/docs/mqtt-broker/user-guide/last-will)** (if set) to inform about unexpected disconnection. +If the client fails to do so, the broker assumes the client is disconnected, and it will **terminate the connection** and trigger a **[Last Will message](/docs/{{docsPrefix}}mqtt-broker/user-guide/last-will)** (if set) to inform about unexpected disconnection. Normally, when the client sends a `PINGREQ` to maintain the connection, the broker responds with a `PINGRESP`, confirming that the connection is still alive and the client is functioning properly. This exchange ensures the connection remains healthy even when no data is being transmitted. diff --git a/_includes/docs/mqtt-broker/user-guide/last-will.md b/_includes/docs/mqtt-broker/user-guide/last-will.md index 6339053050..6ead81fc9c 100644 --- a/_includes/docs/mqtt-broker/user-guide/last-will.md +++ b/_includes/docs/mqtt-broker/user-guide/last-will.md @@ -11,7 +11,7 @@ Similarly, in **agriculture**, devices monitor field conditions to optimize irri ## How the Last Will works -1. The Last Will message and its [parameters](/docs/mqtt-broker/user-guide/last-will/#parameters-of-the-last-will) are set when a client connects to the broker, in the `CONNECT` packet. The broker stores a Last Will message data in the session state. +1. The Last Will message and its [parameters](/docs/{{docsPrefix}}mqtt-broker/user-guide/last-will/#parameters-of-the-last-will) are set when a client connects to the broker, in the `CONNECT` packet. The broker stores a Last Will message data in the session state. 2. In case happens unexpected (ungraceful) disconnection, the Last Will message is sent to the clients that are subscribed to the Will Topic. ## Ungraceful disconnection - publish @@ -39,7 +39,7 @@ The Last Will message will be removed from the session state when: The feature “Last Will and Testament” was introduced in [MQTT 3.1](https://public.dhe.ibm.com/software/dw/webservices/ws-mqtt/mqtt-v3r1.html#connect) with the following parameters: * **Will Topic**. The MQTT topic where the Last Will message will be published. * **Will Message**. The content of the Last Will. This can be an empty message. -* **Will QoS**. The Quality of Service level for the Last Will message ([which QoS to use?](/docs/mqtt-broker/user-guide/qos)). +* **Will QoS**. The Quality of Service level for the Last Will message ([which QoS to use?](/docs/{{docsPrefix}}mqtt-broker/user-guide/qos)). * **Will Retain**. Use the Retain flag if the Will Message should be available to any new clients subscribing to the topic after the message is published. This is useful for status messages that need to stay available until updated. In [MQTT 5.0](https://docs.oasis-open.org/mqtt/mqtt/v5.0/os/mqtt-v5.0-os.html#_Toc3901040), the feature gained additional properties: @@ -54,7 +54,7 @@ In [MQTT 5.0](https://docs.oasis-open.org/mqtt/mqtt/v5.0/os/mqtt-v5.0-os.html#_T * **User Properties**. Custom metadata in the form of key-value pairs that the client can include in the Will Message. {% capture difference %} -Unsure how to set up a session with the Last Will? Check out the WebSocket Client [documentation](/docs/mqtt-broker/user-guide/ui/websocket-client/#last-will) for detailed step-by-step instructions. +Unsure how to set up a session with the Last Will? Check out the WebSocket Client [documentation](/docs/{{docsPrefix}}mqtt-broker/user-guide/ui/websocket-client/#last-will) for detailed step-by-step instructions. {% endcapture %} {% include templates/info-banner.md content=difference %} diff --git a/_includes/docs/mqtt-broker/user-guide/mqtt-broker.md b/_includes/docs/mqtt-broker/user-guide/mqtt-broker.md new file mode 100644 index 0000000000..9f5c2cc595 --- /dev/null +++ b/_includes/docs/mqtt-broker/user-guide/mqtt-broker.md @@ -0,0 +1,214 @@ +* TOC +{:toc} + + +[MQTT](/docs/{{docsPrefix}}mqtt-broker/user-guide/mqtt-protocol/) is a lightweight, publish/subscribe messaging protocol widely used in the Internet of Things (IoT) and other distributed systems. +It is specifically designed to work efficiently in environments with limited resources, low bandwidth, high latency, or unreliable network connections. + +At the heart of every MQTT architecture lies the MQTT broker — +the central server that manages all communication between clients. +The broker is responsible for receiving messages from publishers, determining which subscribers are interested in those messages, and reliably delivering them according to the protocol’s rules. +In this way, the broker acts as the backbone of the MQTT system, ensuring seamless, secure, and efficient message exchange. + +![image](/images/mqtt-broker/user-guide/mqtt/mqtt_broker.svg) + +### MQTT Clients + +An MQTT client is any device, application, or service that connects to the broker to send or receive messages. +Clients can range from small, resource-constrained IoT sensors to complex enterprise applications. +Common examples include: + +* **IoT devices** that publish sensor data, such as temperature, humidity, or GPS location. +* **Mobile or web applications** that subscribe to updates from connected devices. +* **Back-end services** that collect, process, or visualize incoming data streams. + +Each client can take on one or more roles: + +* **Publisher**: Sends (publishes) messages to a defined topic. +* **Subscriber**: Receives (subscribes to) messages from one or more topics. +* **Hybrid**: Acts as both a publisher and a subscriber, depending on the use case. + +By separating publishers and subscribers through the broker, MQTT clients remain loosely coupled, making systems more flexible, scalable, and easier to maintain. + +### MQTT Topics + +An MQTT topic is a structured string used by the broker to **route messages** between publishers and subscribers. +Topics define the subject or channel of communication and are the backbone of the publish/subscribe model. + +Key characteristics: + +* **Hierarchical structure**: Topics are organized in levels separated by slashes (`/`). + Example: `home/livingroom/temperature` +* **Message flow**: + + * **Publishers** send messages to a specific topic. + * **Subscribers** register their interest in one or more topics and receive all messages published to them. + +#### Wildcards in Topics + +MQTT supports special characters called MQTT wildcards to simplify subscription patterns: + +* `+` (single-level wildcard) — matches exactly one level in the topic hierarchy. + Example: `home/+/temperature` → matches `home/livingroom/temperature` and `home/kitchen/temperature`. +* `#` (multi-level wildcard) — matches all remaining levels in the topic hierarchy. + Example: `home/#` → matches `home/livingroom/temperature`, `home/kitchen/humidity`, and anything else under `home/`. + +This flexible topic system allows clients to filter messages with precision, making MQTT highly efficient for large-scale, event-driven communication. + +### Role of the MQTT Broker + +The **MQTT broker** is the central component that enables communication in an MQTT system. +Clients never communicate directly with each other — all messages flow through the broker. +By acting as the trusted intermediary, the broker guarantees that messages are delivered securely, reliably, and according to the rules of the protocol. + +Key responsibilities of the broker include: + +* **Managing client connections**: Establishing, monitoring, and maintaining sessions with MQTT clients. +* **Authentication and authorization**: Validating client identities and enforcing access control policies to ensure only authorized clients can publish or subscribe. +* **Message routing**: Receiving published messages and efficiently distributing them to all clients subscribed to the relevant topics. +* **Session and state management**: Tracking client subscriptions and, if configured, storing undelivered messages for clients that are offline. +* **Quality of Service (QoS)**: Guaranteeing message delivery according to the selected MQTT QoS level — *At most once (QoS 0)*, *At least once (QoS 1)*, or *Exactly once (QoS 2)*. + +In short, the broker serves as the **backbone of the MQTT network**, ensuring that communication between clients is scalable, secure, and dependable. + +### How It Works + +The operation of an MQTT system can be broken down into distinct stages — from the moment a client connects to the broker, through authentication and authorization, to message publishing and distribution. + +#### Client Connection + +* A client (device, app, or service) initiates a connection to the broker using the **CONNECT** packet. +* This packet typically includes: + + * Client identifier (`clientId`) + * Protocol version (e.g., MQTT 3.1.1 or MQTT 5.0) + * Optional username and password + * Clean session flag or session expiry interval (for session persistence) + * Last Will and Testament (LWT) message, if defined + +#### Authentication & Authorization + +* The broker validates the connection request by checking credentials (username/password, certificates for SSL/TLS, or token-based mechanisms). +* Once authenticated, the broker enforces **authorization policies**, determining which topics the client is allowed to **publish** to and **subscribe** from. +* If the connection is accepted, the broker replies with a **CONNACK** packet confirming session parameters. If not, the connection is refused. + +#### Subscribing to Topics + +* To receive messages, the client sends a **SUBSCRIBE** packet specifying one or more topics (with optional wildcards) and the desired **QoS level**. +* The broker registers the client’s subscription and replies with a **SUBACK** packet that confirms which QoS levels were granted. + +#### Publishing Messages + +* When a client wants to send data, it sends a **PUBLISH** packet to the broker. +* The packet contains: + + * The topic name + * The message payload + * The QoS level for delivery reliability + * Retain flag (if the message should be stored as the last known good value for that topic) +* Depending on QoS, the broker and client may exchange acknowledgment packets (**PUBACK**, **PUBREC**, **PUBREL**, **PUBCOMP**) to guarantee delivery. + +#### Message Distribution + +* The broker receives the published message and looks up all active subscriptions that match the topic. +* For each matching subscriber, the broker forwards the message: + + * Respecting the **QoS level** agreed upon with each subscriber. + * Delivering retained messages where applicable. + * Storing messages for offline subscribers if persistent sessions are enabled. + +#### Receiving Messages + +* Subscribers receive the message in a **PUBLISH** packet from the broker. +* Based on QoS, the subscriber may need to send back acknowledgment packets to confirm receipt. +* Once processed, subscribers can act on the message — logging it, storing it, visualizing it, or triggering actions. + +#### Disconnecting + +* When a client no longer needs the connection, it sends a **DISCONNECT** packet. +* If the client disconnects unexpectedly, the broker triggers the **Last Will and Testament (LWT)** message (if configured) and may keep the session alive based on the persistence settings. + +This end-to-end lifecycle — from connection and authentication to message delivery and disconnection — +makes MQTT a lightweight but **robust messaging protocol** for everything from simple IoT gadgets to massive distributed systems. + +### Key Features of an MQTT Broker + +An MQTT broker combines **protocol-level features** of MQTT with **system-level capabilities** to ensure efficient, secure, and reliable messaging. + +#### MQTT Protocol Features Supported by the Broker + +* **Quality of Service (QoS)**: Guarantees message delivery at different levels — *at most once (0)*, *at least once (1)*, or *exactly once (2)*. +* **Keep Alive mechanism**: Ensures the connection between client and broker stays active by requiring periodic communication, helping detect broken connections quickly. +* **Last Will and Testament (LWT)**: Sends a predefined message if a client disconnects unexpectedly, helping detect failures automatically. +* **Retained messages**: Stores the last message on a topic so new subscribers receive the most recent state instantly. +* **Topic-based routing**: Efficiently matches published messages to subscribers using hierarchical topics and wildcards. +* **Session persistence**: Maintains subscriptions and undelivered messages for clients that reconnect, allowing reliable communication even after temporary disconnections. +* **Shared subscriptions** (MQTT 5.0): Distributes messages among a group of subscribers to balance load. + +These are some of the most important MQTT features supported by brokers. +Depending on the version of the protocol (MQTT 3.1.1 or 5.0) and the specific broker implementation, many more features may be available to enhance reliability, efficiency, and security. + +> TBMQ supports the full range of MQTT 3.x and MQTT 5.0 protocol features. + +#### Broker Capabilities + +* **Scalability**: Handles thousands or millions of simultaneous client connections and messages with consistent reliability. +* **Performance**: Optimized for low latency and high throughput, even in large distributed systems. +* **Durability**: Ensures that critical messages and session data are stored persistently (e.g., in databases or disk-backed queues), so they survive restarts or crashes. +* **Security**: Provides TLS/SSL encryption, authentication, and fine-grained access control to ensure safe communication. +* **High availability & clustering**: Supports clustering, load balancing, and fault tolerance for production-grade deployments. +* **Integration**: Connects seamlessly with external systems such as databases, Kafka, or cloud services for data processing and analytics. + +> TBMQ provides all of these capabilities out of the box: horizontal scalability to millions of clients, high throughput with low latency, persistence and durability powered by Redis/Kafka, +> built-in TLS/SSL security, clustering with fault tolerance, and integration with external systems like Kafka, other MQTT brokers, and HTTP-based services. + +### Types of MQTT Brokers + +MQTT brokers come in different forms depending on how they are deployed, licensed, and used. The main categories are: + +1. **Open-source brokers** + + * Free to use and highly customizable, with active developer communities. + * Suitable for prototyping, self-hosted deployments, and integration into larger systems. + +2. **Commercial brokers** + + * Provide enterprise-grade features such as clustering, monitoring dashboards, advanced security, and SLA-backed support. + * Ideal for organizations that need guaranteed reliability, high availability, and professional support. + +3. **Cloud-based brokers (MQTT-as-a-Service)** + + * Fully managed services where the provider handles deployment, scaling, maintenance, and uptime. + * Great for rapid adoption and use cases where infrastructure management should be outsourced. + +4. **Embedded brokers** + + * Extremely lightweight brokers that run directly on edge devices, gateways, or inside applications. + * Useful for local processing, offline-first scenarios, or edge computing environments where low latency is critical. + +### How to Choose the Right MQTT Broker + +Selecting the right MQTT broker depends on your project’s scale, requirements, and long-term goals. The following criteria can help guide the decision: + +* **Scalability**: Ensure the broker can handle your projected number of client connections and message throughput, with room to grow as your system expands. +* **High availability & clustering**: Look for features like clustering, replication, and load balancing to guarantee uptime and fault tolerance in production environments. +* **Performance**: Evaluate latency, throughput, and resource efficiency under real-world load conditions to ensure the broker meets your responsiveness needs. +* **Security**: Check for support of TLS/SSL encryption, authentication, authorization, and fine-grained access controls to protect data and devices. +* **Persistence**: Consider whether the broker provides durable message storage — including retained messages, offline queues, or integration with external databases. +* **Integration capabilities**: Verify compatibility with your ecosystem, such as Kafka, SQL/NoSQL databases, monitoring tools, or cloud platforms. +* **Community & support**: An active open-source community or available enterprise support can make a big difference in troubleshooting and long-term maintenance. +* **Cost**: Balance your budget against needs — choosing between open-source (free, DIY), commercial (license + support), or cloud (subscription-based, managed) options. + +By weighing these factors, you can select a broker that not only meets your current needs but also scales with your system as it evolves. + +> TBMQ is built to meet all these criteria — +> it offers enterprise-level scalability, clustering, persistence, strong security, and deep integration options while remaining easy to operate and cost-efficient. +> This makes it a strong choice for both open-source adopters and enterprises looking for a production-ready MQTT platform. + +### Final Words + +The MQTT broker is the backbone of any MQTT-based system, enabling efficient and reliable communication between distributed devices and services. +It plays a critical role in diverse domains such as IoT ecosystems, smart homes, industrial automation, connected vehicles, and large-scale data infrastructures. + +By offloading responsibilities like message routing, delivery guarantees, and connection management to the broker, client devices remain simple, lightweight, and resource-efficient. +This not only reduces device complexity but also improves scalability, security, and overall system reliability — making the MQTT broker a cornerstone of modern connected applications. diff --git a/_includes/docs/mqtt-broker/user-guide/mqtt-client-type.md b/_includes/docs/mqtt-broker/user-guide/mqtt-client-type.md index d7f2ccd498..eba07a567c 100644 --- a/_includes/docs/mqtt-broker/user-guide/mqtt-client-type.md +++ b/_includes/docs/mqtt-broker/user-guide/mqtt-client-type.md @@ -20,13 +20,13 @@ requirements and performance expectations of each use case. This segregation of clients simplifies the implementation of different IoT scenarios, thereby optimizing overall system performance. The determination of client type occurs during the processing of the _CONNECT_ packet, with client authentication playing -a pivotal role in identifying the client type. Further details regarding client authentication can be found in the [security](/docs/mqtt-broker/security/overview/) guide, +a pivotal role in identifying the client type. Further details regarding client authentication can be found in the [security](/docs/{{docsPrefix}}mqtt-broker/security/overview/) guide, which provides comprehensive information on securing client connections. If both Basic and TLS authentications are disabled, the connecting client will always be assigned the DEVICE type. However, when Basic or TLS authentication is enabled, the client type is determined by the MQTT credentials used during the authentication process. Each MQTT client credential incorporates a `clientType` field that explicitly defines the client type. -For step-by-step instructions on creating MQTT credentials, please refer to the designated [guide](/docs/mqtt-broker/user-guide/ui/mqtt-client-credentials/). +For step-by-step instructions on creating MQTT credentials, please refer to the designated [guide](/docs/{{docsPrefix}}mqtt-broker/user-guide/ui/mqtt-client-credentials/). ## Client persistence @@ -45,9 +45,9 @@ These properties, defined in the respective MQTT specifications, provide insight TBMQ employs Kafka consumer(s) that actively polls messages from the `tbmq.msg.all` topic, subsequently forwarding these messages to their intended recipients. However, the processing logic differs between persistent and non-persistent clients. -* For [non-persistent clients](/docs/mqtt-broker/architecture/#non-persistent-client), messages are directly published to the subscribed clients. +* For [non-persistent clients](/docs/{{docsPrefix}}mqtt-broker/architecture/#non-persistent-client), messages are directly published to the subscribed clients. -* [Persistent clients](/docs/mqtt-broker/architecture/#persistent-client) maintain a session state that persists beyond individual connections, allowing them to receive messages even when they were offline. +* [Persistent clients](/docs/{{docsPrefix}}mqtt-broker/architecture/#persistent-client) maintain a session state that persists beyond individual connections, allowing them to receive messages even when they were offline. This persistence enables TBMQ to ensure message delivery to the client once it reconnects. Consequently, a distinct approach is employed for message processing intended for such clients. However, **please note**, that if the subscribing client is both persistent and subscribed with a Quality of Service (QoS) level of _0_ (_AT_MOST_ONCE_), all the messages associated with that subscription will be delivered to the client without any supplementary steps. diff --git a/_includes/docs/mqtt-broker/user-guide/mqtt-over-ws.md b/_includes/docs/mqtt-broker/user-guide/mqtt-over-ws.md index f5c4b28b3d..04c87c2937 100644 --- a/_includes/docs/mqtt-broker/user-guide/mqtt-over-ws.md +++ b/_includes/docs/mqtt-broker/user-guide/mqtt-over-ws.md @@ -41,7 +41,7 @@ This feature, combined with MQTT's publish/subscribe model, enables dynamic and ## MQTT over WebSocket in TBMQ TBMQ utilizes two listeners, WS (WebSocket) and WSS (WebSocket Secure), to facilitate communication over WebSocket. -You can refer to the overview of these listeners provided [here](/docs/mqtt-broker/security/#ws-listener). +You can refer to the overview of these listeners provided [here](/docs/{{docsPrefix}}mqtt-broker/security/#ws-listener). {% capture difference %} **Note:** For existing deployments prior v1.3.0, it's essential to update configuration files to enable WebSocket communication. @@ -50,7 +50,7 @@ To address this, pull the latest configuration files or update existing ones to {% endcapture %} {% include templates/info-banner.md content=difference %} -For detailed WebSocket-related parameters, please refer to the provided [link](/docs/mqtt-broker/install/config/#mqtt-listeners-parameters) +For detailed WebSocket-related parameters, please refer to the provided [link](/docs/{{docsPrefix}}mqtt-broker/install/config/#mqtt-listeners-parameters) (locate `LISTENER_WS_ENABLED` and related environment variables). ## Getting started @@ -60,7 +60,7 @@ In this guide, we present an illustrative example of how to establish MQTT over ### Installing TBMQ Before we delve in, make sure the TBMQ is successfully installed. -To obtain detailed instructions on how to install TBMQ on different platforms, we recommend exploring the [Installation options](/docs/mqtt-broker/install/installation-options/) documentation. +To obtain detailed instructions on how to install TBMQ on different platforms, we recommend exploring the [Installation options](/docs/{{docsPrefix}}mqtt-broker/install/installation-options/) documentation. For this guide, we will follow the below instructions for quick TBMQ installation. @@ -234,8 +234,13 @@ Packet send... { cmd: 'disconnect' } Closing client... ``` -Moreover, you can utilize the [WebSocket client](/docs/mqtt-broker/user-guide/ui/websocket-client/) to subscribe to the topic and receive messages, allowing you to verify the result. +Moreover, you can utilize the [WebSocket client](/docs/{{docsPrefix}}mqtt-broker/user-guide/ui/websocket-client/) to subscribe to the topic and receive messages, allowing you to verify the result. + +{% if docsPrefix == "pe/" %} +![image](/images/pe/mqtt-broker/ws/ws_example.png) +{% else %} ![image](/images/mqtt-broker/ws/ws_example.png) +{% endif %} ### Connection details @@ -261,7 +266,7 @@ This means clients might receive security warnings when connecting to the server Self-signed certificates are cost-effective for development or private networks but are not recommended for public or production environments due to trust issues with end users. {% capture difference %} If you're utilizing a self-signed certificate for the broker, it's crucial to manually include it within the browser's trust store to ensure seamless connectivity. -This step is essential for [WebSocket client](/docs/mqtt-broker/user-guide/ui/websocket-client/) functionality within the browser environment. +This step is essential for [WebSocket client](/docs/{{docsPrefix}}mqtt-broker/user-guide/ui/websocket-client/) functionality within the browser environment. {% endcapture %} {% include templates/info-banner.md content=difference %} @@ -286,10 +291,10 @@ like API keys or OAuth tokens, is commonly used to ensure secure communication. In non-browser environments such as Node.js, and programming languages like Python and Java, when utilizing the appropriate MQTT library, two-way authentication functions seamlessly and remains an exceptionally effective security measure. -Let's review the example. Make sure WSS listener is [enabled and configured](/docs/mqtt-broker/security/#wss-listener) properly. +Let's review the example. Make sure WSS listener is [enabled and configured](/docs/{{docsPrefix}}mqtt-broker/security/#wss-listener) properly. For establishing a two-way authenticated connection, ensure that the MQTT client credentials of type 'X.509 Certificate Chain' are created, -with the client certificate Common Name (CN) specified. Refer to [this guide](/docs/mqtt-broker/user-guide/ui/mqtt-client-credentials/#ssl-credentials) for detailed instructions. +with the client certificate Common Name (CN) specified. Refer to [this guide](/docs/{{docsPrefix}}mqtt-broker/user-guide/ui/mqtt-client-credentials/#ssl-credentials) for detailed instructions. Replace `example.com` with your actual DNS and replace `/path/to/your/client/key/file.pem`, `/path/to/your/client/cert/file.pem`, and `/path/to/your/ca/cert/file.pem` with the respective paths to your certificate files. diff --git a/_includes/docs/mqtt-broker/user-guide/shared-subscriptions.md b/_includes/docs/mqtt-broker/user-guide/shared-subscriptions.md index de81d26efe..fd030cf92b 100644 --- a/_includes/docs/mqtt-broker/user-guide/shared-subscriptions.md +++ b/_includes/docs/mqtt-broker/user-guide/shared-subscriptions.md @@ -61,7 +61,7 @@ If strict message ordering is critical for your application, consider using a ** ## Subscribing to Shared Subscriptions -In this tutorial, we will be connecting [DEVICE](/docs/mqtt-broker/user-guide/mqtt-client-type/#device-client) non-persistent clients and using the [Mosquitto](https://mosquitto.org/download/) client library. +In this tutorial, we will be connecting [DEVICE](/docs/{{docsPrefix}}mqtt-broker/user-guide/mqtt-client-type/#device-client) non-persistent clients and using the [Mosquitto](https://mosquitto.org/download/) client library. For Ubuntu users, it can be installed using the following command: ``` sudo apt-get install mosquitto-clients @@ -169,8 +169,8 @@ These considerations ensure that message distribution and persistence are handle To utilize the shared subscription feature for APPLICATION clients in TBMQ, you need to follow an additional step. First, you'll need to create an Application Shared Subscription entity in the PostgreSQL database. -To do so follow the instructions from the following [guide](/docs/mqtt-broker/user-guide/ui/shared-subscriptions/). -This can also be done through the REST API, and detailed instructions can be found in the next [documentation](/docs/mqtt-broker/application-shared-subscription/). +To do so follow the instructions from the following [guide](/docs/{{docsPrefix}}mqtt-broker/user-guide/ui/shared-subscriptions/). +This can also be done through the REST API, and detailed instructions can be found in the next [documentation](/docs/{{docsPrefix}}mqtt-broker/application-shared-subscription/). The entity creation process includes the automatic creation of a corresponding Kafka topic. {% capture difference %} diff --git a/_includes/docs/mqtt-broker/user-guide/topics.md b/_includes/docs/mqtt-broker/user-guide/topics.md index f5726b1871..7d4534e30f 100644 --- a/_includes/docs/mqtt-broker/user-guide/topics.md +++ b/_includes/docs/mqtt-broker/user-guide/topics.md @@ -202,7 +202,7 @@ For example, if you set `MQTT_TOPIC_MAX_SEGMENTS_COUNT` to `2`, the broker will ## Shared subscription topics -It is also worth mentioning feature [shared subscriptions](/docs/mqtt-broker/user-guide/shared-subscriptions/) that are used to distribute messages across multiple subscribers, allowing for load balancing and efficient use of resources. +It is also worth mentioning feature [shared subscriptions](/docs/{{docsPrefix}}mqtt-broker/user-guide/shared-subscriptions/) that are used to distribute messages across multiple subscribers, allowing for load balancing and efficient use of resources. Shared subscription topic has a **specific format** to differentiate it from regular topic. @@ -221,4 +221,4 @@ Example of a shared subscription topic: ``` $share/group1/country/+/city/+/home/# -``` \ No newline at end of file +``` diff --git a/_includes/docs/mqtt-broker/user-guide/ui/monitoring.md b/_includes/docs/mqtt-broker/user-guide/ui/monitoring.md index 6dd722724e..0e75bddb94 100644 --- a/_includes/docs/mqtt-broker/user-guide/ui/monitoring.md +++ b/_includes/docs/mqtt-broker/user-guide/ui/monitoring.md @@ -3,7 +3,11 @@ TBMQ offers user-friendly tools that enable users to monitor broker activity and conveniently access features through the **Home** and **Monitoring** pages. +{% if docsPrefix == "pe/" %} +![image](/images/pe/mqtt-broker/user-guide/ui/home-page.png) +{% else %} ![image](/images/mqtt-broker/user-guide/ui/home-page.png) +{% endif %} ## Charts @@ -18,17 +22,21 @@ At the top of the **Home** page, you will find a set of six charts that display Please note that on the Monitoring page, users have the ability to delve deeper into the chart data. They can zoom in on specific sections, set custom date ranges to display data, or open the charts in full-screen mode. +{% if docsPrefix == "pe/" %} +![image](/images/pe/mqtt-broker/user-guide/ui/monitoring-page.png) +{% else %} ![image](/images/mqtt-broker/user-guide/ui/monitoring-page.png) +{% endif %} ## Sessions The Sessions card provides an overview of both connected and disconnected sessions. -Users can access comprehensive information about these sessions, including their status, duration, and additional details by going to the [Sessions](/docs/mqtt-broker/user-guide/ui/sessions/) page. +Users can access comprehensive information about these sessions, including their status, duration, and additional details by going to the [Sessions](/docs/{{docsPrefix}}mqtt-broker/user-guide/ui/sessions/) page. ## Credentials The system displays the number of Client Credentials categorized into two types: **Device** and **Application**. -For more information regarding the different types of Credentials, please refer to the [documentation](/docs/mqtt-broker/user-guide/mqtt-client-type/). +For more information regarding the different types of Credentials, please refer to the [documentation](/docs/{{docsPrefix}}mqtt-broker/user-guide/mqtt-client-type/). ![image](/images/mqtt-broker/user-guide/ui/sessions-credentials-card.png) @@ -117,4 +125,8 @@ Services are automatically added to the registry on their first launch, and the The key is not managed by TTL and entries are stored indefinitely. TBMQ does not automatically remove services from the registry, even if they stop running. You can manually delete a service from the UI (or using REST API) using the "Delete" button that is available only when the service status is `Outdated`. +{% if docsPrefix == "pe/" %} +![image](/images/pe/mqtt-broker/user-guide/ui/resource-usage.png) +{% else %} ![image](/images/mqtt-broker/user-guide/ui/resource-usage.png) +{% endif %} diff --git a/_includes/docs/mqtt-broker/user-guide/ui/mqtt-client-credentials.md b/_includes/docs/mqtt-broker/user-guide/ui/mqtt-client-credentials.md index 76ac10ac38..4c4a7c28af 100644 --- a/_includes/docs/mqtt-broker/user-guide/ui/mqtt-client-credentials.md +++ b/_includes/docs/mqtt-broker/user-guide/ui/mqtt-client-credentials.md @@ -1,13 +1,13 @@ * TOC {:toc} -TBMQ offers various options for managing MQTT client credentials via both its Web UI and [REST API](/docs/mqtt-broker/mqtt-client-credentials-management/). +TBMQ offers various options for managing MQTT client credentials via both its Web UI and [REST API](/docs/{{docsPrefix}}mqtt-broker/mqtt-client-credentials-management/). TBMQ supports the following types of client credentials to authenticate client connections: -- [Basic](/docs/mqtt-broker/security/#basic-authentication) - basic security measures based on combinations of client ID, username and password. +- [Basic](/docs/{{docsPrefix}}mqtt-broker/security/#basic-authentication) - basic security measures based on combinations of client ID, username and password. - **Advantages:** Simple and easy to implement. Widely supported by applications and services. Low network overhead. - **Disadvantages:** Limited security. -- [X.509 Certificate Chain](/docs/mqtt-broker/security/#tls-authentication) - advanced security measures based on X509 certificate chain that helps in verifying the identity of clients. +- [X.509 Certificate Chain](/docs/{{docsPrefix}}mqtt-broker/security/#tls-authentication) - advanced security measures based on X509 certificate chain that helps in verifying the identity of clients. - **Advantages:** Enhanced security compared to the basic client credentials type. With SSL client credentials, both the client and TBMQ can authenticate each other. The SSL client credentials type provides more flexibility in terms of access control, as it allows for more granular access control policies based on the certificate subject name and other attributes. - **Disadvantages:** Complexity and increased cost. Setting up and managing SSL client credentials can be more complex and requires more expertise. SSL encryption and decryption require more computing resources. @@ -15,9 +15,9 @@ TBMQ supports the following types of client credentials to authenticate client c - **Advantages:** Higher security level compared to basic authentication. It uses a challenge-response process to exchange hashed credentials, ensuring the password is never sent in plain text. - **Disadvantages:** Requires additional computational resources to generate and validate the salted password hashes. -Before using any of the client credential types mentioned above, please ensure that the appropriate _Authentication_ is [enabled](/docs/mqtt-broker/security/authentication/basic/). +Before using any of the client credential types mentioned above, please ensure that the appropriate _Authentication_ is [enabled](/docs/{{docsPrefix}}mqtt-broker/security/authentication/basic/). -For more information on security issues, please consult this [guide](/docs/mqtt-broker/security/overview/). +For more information on security issues, please consult this [guide](/docs/{{docsPrefix}}mqtt-broker/security/overview/). ## Adding MQTT client credentials @@ -29,7 +29,7 @@ To add new client credentials, please follow these steps: - **Device**. Use for clients that usually publish a lot of messages, but subscribe to a few topics with low message rate, i.e. IoT devices. - **Applications**. Use for clients that subscribe to topics with high message rates and require message persistence when the client is offline, such as applications like **ThingsBoard, AWS IoT Core** etc. - For more information on client types, please refer to the [docs](/docs/mqtt-broker/user-guide/mqtt-client-type/). + For more information on client types, please refer to the [docs](/docs/{{docsPrefix}}mqtt-broker/user-guide/mqtt-client-type/). 4. Select the desired _Credentials Type_ and configure the authentication parameters and authorization rules. @@ -54,9 +54,8 @@ MQTT Basic authentication is based on different combinations of the client ID, u Broker administrators can modify the password for MQTT Basic client credentials. To do this, follow these instructions: 1. Go to _Authentication_ - _Client Credentials_ page. 2. Click on the corresponding row of the Credentials. -3. Click the _Edit_ button. -4. Click the _Change password_ button. Input your current password and set a new one. -5. Confirm changes. +3. Click the _Change password_ button. +4. Input your current password, set a new one and confirm changes. {% include images-gallery.html imageCollection="change-password-basic-credentials" %} @@ -90,7 +89,11 @@ Please consider the following examples: * If Subscribe authorization rule patterns is set to default value `.*` - client will be able to subscribe to any topic. * If Publish/Subscribe authorization rules has no rules (field is empty) - client will be forbidden to publish/subscribe to any topics. +{% if docsPrefix == "pe/" %} +![image](/images/pe/mqtt-broker/user-guide/ui/ssl-credentials-authorization.png) +{% else %} ![image](/images/mqtt-broker/user-guide/ui/ssl-credentials-authorization.png) +{% endif %} ### SCRAM @@ -105,7 +108,7 @@ Please consider the following examples: ## Delete client credentials -Broker administrators can remove client credentials from TBMQ system using the Web UI or [REST API](/docs/mqtt-broker/mqtt-client-credentials-management/). +Broker administrators can remove client credentials from TBMQ system using the Web UI or [REST API](/docs/{{docsPrefix}}mqtt-broker/mqtt-client-credentials-management/). There are a few ways of deleting client credentials: 1. **Delete single**. @@ -121,7 +124,7 @@ There are a few ways of deleting client credentials: “Check Connectivity” is a useful tool that automatically generates commands to **subscribe to a topic** and **publish a message**. This feature utilizes the user's host, port, and client credentials to generate the necessary commands. -It is available only for [Basic](/docs/mqtt-broker/user-guide/ui/mqtt-client-credentials/#mqtt-basic-credentials) credentials. +It is available only for [Basic](/docs/{{docsPrefix}}mqtt-broker/user-guide/ui/mqtt-client-credentials/#mqtt-basic-credentials) credentials. To open a window with commands, please follow the next steps: 1. Click “Check connectivity” button to open the corresponding window. diff --git a/_includes/docs/mqtt-broker/user-guide/ui/sessions.md b/_includes/docs/mqtt-broker/user-guide/ui/sessions.md index 72cba83a35..921dbc6280 100644 --- a/_includes/docs/mqtt-broker/user-guide/ui/sessions.md +++ b/_includes/docs/mqtt-broker/user-guide/ui/sessions.md @@ -31,8 +31,8 @@ The **Details** tab contains the next information: * **Session end** - for persistent disconnected clients, when the session info and messages will be removed. * **Client ID** - the identifier of the client. * **Client IP** - the IP address of the client. - * [**Client type**](/docs/mqtt-broker/user-guide/mqtt-client-type) (Device/Application). - * [**Client Credentials**](/docs/mqtt-broker/user-guide/ui/mqtt-client-credentials/) that authenticated current session. + * [**Client type**](/docs/{{docsPrefix}}mqtt-broker/user-guide/mqtt-client-type) (Device/Application). + * [**Client Credentials**](/docs/{{docsPrefix}}mqtt-broker/user-guide/ui/mqtt-client-credentials/) that authenticated current session. * **MQTT version** - determines which version of MQTT protocol to be used - MQTT 3.1 (3), MQTT 3.1.1 (4), or MQTT 5.0 (5). ## Subscriptions diff --git a/_includes/docs/mqtt-broker/user-guide/ui/settings.md b/_includes/docs/mqtt-broker/user-guide/ui/settings.md index c945e27f75..d927d40920 100644 --- a/_includes/docs/mqtt-broker/user-guide/ui/settings.md +++ b/_includes/docs/mqtt-broker/user-guide/ui/settings.md @@ -2,8 +2,10 @@ * TOC {:toc} +{% if docsPrefix != "pe/" %} {% assign sinceVersion = "2.0" %} {% include templates/mqtt-broker/since.md %} +{% endif %} TBMQ provides a dedicated Settings page that allows administrators to manage key system configurations directly from the user interface. The Settings page is divided into three tabs, each focused on a specific category of system configuration. @@ -19,7 +21,7 @@ Define broker user password policies, including password strength requirements, ### Password policy -To log into TBMQ, the [user](/docs/mqtt-broker/user-guide/ui/users/) uses an email and password. +To log into TBMQ, the [user](/docs/{{docsPrefix}}mqtt-broker/user-guide/ui/users/) uses an email and password. You can enhance the security of your account by updating your security settings, including the **password policy**. For example, you can increase a minimum password length, require a mix of uppercase and lowercase letters, and specify the minimum number of digits and special characters. @@ -45,7 +47,7 @@ When the password policy is updated, new users will be required to adhere to the Note that if you have enabled the **Force to reset password if not valid** option, all users (not only new ones) who do not meet the new requirements will be forced to update their passwords. {% capture securityDocumentation %} -To see other security-related settings, please refer to our [Security documentation](/docs/mqtt-broker/security/overview/). +To see other security-related settings, please refer to our [Security documentation](/docs/{{docsPrefix}}mqtt-broker/security/overview/). {% endcapture %} {% include templates/info-banner.md content=securityDocumentation %} @@ -71,7 +73,7 @@ including activity logging options and message retention limits for the in-brows ### WebSocket client -In this section, you can configure additional settings related to the [WebSocket Client](/docs/mqtt-broker/user-guide/ui/websocket-client/) - a browser-accessible tool that provides management of MQTT clients, subscription to topics, receiving messages, and publishing messages. +In this section, you can configure additional settings related to the [WebSocket Client](/docs/{{docsPrefix}}mqtt-broker/user-guide/ui/websocket-client/) - a browser-accessible tool that provides management of MQTT clients, subscription to topics, receiving messages, and publishing messages. * **Log MQTT client activity** feature can be helpful in debugging connection issues and monitoring message flows by providing real-time client activity logs. If set to true, you will see logs for the following [MQTT.js](https://github.com/mqttjs/MQTT.js) events in the browser developer console: diff --git a/_includes/docs/mqtt-broker/user-guide/ui/shared-subscriptions.md b/_includes/docs/mqtt-broker/user-guide/ui/shared-subscriptions.md index 121907d5e8..d51cbaeb90 100644 --- a/_includes/docs/mqtt-broker/user-guide/ui/shared-subscriptions.md +++ b/_includes/docs/mqtt-broker/user-guide/ui/shared-subscriptions.md @@ -2,18 +2,18 @@ * TOC {:toc} -The Application Shared Subscription entity provides the capability to leverage the [Shared Subscriptions](/docs/mqtt-broker/user-guide/shared-subscriptions/) +The Application Shared Subscription entity provides the capability to leverage the [Shared Subscriptions](/docs/{{docsPrefix}}mqtt-broker/user-guide/shared-subscriptions/) feature for **APPLICATION** clients. This feature enables multiple clients to subscribe and receive messages from a shared subscription. ## Usage Notes In TBMQ Application shared subscriptions are entities that used for management of shared subscriptions. -* Add Application shared subscriptions if you plan to use shared subscriptions feature with [Application clients](/docs/mqtt-broker/user-guide/mqtt-client-type/#application-client). +* Add Application shared subscriptions if you plan to use shared subscriptions feature with [Application clients](/docs/{{docsPrefix}}mqtt-broker/user-guide/mqtt-client-type/#application-client). * After creation of the entity **Topic filter** and **Partitions** fields **can not be changed**. * Application Shared Subscription feature **works with MQTT v5 and earlier versions**. -Broker administrators are able to manage shared subscriptions via Web UI or [REST API](/docs/mqtt-broker/application-shared-subscription/). +Broker administrators are able to manage shared subscriptions via Web UI or [REST API](/docs/{{docsPrefix}}mqtt-broker/application-shared-subscription/). ## Adding Shared Subscription @@ -45,7 +45,7 @@ To edit entity please do the following steps: ## Deleting Shared Subscriptions -Shared Subscriptions entities can be removed from TBMQ system using the Web UI or [REST API](/docs/mqtt-broker/application-shared-subscription/). +Shared Subscriptions entities can be removed from TBMQ system using the Web UI or [REST API](/docs/{{docsPrefix}}mqtt-broker/application-shared-subscription/). There are a few ways of deleting: diff --git a/_includes/docs/mqtt-broker/user-guide/ui/subscriptions.md b/_includes/docs/mqtt-broker/user-guide/ui/subscriptions.md index b4d9ccf0c9..f71a01835e 100644 --- a/_includes/docs/mqtt-broker/user-guide/ui/subscriptions.md +++ b/_includes/docs/mqtt-broker/user-guide/ui/subscriptions.md @@ -2,8 +2,10 @@ * TOC {:toc} +{% if docsPrefix != "pe/" %} {% assign sinceVersion = "2.0" %} {% include templates/mqtt-broker/since.md %} +{% endif %} In MQTT, a subscription is a mechanism that allows clients to receive messages directed to specific topics. When a client subscribes to a topic, it expresses its interest in receiving all messages published to that topic. @@ -21,15 +23,14 @@ The table contains the following information about each subscription: You can easily add, remove or edit subscriptions from the 'Session details' window. 1. Open the 'Subscriptions' page in the left-hand menu. -2. Click on the icon button 'Session details'. -3. Click on the tab 'Subscriptions' to [manage session subscriptions](/docs/mqtt-broker/user-guide/ui/sessions/#subscriptions). -4. Add, edit or delete client subscriptions. -5. Click 'Update' to save changes. +2. Click on the table row to open [session subscription](/docs/{{docsPrefix}}mqtt-broker/user-guide/ui/sessions/#subscriptions) details. +3. Add, edit or delete client subscriptions. +4. Click 'Update' to save changes. {% include images-gallery.html imageCollection="subscription-session" %} {% capture monitoringSubscriptions %} -You can track the number of current subscriptions and other broker activity on the [Monitoring](/docs/mqtt-broker/user-guide/ui/monitoring/) and Home pages. +You can track the number of current subscriptions and other broker activity on the [Monitoring](/docs/{{docsPrefix}}mqtt-broker/user-guide/ui/monitoring/) and Home pages. {% endcapture %} {% include templates/info-banner.md title="Subscriptions chart" content=monitoringSubscriptions %} diff --git a/_includes/docs/mqtt-broker/user-guide/ui/unauthorized-clients.md b/_includes/docs/mqtt-broker/user-guide/ui/unauthorized-clients.md index 69f309bd3f..12c8ba4579 100644 --- a/_includes/docs/mqtt-broker/user-guide/ui/unauthorized-clients.md +++ b/_includes/docs/mqtt-broker/user-guide/ui/unauthorized-clients.md @@ -2,15 +2,17 @@ * TOC {:toc} +{% if docsPrefix != "pe/" %} {% assign sinceVersion = "2.0" %} {% include templates/mqtt-broker/since.md %} +{% endif %} **Unauthorized clients** in MQTT are those clients that attempted but failed to establish a connection with the MQTT broker due to various reasons such as bad credentials, incorrect TLS configuration etc. Regularly reviewing and analyzing unauthorized client attempts can help identify potential security threats and misconfigured clients. {% capture unauthorizedClientEnableAuth %} -The Unauthorized Clients feature functions only if the corresponding authentication method is [enabled](/docs/mqtt-broker/security/authentication/basic/). +The Unauthorized Clients feature functions only if the corresponding authentication method is [enabled](/docs/{{docsPrefix}}mqtt-broker/security/authentication/basic/). {% endcapture %} {% include templates/info-banner.md title="Check configuration" content=unauthorizedClientEnableAuth %} diff --git a/_includes/docs/mqtt-broker/user-guide/ui/users.md b/_includes/docs/mqtt-broker/user-guide/ui/users.md index 0c2eb41c80..8b3b658e1e 100644 --- a/_includes/docs/mqtt-broker/user-guide/ui/users.md +++ b/_includes/docs/mqtt-broker/user-guide/ui/users.md @@ -1,6 +1,12 @@ -TBMQ presently offers a single tier of user roles, namely 'Administrator'. Administrators are authorized to create, modify, and remove user accounts. +{% if docsPrefix == null %} +TBMQ provides a single user role: **Administrator**. Administrators have full permissions to create, update, and delete user accounts. +{% endif %} -User management can be performed through TBMQ's Web UI or [REST API](/docs/mqtt-broker/user-management/), which enables users to modify user details. +{% if docsPrefix == "pe/" %} +TBMQ PE includes two predefined user roles: **Administrator** and **Viewer**. For a detailed explanation of role-based access control, see [RBAC](/docs/pe/mqtt-broker/security/rbac/). +{% endif %} + +User management can be performed through TBMQ's Web UI or [REST API](/docs/{{docsPrefix}}mqtt-broker/user-management/). * TOC {:toc} @@ -14,7 +20,7 @@ To add a new User, please follow these steps: {% include images-gallery.html imageCollection="add-user-broker" %} -Note that all new users are initially created with the default password `sysadmin`. Upon first logging in, users will be required to change default password. +Note that all new users are initially created with the default password `sysadmin`. Upon logging in, users will be prompted to change the default password. ## Edit user @@ -28,18 +34,25 @@ To edit the details of an existing administrator, please follow these steps: ## Delete user -Logged-in user can delete other users, but not itself. To delete user follow these steps: +Logged-in user can delete other users, but not itself. To delete the user, follow these steps: 1. Find the user in the _Users_ table and click on the corresponding row. 2. Click the _Delete user_ button and confirm the action by selecting _Yes_. {% include images-gallery.html imageCollection="delete-user-broker" %} -## Login as admin user +## Login as another user -TBMQ allows administrators to securely log in as other users automatically, without requiring their credentials or manual authentication. +TBMQ allows Admin users to securely log in as other users automatically, without requiring their credentials or manual authentication. 1. Find the user in the _Users_ table (you can only log in as other users). 2. Click the _Login_ button in the corresponding row. {% include images-gallery.html imageCollection="login-as-user" %} + +{% if docsPrefix == "pe/" %} +## User created via OAuth 2.0 + +{% include templates/mqtt-broker/security/user-password.md %} + +{% endif %} diff --git a/_includes/docs/mqtt-broker/user-guide/ui/websocket-client.md b/_includes/docs/mqtt-broker/user-guide/ui/websocket-client.md index afac615147..438f4fa0c2 100644 --- a/_includes/docs/mqtt-broker/user-guide/ui/websocket-client.md +++ b/_includes/docs/mqtt-broker/user-guide/ui/websocket-client.md @@ -2,12 +2,16 @@ {:toc} The TBMQ WebSocket Client is a browser-accessible tool aimed at simplifying the debugging process and testing of MQTT clients across various scenarios. -Leveraging the [MQTT over WebSocket](/docs/mqtt-broker/user-guide/mqtt-over-ws/) feature, it's designed with principles of simplicity and ease of use in mind. +Leveraging the [MQTT over WebSocket](/docs/{{docsPrefix}}mqtt-broker/user-guide/mqtt-over-ws/) feature, it's designed with principles of simplicity and ease of use in mind. It offers seamless management of MQTT clients, subscription to topics, and message reception or publication. TBMQ WebSocket Client utilizes the [MQTT.js](https://github.com/mqttjs/MQTT.js) library for communication between client and broker. +{% if docsPrefix == "pe/" %} +![image](/images/pe/mqtt-broker/user-guide/ui/ws-overview.png) +{% else %} ![image](/images/mqtt-broker/user-guide/ui/ws-overview.png) +{% endif %} ## Connections @@ -58,7 +62,7 @@ WebSocket connections allow users to establish and configure various parameters, * **Authentication**. TBMQ allows to create websocket connection with different types of handling credentials details like clientID (required), username, password: * **Auto-generated credentials**. Credentials with random Client ID, random Username and empty Password. Please note that corresponding Credentials will be created. * **Custom authentication**. Credentials with custom Client ID, Username, Password. - * **Use existing credentials**. User selects existing credentials of the [Basic](/docs/mqtt-broker/security/#basic-authentication) type and, if required, input Password. + * **Use existing credentials**. User selects existing credentials of the [Basic](/docs/{{docsPrefix}}mqtt-broker/security/#basic-authentication) type and, if required, input Password. Password input field appears when the selected credentials require password to establish the connection. @@ -112,7 +116,11 @@ The status of the WebSocket Client may be one of the following: 3. **Reconnecting** This status is displayed when the client is in the process of re-establishing a connection with the broker. The reconnecting can be cancelled clicking on the button Cancel in the top right corner. 4. **Connection failed**. Indicates that the client was unable to establish a connection with the broker. This status may also include additional information such as the cause of the failure - for instance, authentication issues, session taken over, among others. +{% if docsPrefix == "pe/" %} +![image](/images/pe/mqtt-broker/user-guide/ui/ws-logs.png) +{% else %} ![image](/images/mqtt-broker/user-guide/ui/ws-logs.png) +{% endif %} ## Subscriptions @@ -183,7 +191,11 @@ The table messages can be filtered by: * **Type 'All/Received/Published'** - click on the type label in the header of the Messages table. * **Topic/QoS/Retain** - click on the _filter_ icon next to _Clear messages_ button. +{% if docsPrefix == "pe/" %} +![image](/images/pe/mqtt-broker/user-guide/ui/ws-table-filter.png) +{% else %} ![image](/images/mqtt-broker/user-guide/ui/ws-table-filter.png) +{% endif %} ### Publish a message @@ -208,7 +220,11 @@ Here is a list of basic options for publishing a message, along with brief expla After filling out the necessary information and settings, locate and **click on the Send icon** to publish your message. The message will now be dispatched to the broker and relayed to all clients who are subscribed to the given topic. +{% if docsPrefix == "pe/" %} +![image](/images/pe/mqtt-broker/user-guide/ui/ws-publish-msg.png) +{% else %} ![image](/images/mqtt-broker/user-guide/ui/ws-publish-msg.png) +{% endif %} For MQTT clients utilizing **MQTT Version 5**, there are also additional parameters available to further customize your message publishing experience. The combination of these features provides a comprehensive and flexible environment for MQTT message handling. @@ -223,4 +239,8 @@ Below is a brief explanation of each setting: * **Response Topic**. String which is used as the Topic Name for a response message. * **User Properties**. Allows user-defined metadata in form of key-value pairs. +{% if docsPrefix == "pe/" %} +![image](/images/pe/mqtt-broker/user-guide/ui/ws-publish-advanced-params.png) +{% else %} ![image](/images/mqtt-broker/user-guide/ui/ws-publish-advanced-params.png) +{% endif %} diff --git a/_includes/docs/mqtt-broker/user-management.md b/_includes/docs/mqtt-broker/user-management.md new file mode 100644 index 0000000000..7605d9cfc2 --- /dev/null +++ b/_includes/docs/mqtt-broker/user-management.md @@ -0,0 +1,71 @@ +* TOC +{:toc} + +By default, the system is initially established with a singular admin user, with username **sysadmin@thingsboard.org** and password **sysadmin**. + +However, when operating in a production environment, it is strongly advised to create a new admin user, either remove the default user entirely +or modify the password associated with the aforementioned user. + +Throughout this documentation, all provided examples will employ the **curl** command to execute REST requests, thus showcasing practical implementations of the API interactions. + +{% include templates/mqtt-broker/authentication.md %} + +## Get all users + +```bash +curl --location --request GET "http://localhost:8083/api/admin?pageSize=50&page=0" \ +--header "X-Authorization: Bearer $ACCESS_TOKEN" +``` +{: .copy-code} + +Within the system, every user entity possesses a distinct and unique identifier known as the **id**. +This id serves as a reference point and can be utilized to perform operations such as _updating_ or _deleting_ users. + +## Create/update user + +{% if docsPrefix == null %} + +```bash +curl --location --request POST 'http://localhost:8083/api/admin' \ +--header "X-Authorization: Bearer $ACCESS_TOKEN" \ +--header 'Content-Type: application/json' \ +--data-raw '{ + "id":$USER_ID, + "email":"test@gmail.com", + "password":"test", + "firstName":"test", + "lastName":"test" +}' +``` +{: .copy-code} + +{% else %} + +```bash +curl --location --request POST 'http://localhost:8083/api/admin' \ +--header "X-Authorization: Bearer $ACCESS_TOKEN" \ +--header 'Content-Type: application/json' \ +--data-raw '{ + "id":$USER_ID, + "email":"test@gmail.com", + "password":"test", + "firstName":"test", + "lastName":"test", + "roleName": "ADMIN" +}' +``` +{: .copy-code} + +{% endif %} + +If _$USER_ID_ is _null_ or _id_ field is absent in the request body, the new admin user will be created, otherwise the user with _$USER_ID_ identifier will be updated. + +## Delete user + +```bash +curl --location --request DELETE 'http://localhost:8083/api/admin/$USER_ID' \ +--header "X-Authorization: Bearer $ACCESS_TOKEN" +``` +{: .copy-code} + +Paste actual ID of the user you want to delete instead of _$USER_ID_. diff --git a/_includes/docs/pe/mqtt-broker/domains.md b/_includes/docs/pe/mqtt-broker/domains.md new file mode 100644 index 0000000000..923138dc42 --- /dev/null +++ b/_includes/docs/pe/mqtt-broker/domains.md @@ -0,0 +1,180 @@ +* TOC +{:toc} + +After installing **TBMQ PE**, as described in the [Installation Options guide](/docs/pe/mqtt-broker/install/installation-options/), +your instance is accessible by default via its public **IP address** or the **DNS record of the cloud Load Balancer**. +However, configuring a **custom domain name** provides several important advantages: + +* **Simplified access** - users can log in using an easy-to-remember hostname instead of an IP or Load Balancer DNS name. +* **Secure SSL connections** - domains enable the use of trusted SSL/TLS certificates. +* **White labeling** - TBMQ uses the domain to apply custom branding to the login page (logos, titles, and colors). The domain simplifies configuration management, as each TBMQ deployment supports only one login page branding configuration. +* **OAuth 2.0 / SSO integration** - multiple domains allow separate login configurations for each authentication provider. + +## Domain Registration + +{% capture domain_owner_note %} +**Note:** You must be the owner of the domain you are registering. +{% endcapture %} +{% include templates/info-banner.md content=domain_owner_note %} + +To use your own hostname with TBMQ, you must first configure DNS and then register the domain inside TBMQ. + +### Step 1. Configure DNS + +On your DNS provider’s website: + +* Add an **A record** (or **CNAME record**) to map your domain to the IP or hostname where TBMQ is hosted. + + * See [How to Create an A Record](#how-to-create-an-a-record-for-your-domain) + * Or [How to Create a CNAME Record](#how-to-create-a-cname-record-for-your-domain) + +* Add a valid **SSL certificate** for the chosen domain. + +### Step 2. Register Domain in TBMQ + +* Log in to your **TBMQ PE** account. + +{% include images-gallery.html imageCollection="register-domain" showListImageTitles="true" %} + +## Logging in with Your Domain + +After successful registration, you can access your TBMQ instance using the configured domain name. +Open a web browser and enter the domain in the address bar - you should see the TBMQ login page. + +{% include images-gallery.html imageCollection="login-with-domain" %} + +## Viewing Domain Details + +To view details about a registered domain, simply click on it to open the domain details dialog. + +{% include images-gallery.html imageCollection="domain-details" %} + +## Deleting a Domain + +To delete the domain click "trash" icon in the domain's row you want to delete. In the confirmation dialog, click "Yes" if you are sure you want to delete the domain. + +{% include images-gallery.html imageCollection="delete-domain" %} + +## How to Create an A Record for Your Domain {#how-to-create-an-a-record-for-your-domain} + +### What Is an A Record? + +An **A record (Address Record)** links a domain name directly to an **IPv4 address**. +It tells DNS resolvers where to find your server. + +**Example:** + +``` +mqtt.mycompany.com → 203.0.113.45 +``` + +### When to Use an A Record + +Use an **A record** when your TBMQ instance has a **fixed public IP address** - for example, a VM, Kubernetes service, or on-premise server. + +### How to Create an A Record + +The exact procedure depends on your DNS provider. +Refer to their documentation for detailed instructions: + +* [Amazon Route 53](https://docs.aws.amazon.com/Route53/latest/DeveloperGuide/resource-record-sets-values.html){:target="_blank"} +* [GoDaddy](https://www.godaddy.com/help/add-an-a-record-19238){:target="_blank"} +* [Cloudflare](https://developers.cloudflare.com/dns/manage-dns-records/how-to/create-dns-records/){:target="_blank"} +* [ClouDNS](https://www.cloudns.net/wiki/article/10/){:target="_blank"} +* [Google Cloud DNS](https://cloud.google.com/dns/docs/records){:target="_blank"} +* [Name.com](https://www.name.com/support/articles/115004893508-adding-an-a-record){:target="_blank"} +* [DNSimple](https://support.dnsimple.com/articles/manage-a-record/){:target="_blank"} +* [Infoblox NIOS](https://docs.infoblox.com/space/BloxOneDDI/186811892/Creating+A+Record){:target="_blank"} +* [Namecheap](https://www.namecheap.com/support/knowledgebase/article.aspx/434/2237/how-do-i-set-up-host-records-for-a-domain/){:target="_blank"} + +If your provider is not listed, check their documentation or contact their support team for assistance. + +## How to Create a CNAME Record for Your Domain {#how-to-create-a-cname-record-for-your-domain} + +### What Is a CNAME Record? + +A **CNAME (Canonical Name Record)** maps one domain name to another domain name. +It acts as an **alias**, allowing several domains or subdomains to point to the same hostname. + +**Example:** + +``` +mqtt.mycompany.com → broker.mycompany.net +``` + +### When to Use a CNAME Record + +Use a **CNAME record** when: + +* You want multiple domains (e.g., `mqtt.mycompany.com`, `iot.mycompany.com`) to resolve to the same host. +* Your server’s IP may change, but the target domain remains constant. +* You want to simplify DNS management by maintaining only one A record (on the primary domain). + +### How to Create a CNAME Record + +Each DNS provider has its own interface for adding CNAME records. +Below are direct links to their setup guides: + +* [Amazon Route 53](https://docs.aws.amazon.com/Route53/latest/DeveloperGuide/resource-record-sets-values.html){:target="_blank"} +* [GoDaddy](https://www.godaddy.com/help/add-a-cname-record-19236){:target="_blank"} +* [Cloudflare](https://community.cloudflare.com/t/how-do-i-add-a-cname-record/59){:target="_blank"} +* [ClouDNS](https://www.cloudns.net/wiki/article/13/){:target="_blank"} +* [Google Cloud DNS](https://cloud.google.com/dns/docs/records){:target="_blank"} +* [Name.com](https://www.name.com/support/articles/115004895548-adding-a-cname-record){:target="_blank"} +* [easyDNS](https://kb.easydns.com/knowledge/how-to-make-a-dns-entry/){:target="_blank"} +* [DNSimple](https://support.dnsimple.com/articles/manage-cname-record/#adding-a-cname-record){:target="_blank"} +* [DNSMadeEasy](https://support.dnsmadeeasy.com/hc/en-us/articles/34327195668507-CNAME-Record){:target="_blank"} +* [No-IP.com](https://www.noip.com/support/knowledgebase/how-to-configure-your-no-ip-hostname/){:target="_blank"} +* [Infoblox NIOS](https://docs.infoblox.com/display/BloxOneDDI/Creating+a+CNAME+Record){:target="_blank"} +* [Namecheap](https://www.namecheap.com/support/knowledgebase/article.aspx/9646/2237/how-to-create-a-cname-record-for-your-domain){:target="_blank"} + +If your provider is not listed, check their documentation or contact their support team for assistance. + +## Troubleshooting + +If your domain does not resolve or TBMQ is not accessible, verify the DNS configuration. + +### Check DNS Record + +Use the [Google Admin Toolbox DIG](https://toolbox.googleapps.com/apps/dig/){:target="_blank"} +or run the following command on Linux: + +```bash +dig your-domain.com any +``` +{: .copy-code} + +Replace `your-domain.com` with your actual domain name. +Example: + +```bash +dig mqtt.mycompany.com any +``` + +### Review the Output + +If no `ANSWER SECTION` appears, the record was not added correctly. +For example, this output shows **no record found**: + +```bash +;; ANSWER SECTION: +mqtt.mycompany.com. 3600 IN HINFO "RFC8482" "" +``` + +A correct record should look like this: + +```bash +;; ANSWER SECTION: +mqtt.mycompany.com. 3600 IN CNAME broker.mycompany.net. +``` + +or, if using an A record: + +```bash +;; ANSWER SECTION: +mqtt.mycompany.com. 3600 IN A 203.0.113.45 +``` + +### Contact Support + +If the configuration appears correct but the issue persists, please [contact us](https://thingsboard.io/docs/pe/mqtt-broker/help/){:target="_blank"} for further assistance. diff --git a/_includes/docs/pe/mqtt-broker/image-gallery.md b/_includes/docs/pe/mqtt-broker/image-gallery.md new file mode 100644 index 0000000000..ad69a56ced --- /dev/null +++ b/_includes/docs/pe/mqtt-broker/image-gallery.md @@ -0,0 +1,91 @@ +{% assign feature = "Image gallery" %}{% include templates/mqtt-broker/pe-tbmq-feature-banner.md %} + +* TOC +{:toc} + +The Image Gallery serves as a centralized repository for managing images in the TBMQ application. +It provides the source for logo and favicon images used in the **White labeling** feature on the [application](/docs/pe/mqtt-broker/white-labeling/#customize-tbmq-web-interface) and [login](/docs/pe/mqtt-broker/white-labeling/#customize-the-login-page) pages. + +![image](/images/pe/mqtt-broker/user-guide/white-labeling/image-gallery.png) + +## Add image + +Add your images to the Image gallery serves in [image file format](#upload-image) (PNG, JPEG, GIF, etc.) or [JSON file format](#import-image-from-json). + +### Upload image + +To upload new image in **image file format**, follow these steps: + +{% include images-gallery.html imageCollection="upload-image-1" showListImageTitles="true" %} + +### Import image from JSON + +To import your images in **JSON file format**, follow these steps: + +{% include images-gallery.html imageCollection="upload-image-2" showListImageTitles="true" %} + +## Change the image view mode + +You can view images in one of two modes: list or grid. +To change the image viewing mode, simply select the mode that suits you in the top left corner of the Image gallery window. + +{% include images-gallery.html imageCollection="image-viewing-mode" %} + +## Image operations + +You can [download](#download-image), [export to JSON](#export-image-to-json), [edit](#edit-image), and [delete](#delete-image) image using the corresponding icon opposite the image's name. +Let's take a closer look at each operation. + +### Download image + +Downloading an image in image file format can be done in two ways, depending on the selected image viewing format: + +- If you're using the list view of images, click the "Download image" icon next to the image name that you want to export. +- If you're using the grid view, hover your mouse pointer over the image you want to export and click the "Download image" icon. + +The image in image file format will be saved to your PC. + +{% include images-gallery.html imageCollection="download-image-1" %} + +### Export image to JSON + +Exporting an image to JSON can be done in two ways, depending on the selected image viewing format: + +- If you're using the list view of images, click the "Export image to JSON" icon next to the image name that you want to download. +- If you're using the grid view, hover your mouse pointer over the image you want to download and click the "Export image to JSON" icon. + +The image in JSON format will be saved to your PC. + +{% include images-gallery.html imageCollection="export-image-1" %} + +### Edit image + +To open editing an image window, click the "Edit image" icon next to the image name that you want to edit (if you're using the grid view, hover your mouse pointer over the image you want to edit and click the "Edit image" icon). +An editing window will open. In this window you can change the name, download, export it to JSON, and also [update the image](#update-image). + +To change the name of the image, enter a new name and click the "Save" icon in the "Edit image" window. + +{% include images-gallery.html imageCollection="edit-image-1" %} + +#### Update image + +Updating the image can be useful, for example, when one picture serves as the background for multiple places. +This allows you to make changes just once, and all places using that image will automatically receive the updated version, saving you the effort of editing each place individually. + +To update the image, click the "Update image" button in the editing window. Select a new image or simply drag it to the "Update image" window and click "Update". + +{% include images-gallery.html imageCollection="update-image-1" %} + +### Delete image + +To delete an image from the image list, follow these steps: + +{% include images-gallery.html imageCollection="delete-image-1" showListImageTitles="true" %} + +To delete an image that is displayed as an image grid, follow these steps: + +{% include images-gallery.html imageCollection="delete-image-2" showListImageTitles="true" %} + +You can also delete multiple images (only via the image list view) at once: + +{% include images-gallery.html imageCollection="delete-image-3" showListImageTitles="true" %} diff --git a/_includes/docs/pe/mqtt-broker/install/config.md b/_includes/docs/pe/mqtt-broker/install/config.md new file mode 100644 index 0000000000..833e4dcb17 --- /dev/null +++ b/_includes/docs/pe/mqtt-broker/install/config.md @@ -0,0 +1,3193 @@ + + +## HTTP server parameters + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
ParameterEnvironment VariableDefault ValueDescription
server.shutdownSERVER_SHUTDOWNgraceful Shutdown type (graceful or immediate)
server.addressHTTP_BIND_ADDRESS0.0.0.0 HTTP Server bind address (has no effect if web-environment is disabled)
server.portHTTP_BIND_PORT8083 HTTP Server bind port (has no effect if web-environment is disabled)
server.forward_headers_strategyHTTP_FORWARD_HEADERS_STRATEGYframework Server headers forwarding strategy. Required for SWAGGER UI when reverse proxy is used
server.http2.enabledHTTP2_ENABLEDtrue Enable/disable HTTP/2 support
server.log_controller_error_stack_traceHTTP_LOG_CONTROLLER_ERROR_STACK_TRACEfalse Log errors with stacktrace when REST API throws exception
server.http.max_payload_sizeHTTP_MAX_PAYLOAD_SIZE_LIMIT_CONFIGURATION/api/image*/**=52428800;/api/resource/**=52428800;/api/**=16777216 Semi-colon-separated list of urlPattern=maxPayloadSize pairs that define max http request size in bytes for specified url pattern. After first match all other will be skipped
server.ssl.enabledSSL_ENABLEDfalse Enable/disable SSL support
server.ssl.credentials.typeSSL_CREDENTIALS_TYPEPEM Server credentials type (PEM - pem certificate file; KEYSTORE - java keystore)
server.ssl.credentials.pem.cert_fileSSL_PEM_CERTserver.pem Path to the server certificate file (holds server certificate or certificate chain, may include server private key)
server.ssl.credentials.pem.key_fileSSL_PEM_KEYserver_key.pem Path to the server certificate private key file. Optional by default. Required if the private key is not present in server certificate file
server.ssl.credentials.pem.key_passwordSSL_PEM_KEY_PASSWORDserver_key_password Server certificate private key password (optional)
server.ssl.credentials.keystore.typeSSL_KEY_STORE_TYPEPKCS12 Type of the key store (JKS or PKCS12)
server.ssl.credentials.keystore.store_fileSSL_KEY_STOREclasspath:keystore/keystore.p12 Path to the key store that holds the SSL certificate
server.ssl.credentials.keystore.store_passwordSSL_KEY_STORE_PASSWORDthingsboard_mqtt_broker Password used to access the key store
server.ssl.credentials.keystore.key_aliasSSL_KEY_ALIAStomcat Key alias
server.ssl.credentials.keystore.key_passwordSSL_KEY_PASSWORDthingsboard_mqtt_broker Password used to access the key
+ + +## MQTT listeners parameters + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
ParameterEnvironment VariableDefault ValueDescription
listener.proxy_enabledMQTT_PROXY_PROTOCOL_ENABLEDfalse Enable proxy protocol support as a global setting for all listeners. Disabled by default. If enabled, supports both v1 and v2. + Useful to get the real IP address of the client in the logs, for session details info and unauthorized clients feature
listener.leak_detector_levelNETTY_LEAK_DETECTOR_LVLDISABLED Netty leak detector level: DISABLED, SIMPLE, ADVANCED, PARANOID. It is set globally for all listeners
listener.write_buffer_high_water_markNETTY_WRITE_BUFFER_HIGH_WATER_MARK64 The threshold (in KB) where Netty considers the channel non-writable. When the limit reached, TBMQ stops delivering data to subscriber until the channel is writable again. + Non-persistent clients lose data in this case
listener.write_buffer_low_water_markNETTY_WRITE_BUFFER_LOW_WATER_MARK32 The threshold (in KB) where Netty considers the channel writable again. When the limit reached, TBMQ starts delivering data to subscriber
listener.so_receive_bufferNETTY_SO_RECEIVE_BUFFER0 Socket receive buffer size for Netty in KB. If the buffer limit is reached, TCP will trigger backpressure and notify the sender to slow down. + If set to 0 (default), the system's default buffer size will be used
listener.tcp.enabledLISTENER_TCP_ENABLEDtrue Enable/disable MQTT TCP port listener
listener.tcp.bind_addressLISTENER_TCP_BIND_ADDRESS0.0.0.0 MQTT TCP listener bind address
listener.tcp.bind_portLISTENER_TCP_BIND_PORT1883 MQTT TCP listener bind port
listener.tcp.proxy_enabledMQTT_TCP_PROXY_PROTOCOL_ENABLED Enable proxy protocol support for the MQTT TCP listener. Unset by default – in this case it inherits the global MQTT_PROXY_PROTOCOL_ENABLED value. + If explicitly set, supports both v1 and v2 and takes precedence over the global setting. + Useful to get the real IP address of the client in the logs, for session details info and unauthorized clients feature
listener.tcp.netty.boss_group_thread_countTCP_NETTY_BOSS_GROUP_THREADS1 Netty boss group threads count
listener.tcp.netty.worker_group_thread_countTCP_NETTY_WORKER_GROUP_THREADS12 Netty worker group threads count
listener.tcp.netty.max_payload_sizeTCP_NETTY_MAX_PAYLOAD_SIZE65536 Max payload size in bytes
listener.tcp.netty.so_keep_aliveTCP_NETTY_SO_KEEPALIVEtrue Enable/disable keep-alive mechanism to periodically probe the other end of a connection
listener.tcp.netty.shutdown_quiet_periodTCP_NETTY_SHUTDOWN_QUIET_PERIOD0 Period in seconds in graceful shutdown during which no new tasks are submitted
listener.tcp.netty.shutdown_timeoutTCP_NETTY_SHUTDOWN_TIMEOUT5 The max time in seconds to wait until the executor is stopped
listener.ssl.enabledLISTENER_SSL_ENABLEDfalse Enable/disable MQTT SSL port listener
listener.ssl.bind_addressLISTENER_SSL_BIND_ADDRESS0.0.0.0 MQTT SSL listener bind address
listener.ssl.bind_portLISTENER_SSL_BIND_PORT8883 MQTT SSL listener bind port
listener.ssl.proxy_enabledMQTT_SSL_PROXY_PROTOCOL_ENABLED Enable proxy protocol support for the MQTT TLS listener. Unset by default – in this case it inherits the global MQTT_PROXY_PROTOCOL_ENABLED value. + If explicitly set, supports both v1 and v2 and takes precedence over the global setting. + Useful to get the real IP address of the client in the logs, for session details info and unauthorized clients feature
listener.ssl.config.protocolLISTENER_SSL_PROTOCOLTLSv1.2 SSL protocol: see this link
listener.ssl.config.enabled_cipher_suitesLISTENER_SSL_ENABLED_CIPHER_SUITES Sets the cipher suites enabled for use on mqtts listener. The value is a comma-separated list of cipher suits (e.g. TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384,TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256). + Defaults to empty list meaning all supported cipher suites of the used provider are taken
listener.ssl.config.credentials.typeLISTENER_SSL_CREDENTIALS_TYPEPEM Server credentials type (PEM - pem certificate file; KEYSTORE - java keystore)
listener.ssl.config.credentials.pem.cert_fileLISTENER_SSL_PEM_CERTmqttserver.pem Path to the server certificate file (holds server certificate or certificate chain, may include server private key)
listener.ssl.config.credentials.pem.key_fileLISTENER_SSL_PEM_KEYmqttserver_key.pem Path to the server certificate private key file. Optional by default. Required if the private key is not present in server certificate file
listener.ssl.config.credentials.pem.key_passwordLISTENER_SSL_PEM_KEY_PASSWORDserver_key_password Server certificate private key password (optional)
listener.ssl.config.credentials.keystore.typeLISTENER_SSL_KEY_STORE_TYPEJKS Type of the key store (JKS or PKCS12)
listener.ssl.config.credentials.keystore.store_fileLISTENER_SSL_KEY_STOREmqttserver.jks Path to the key store that holds the SSL certificate
listener.ssl.config.credentials.keystore.store_passwordLISTENER_SSL_KEY_STORE_PASSWORDserver_ks_password Password used to access the key store
listener.ssl.config.credentials.keystore.key_aliasLISTENER_SSL_KEY_ALIAS Optional alias of the private key. If not set, the platform will load the first private key from the keystore
listener.ssl.config.credentials.keystore.key_passwordLISTENER_SSL_KEY_PASSWORDserver_key_password Optional password to access the private key. If not set, the platform will attempt to load the private keys that are not protected with the password
listener.ssl.netty.boss_group_thread_countSSL_NETTY_BOSS_GROUP_THREADS1 Netty boss group threads count
listener.ssl.netty.worker_group_thread_countSSL_NETTY_WORKER_GROUP_THREADS12 Netty worker group threads count
listener.ssl.netty.max_payload_sizeSSL_NETTY_MAX_PAYLOAD_SIZE65536 Max payload size in bytes
listener.ssl.netty.so_keep_aliveSSL_NETTY_SO_KEEPALIVEtrue Enable/disable keep-alive mechanism to periodically probe the other end of a connection
listener.ssl.netty.shutdown_quiet_periodSSL_NETTY_SHUTDOWN_QUIET_PERIOD0 Period in seconds in graceful shutdown during which no new tasks are submitted
listener.ssl.netty.shutdown_timeoutSSL_NETTY_SHUTDOWN_TIMEOUT5 The max time in seconds to wait until the executor is stopped
listener.ws.enabledLISTENER_WS_ENABLEDtrue Enable/disable MQTT WS port listener
listener.ws.bind_addressLISTENER_WS_BIND_ADDRESS0.0.0.0 MQTT WS listener bind address
listener.ws.bind_portLISTENER_WS_BIND_PORT8084 MQTT WS listener bind port
listener.ws.proxy_enabledMQTT_WS_PROXY_PROTOCOL_ENABLED Enable proxy protocol support for the MQTT WS listener. Unset by default – in this case it inherits the global MQTT_PROXY_PROTOCOL_ENABLED value. + If explicitly set, supports both v1 and v2 and takes precedence over the global setting. + Useful to get the real IP address of the client in the logs, for session details info and unauthorized clients feature
listener.ws.netty.sub_protocolsWS_NETTY_SUB_PROTOCOLSmqttv3.1,mqtt Comma-separated list of subprotocols that the WebSocket can negotiate. The subprotocol setting `mqtt` represents MQTT 3.1.1 and MQTT 5
listener.ws.netty.boss_group_thread_countWS_NETTY_BOSS_GROUP_THREADS1 Netty boss group threads count
listener.ws.netty.worker_group_thread_countWS_NETTY_WORKER_GROUP_THREADS12 Netty worker group threads count
listener.ws.netty.max_payload_sizeWS_NETTY_MAX_PAYLOAD_SIZE65536 Max payload size in bytes
listener.ws.netty.so_keep_aliveWS_NETTY_SO_KEEPALIVEtrue Enable/disable keep-alive mechanism to periodically probe the other end of a connection
listener.ws.netty.shutdown_quiet_periodWS_NETTY_SHUTDOWN_QUIET_PERIOD0 Period in seconds in graceful shutdown during which no new tasks are submitted
listener.ws.netty.shutdown_timeoutWS_NETTY_SHUTDOWN_TIMEOUT5 The max time in seconds to wait until the executor is stopped
listener.wss.enabledLISTENER_WSS_ENABLEDfalse Enable/disable MQTT WSS port listener
listener.wss.bind_addressLISTENER_WSS_BIND_ADDRESS0.0.0.0 MQTT WSS listener bind address
listener.wss.bind_portLISTENER_WSS_BIND_PORT8085 MQTT WSS listener bind port
listener.wss.proxy_enabledMQTT_WSS_PROXY_PROTOCOL_ENABLED Enable proxy protocol support for the MQTT WSS listener. Unset by default – in this case it inherits the global MQTT_PROXY_PROTOCOL_ENABLED value. + If explicitly set, supports both v1 and v2 and takes precedence over the global setting. + Useful to get the real IP address of the client in the logs, for session details info and unauthorized clients feature
listener.wss.config.protocolLISTENER_WSS_PROTOCOLTLSv1.2 SSL protocol: see this link
listener.wss.config.enabled_cipher_suitesLISTENER_WSS_ENABLED_CIPHER_SUITES Sets the cipher suites enabled for use on wss listener. The value is a comma-separated list of cipher suits (e.g. TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384,TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256). + Defaults to empty list meaning all supported cipher suites of the used provider are taken
listener.wss.config.credentials.typeLISTENER_WSS_CREDENTIALS_TYPEPEM Server credentials type (PEM - pem certificate file; KEYSTORE - java keystore)
listener.wss.config.credentials.pem.cert_fileLISTENER_WSS_PEM_CERTws_mqtt_server.pem Path to the server certificate file (holds server certificate or certificate chain, may include server private key)
listener.wss.config.credentials.pem.key_fileLISTENER_WSS_PEM_KEYws_mqtt_server_key.pem Path to the server certificate private key file. Optional by default. Required if the private key is not present in server certificate file
listener.wss.config.credentials.pem.key_passwordLISTENER_WSS_PEM_KEY_PASSWORDws_server_key_password Server certificate private key password (optional)
listener.wss.config.credentials.keystore.typeLISTENER_WSS_KEY_STORE_TYPEJKS Type of the key store (JKS or PKCS12)
listener.wss.config.credentials.keystore.store_fileLISTENER_WSS_KEY_STOREws_mqtt_server.jks Path to the key store that holds the SSL certificate
listener.wss.config.credentials.keystore.store_passwordLISTENER_WSS_KEY_STORE_PASSWORDws_server_ks_password Password used to access the key store
listener.wss.config.credentials.keystore.key_aliasLISTENER_WSS_KEY_ALIAS Optional alias of the private key. If not set, the platform will load the first private key from the keystore
listener.wss.config.credentials.keystore.key_passwordLISTENER_WSS_KEY_PASSWORDws_server_key_password Optional password to access the private key. If not set, the platform will attempt to load the private keys that are not protected with the password
listener.wss.netty.sub_protocolsWSS_NETTY_SUB_PROTOCOLSmqttv3.1,mqtt Comma-separated list of subprotocols that the WebSocket can negotiate. The subprotocol setting `mqtt` represents MQTT 3.1.1 and MQTT 5
listener.wss.netty.boss_group_thread_countWSS_NETTY_BOSS_GROUP_THREADS1 Netty boss group threads count
listener.wss.netty.worker_group_thread_countWSS_NETTY_WORKER_GROUP_THREADS12 Netty worker group threads count
listener.wss.netty.max_payload_sizeWSS_NETTY_MAX_PAYLOAD_SIZE65536 Max payload size in bytes
listener.wss.netty.so_keep_aliveWSS_NETTY_SO_KEEPALIVEtrue Enable/disable keep-alive mechanism to periodically probe the other end of a connection
listener.wss.netty.shutdown_quiet_periodWSS_NETTY_SHUTDOWN_QUIET_PERIOD0 Period in seconds in graceful shutdown during which no new tasks are submitted
listener.wss.netty.shutdown_timeoutWSS_NETTY_SHUTDOWN_TIMEOUT5 The max time in seconds to wait until the executor is stopped
+ + +## Kafka parameters + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
ParameterEnvironment VariableDefault ValueDescription
queue.msg-all.consumers-countTB_MSG_ALL_CONSUMERS_COUNT4 Number of parallel consumers for 'tbmq.msg.all' topic. Should not be more than the number of partitions in topic
queue.msg-all.threads-countTB_MSG_ALL_THREADS_COUNT4 Number of threads in the pool to process consumers tasks. Should not be less than number of consumers
queue.msg-all.poll-intervalTB_MSG_ALL_POLL_INTERVAL100 Interval in milliseconds to poll messages from 'tbmq.msg.all' topic
queue.msg-all.pack-processing-timeoutTB_MSG_ALL_PACK_PROCESSING_TIMEOUT20000 Timeout in milliseconds for processing the pack of messages from 'tbmq.msg.all' topic
queue.msg-all.ack-strategy.typeTB_MSG_ALL_ACK_STRATEGY_TYPESKIP_ALL Processing strategy for 'tbmq.msg.all' topic. Can be: SKIP_ALL, RETRY_ALL
queue.msg-all.ack-strategy.retriesTB_MSG_ALL_ACK_STRATEGY_RETRIES1 Number of retries, 0 is unlimited. Use for RETRY_ALL processing strategy
queue.msg-all.msg-parallel-processingTB_MSG_ALL_PARALLEL_PROCESSINGfalse Enable/disable processing of consumed messages in parallel (grouped by publishing client id to preserve order). + Helpful when the same client publishes lots of messages in a short amount of time. + It is recommended to count the impact of this parameter before setting it on production
queue.application-persisted-msg.poll-intervalTB_APP_PERSISTED_MSG_POLL_INTERVAL100 Interval in milliseconds to poll messages from Application topics
queue.application-persisted-msg.pack-processing-timeoutTB_APP_PERSISTED_MSG_PACK_PROCESSING_TIMEOUT20000 Timeout in milliseconds for processing the pack of messages
queue.application-persisted-msg.ack-strategy.typeTB_APP_PERSISTED_MSG_ACK_STRATEGY_TYPERETRY_ALL Processing strategy for Application topics. Can be: SKIP_ALL, RETRY_ALL
queue.application-persisted-msg.ack-strategy.retriesTB_APP_PERSISTED_MSG_ACK_STRATEGY_RETRIES3 Number of retries, 0 is unlimited. Use for RETRY_ALL processing strategy
queue.application-persisted-msg.client-id-validationTB_APP_PERSISTED_MSG_CLIENT_ID_VALIDATIONtrue Enable/disable check that application client id contains only alphanumeric chars for Kafka topic creation
queue.application-persisted-msg.shared-topic-validationTB_APP_PERSISTED_MSG_SHARED_TOPIC_VALIDATIONtrue Enable/disable check that application shared subscription topic filter contains only alphanumeric chars or '+' or '#' for Kafka topic creation
queue.device-persisted-msg.consumers-countTB_DEVICE_PERSISTED_MSG_CONSUMERS_COUNT3 Number of parallel consumers for 'tbmq.msg.persisted' topic. Should not be more than the number of partitions in topic
queue.device-persisted-msg.threads-countTB_DEVICE_PERSISTED_MSG_THREADS_COUNT3 Number of threads in the pool to process consumers tasks
queue.device-persisted-msg.poll-intervalTB_DEVICE_PERSISTED_MSG_POLL_INTERVAL100 Interval in milliseconds to poll messages from 'tbmq.msg.persisted' topic
queue.device-persisted-msg.pack-processing-timeoutTB_DEVICE_PERSISTED_MSG_PACK_PROCESSING_TIMEOUT20000 Timeout in milliseconds for processing the pack of messages from 'tbmq.msg.persisted' topic
queue.device-persisted-msg.ack-strategy.typeTB_DEVICE_PERSISTED_MSG_ACK_STRATEGY_TYPERETRY_ALL Queue processing strategy. Can be: SKIP_ALL, RETRY_ALL
queue.device-persisted-msg.ack-strategy.retriesTB_DEVICE_PERSISTED_MSG_ACK_STRATEGY_RETRIES3 Number of retries, 0 is unlimited. Use for RETRY_ALL processing strategy
queue.device-persisted-msg.ack-strategy.pause-between-retriesTB_DEVICE_PERSISTED_MSG_ACK_STRATEGY_PAUSE_BETWEEN_RETRIES1 Time in seconds to wait in consumer thread before retries
queue.retained-msg.poll-intervalTB_RETAINED_MSG_POLL_INTERVAL100 Interval in milliseconds to poll messages from 'tbmq.msg.retained' topic
queue.retained-msg.acknowledge-wait-timeout-msTB_RETAINED_MSG_ACK_WAIT_TIMEOUT_MS500 Interval in milliseconds to wait for system messages to be delivered to 'tbmq.msg.retained' topic
queue.client-session.poll-intervalTB_CLIENT_SESSION_POLL_INTERVAL100 Interval in milliseconds to poll messages from 'tbmq.client.session' topic
queue.client-session.acknowledge-wait-timeout-msTB_CLIENT_SESSION_ACK_WAIT_TIMEOUT_MS500 Interval in milliseconds to wait for system messages to be delivered to 'tbmq.client.session' topic
queue.client-subscriptions.poll-intervalTB_CLIENT_SUBSCRIPTIONS_POLL_INTERVAL100 Interval in milliseconds to poll messages from 'tbmq.client.subscriptions' topic
queue.client-subscriptions.acknowledge-wait-timeout-msTB_CLIENT_SUBSCRIPTIONS_ACK_WAIT_TIMEOUT_MS500 Interval in milliseconds to wait for system messages to be delivered to 'tbmq.client.subscriptions' topic
queue.client-session-event.consumers-countTB_CLIENT_SESSION_EVENT_CONSUMERS_COUNT2 Number of parallel consumers for `tbmq.client.session.event.request` topic
queue.client-session-event.max-pending-requestsTB_CLIENT_SESSION_EVENT_MAX_PENDING_REQUESTS10000 Number of pending client session events
queue.client-session-event.poll-intervalTB_CLIENT_SESSION_EVENT_POLL_INTERVAL100 Interval in milliseconds to poll messages from 'tbmq.client.session.event.request' topic
queue.client-session-event.batch-wait-timeout-msTB_CLIENT_SESSION_EVENT_BATCH_WAIT_MS2000 Max interval in milliseconds to process 'tbmq.client.session.event.request' messages after consuming them
queue.client-session-event-response.response-sender-threadsTB_CLIENT_SESSION_EVENT_RESPONSE_SENDER_THREADS8 Number of threads for sending event responses to session event requests
queue.client-session-event-response.poll-intervalTB_CLIENT_SESSION_EVENT_RESPONSE_POLL_INTERVAL100 Interval in milliseconds to poll messages from 'tbmq.client.session.event.response' topics
queue.client-session-event-response.max-request-timeoutTB_CLIENT_SESSION_EVENT_RESPONSE_MAX_REQUEST_TIMEOUT100000 Max time in milliseconds for client session events before they are expired
queue.client-session-event-response.cleanup-intervalTB_CLIENT_SESSION_EVENT_RESPONSE_CLEANUP_INTERVAL100 Period in milliseconds to clean-up stale client session events
queue.disconnect-client-command.poll-intervalTB_DISCONNECT_CLIENT_COMMAND_POLL_INTERVAL100 Interval in milliseconds to poll messages from 'tbmq.client.disconnect' topics
queue.persisted-downlink-msg.consumers-countTB_PERSISTED_DOWNLINK_MSG_CONSUMERS_COUNT2 Number of parallel consumers for `tbmq.msg.downlink.persisted` topics
queue.persisted-downlink-msg.threads-countTB_PERSISTED_DOWNLINK_MSG_THREADS_COUNT2 Number of threads in the pool to process consumers tasks
queue.persisted-downlink-msg.poll-intervalTB_PERSISTED_DOWNLINK_MSG_POLL_INTERVAL100 Interval in milliseconds to poll messages from 'tbmq.msg.downlink.persisted' topics
queue.basic-downlink-msg.consumers-countTB_BASIC_DOWNLINK_MSG_CONSUMERS_COUNT2 Number of parallel consumers for `tbmq.msg.downlink.basic` topics
queue.basic-downlink-msg.threads-countTB_BASIC_DOWNLINK_MSG_THREADS_COUNT2 Number of threads in the pool to process consumers tasks
queue.basic-downlink-msg.poll-intervalTB_BASIC_DOWNLINK_MSG_POLL_INTERVAL100 Interval in milliseconds to poll messages from 'tbmq.msg.downlink.basic' topics
queue.application-removed-event.poll-intervalTB_APPLICATION_REMOVED_EVENT_POLL_INTERVAL100 Interval in milliseconds to poll messages from 'tbmq.sys.app.removed' topic
queue.application-removed-event.processing.cronTB_APPLICATION_REMOVED_EVENT_PROCESSING_CRON0 0 3 * * * Cron expression to when execute the consuming and processing of messages
queue.application-removed-event.processing.zoneTB_APPLICATION_REMOVED_EVENT_PROCESSING_ZONEUTC Timezone for the processing cron-job
queue.historical-data-total.poll-intervalTB_HISTORICAL_DATA_TOTAL_POLL_INTERVAL100 Interval in milliseconds to poll messages from 'tbmq.sys.historical.data' topic
queue.integration-uplink.poll-intervalTB_IE_UPLINK_POLL_INTERVAL100 Interval in milliseconds to poll messages from 'tbmq.ie.uplink' topic
queue.integration-uplink-notifications.poll-intervalTB_IE_UPLINK_NOTIFICATIONS_POLL_INTERVAL100 Interval in milliseconds to poll messages from 'tbmq.ie.uplink.notifications' topics
queue.internode-notifications.poll-intervalTB_NODE_NOTIFICATION_POLL_INTERVAL100 Interval in milliseconds to poll messages from 'tbmq.sys.internode.notifications' topics
queue.blocked-client.poll-intervalTB_BLOCKED_CLIENT_POLL_INTERVAL100 Interval in milliseconds to poll messages from 'tbmq.client.blocked' topic
queue.blocked-client.acknowledge-wait-timeout-msTB_BLOCKED_CLIENT_ACK_WAIT_TIMEOUT_MS500 Interval in milliseconds to wait for system messages to be delivered to 'tbmq.client.blocked' topic
queue.kafka.bootstrap.serversTB_KAFKA_SERVERSlocalhost:9092 List of kafka bootstrap servers used to establish connection
queue.kafka.enable-topic-deletionTB_KAFKA_ENABLE_TOPIC_DELETIONtrue Controls whether TBMQ is allowed to delete Kafka topics that were created for + Application MQTT Clients or Application Shared subscriptions. + When set to 'true', TBMQ may automatically remove topics during cleanup + (for example, when an Application client or shared subscription is deleted). + When set to 'false', TBMQ will skip topic deletions and simply stop using them. + This helps prevent accidental data loss in production environments
queue.kafka.default.consumer.partition-assignment-strategyTB_KAFKA_DEFAULT_CONSUMER_PARTITION_ASSIGNMENT_STRATEGYorg.apache.kafka.clients.consumer.StickyAssignor A list of class names or class types, ordered by preference, of supported partition assignment strategies that the client will use to distribute partition ownership amongst consumer instances when group management is used
queue.kafka.default.consumer.session-timeout-msTB_KAFKA_DEFAULT_CONSUMER_SESSION_TIMEOUT_MS10000 The timeout in milliseconds used to detect client failures when using Kafka's group management facility
queue.kafka.default.consumer.max-poll-interval-msTB_KAFKA_DEFAULT_CONSUMER_MAX_POLL_INTERVAL_MS300000 The maximum delay in milliseconds between invocations of poll() when using consumer group management
queue.kafka.default.consumer.max-poll-recordsTB_KAFKA_DEFAULT_CONSUMER_MAX_POLL_RECORDS2000 The maximum number of records returned in a single call to poll()
queue.kafka.default.consumer.max-partition-fetch-bytesTB_KAFKA_DEFAULT_CONSUMER_MAX_PARTITION_FETCH_BYTES16777216 The maximum amount of data in bytes per-partition the server will return
queue.kafka.default.consumer.fetch-max-bytesTB_KAFKA_DEFAULT_CONSUMER_FETCH_MAX_BYTES134217728 The maximum amount of data in bytes the server should return for a fetch request
queue.kafka.default.consumer.heartbeat-interval-msTB_KAFKA_DEFAULT_CONSUMER_HEARTBEAT_INTERVAL_MS3000 The expected time between heartbeats to the consumer coordinator when using Kafka’s group management facilities. + Heartbeats are used to ensure that the consumer’s session stays active and to facilitate rebalancing when new consumers join or leave the group. + The value must be set lower than TB_KAFKA_DEFAULT_CONSUMER_SESSION_TIMEOUT_MS, but typically should be set no higher than 1/3 of that value. + It can be adjusted even lower to control the expected time for normal rebalances. Value in milliseconds. Default is 3 sec
queue.kafka.default.producer.acksTB_KAFKA_DEFAULT_PRODUCER_ACKS1 The number of acknowledgments the producer requires the leader to have received before considering a request complete
queue.kafka.default.producer.retriesTB_KAFKA_DEFAULT_PRODUCER_RETRIES1 Setting a value greater than zero will cause the client to resend any record whose send fails with a potentially transient error
queue.kafka.default.producer.batch-sizeTB_KAFKA_DEFAULT_PRODUCER_BATCH_SIZE16384 The producer will attempt to batch records together into fewer requests whenever multiple records are being sent to the same partition. Size in bytes
queue.kafka.default.producer.linger-msTB_KAFKA_DEFAULT_PRODUCER_LINGER_MS5 The producer groups together any records that arrive in between request transmissions into a single batched request, set in milliseconds
queue.kafka.default.producer.buffer-memoryTB_KAFKA_DEFAULT_PRODUCER_BUFFER_MEMORY33554432 The total bytes of memory the producer can use to buffer records waiting to be sent to the server
queue.kafka.default.producer.compression-typeTB_KAFKA_DEFAULT_COMPRESSION_TYPEnone The compression type for all data generated by the producer. Valid values are `none`, `gzip`, `snappy`, `lz4`, or `zstd`
queue.kafka.admin.configTB_KAFKA_ADMIN_CONFIGretries:1 List of configs separated by semicolon used for admin kafka client creation
queue.kafka.admin.command-timeoutTB_KAFKA_ADMIN_COMMAND_TIMEOUT_SEC30 Kafka Admin client command timeout (in seconds). Applies to operations like describeCluster, listTopics, etc
queue.kafka.consumer-stats.enabledTB_KAFKA_CONSUMER_STATS_ENABLEDtrue Prints lag if enabled between consumer group offset and last messages offset in Kafka topics
queue.kafka.consumer-stats.print-interval-msTB_KAFKA_CONSUMER_STATS_PRINT_INTERVAL_MS60000 Statistics printing interval in milliseconds for Kafka's consumer-groups stats
queue.kafka.consumer-stats.kafka-response-timeout-msTB_KAFKA_CONSUMER_STATS_RESPONSE_TIMEOUT_MS1000 Time to wait in milliseconds for the stats-loading requests to Kafka to finish
queue.kafka.consumer-stats.consumer-configTB_KAFKA_CONSUMER_STATS_CONSUMER_CONFIG List of configs separated by semicolon used for kafka stats consumer
queue.kafka.home-page.consumer-configTB_KAFKA_HOME_PAGE_CONSUMER_CONFIG List of configs separated by semicolon used for kafka admin client for home page
queue.kafka.home-page.kafka-response-timeout-msTB_KAFKA_HOME_PAGE_RESPONSE_TIMEOUT_MS1000 Time to wait in milliseconds for the home page requests to Kafka to finish
queue.kafka.msg-all.topicTB_KAFKA_MSG_ALL_TOPICtbmq.msg.all Topic for persisting incoming PUBLISH messages
queue.kafka.msg-all.topic-propertiesTB_KAFKA_MSG_ALL_TOPIC_PROPERTIESretention.ms:604800000;segment.bytes:26214400;retention.bytes:2147483648;partitions:16;replication.factor:1 Kafka topic properties separated by semicolon for `tbmq.msg.all` topic
queue.kafka.msg-all.additional-consumer-configTB_KAFKA_MSG_ALL_ADDITIONAL_CONSUMER_CONFIG Additional Kafka consumer configs separated by semicolon for `tbmq.msg.all` topic
queue.kafka.msg-all.additional-producer-configTB_KAFKA_MSG_ALL_ADDITIONAL_PRODUCER_CONFIG Additional Kafka producer configs separated by semicolon for `tbmq.msg.all` topic
queue.kafka.application-persisted-msg.topic-propertiesTB_KAFKA_APP_PERSISTED_MSG_TOPIC_PROPERTIESretention.ms:604800000;segment.bytes:26214400;retention.bytes:1048576000;replication.factor:1 Kafka topic properties separated by semicolon for `tbmq.msg.app` topics
queue.kafka.application-persisted-msg.additional-consumer-configTB_KAFKA_APP_PERSISTED_MSG_ADDITIONAL_CONSUMER_CONFIGmax.poll.records:200 Additional Kafka consumer configs separated by semicolon for `tbmq.msg.app` topics
queue.kafka.application-persisted-msg.additional-producer-configTB_KAFKA_APP_PERSISTED_MSG_ADDITIONAL_PRODUCER_CONFIG Additional Kafka producer configs separated by semicolon for `tbmq.msg.app` topics
queue.kafka.application-persisted-msg.shared-topic.topic-propertiesTB_KAFKA_APP_PERSISTED_MSG_SHARED_TOPIC_PROPERTIESretention.ms:604800000;segment.bytes:26214400;retention.bytes:1048576000;replication.factor:1 Kafka topic properties separated by semicolon for application shared subscription topics
queue.kafka.application-persisted-msg.shared-topic.additional-consumer-configTB_KAFKA_APP_PERSISTED_MSG_SHARED_ADDITIONAL_CONSUMER_CONFIGmax.poll.records:500 Additional Kafka consumer configs separated by semicolon for application shared subscription topics
queue.kafka.application-persisted-msg.shared-topic.additional-producer-configTB_KAFKA_APP_PERSISTED_MSG_SHARED_ADDITIONAL_PRODUCER_CONFIG Additional Kafka producer configs separated by semicolon for application shared subscription topics
queue.kafka.device-persisted-msg.topicTB_KAFKA_DEVICE_PERSISTED_MSG_TOPICtbmq.msg.persisted Topic for persisting messages related to Device clients before saving them in Database
queue.kafka.device-persisted-msg.topic-propertiesTB_KAFKA_DEVICE_PERSISTED_MSG_TOPIC_PROPERTIESretention.ms:604800000;segment.bytes:26214400;retention.bytes:1048576000;partitions:12;replication.factor:1 Kafka topic properties separated by semicolon for `tbmq.msg.persisted` topic
queue.kafka.device-persisted-msg.additional-consumer-configTB_KAFKA_DEVICE_PERSISTED_MSG_ADDITIONAL_CONSUMER_CONFIG Additional Kafka consumer configs separated by semicolon for `tbmq.msg.persisted` topic
queue.kafka.device-persisted-msg.additional-producer-configTB_KAFKA_DEVICE_PERSISTED_MSG_ADDITIONAL_PRODUCER_CONFIG Additional Kafka producer configs separated by semicolon for `tbmq.msg.persisted` topic
queue.kafka.retained-msg.topicTB_KAFKA_RETAINED_MSG_TOPICtbmq.msg.retained Topic for retained messages
queue.kafka.retained-msg.topic-propertiesTB_KAFKA_RETAINED_MSG_TOPIC_PROPERTIESsegment.bytes:26214400;partitions:1;replication.factor:1 Kafka topic properties separated by semicolon for `tbmq.msg.retained` topic
queue.kafka.retained-msg.additional-consumer-configTB_KAFKA_RETAINED_MSG_ADDITIONAL_CONSUMER_CONFIG Additional Kafka consumer configs separated by semicolon for `tbmq.msg.retained` topic
queue.kafka.retained-msg.additional-producer-configTB_KAFKA_RETAINED_MSG_ADDITIONAL_PRODUCER_CONFIGretries:3 Additional Kafka producer configs separated by semicolon for `tbmq.msg.retained` topic
queue.kafka.client-session.topicTB_KAFKA_CLIENT_SESSION_TOPICtbmq.client.session Topic for persisting client sessions
queue.kafka.client-session.topic-propertiesTB_KAFKA_CLIENT_SESSION_TOPIC_PROPERTIESsegment.bytes:26214400;partitions:1;replication.factor:1 Kafka topic properties separated by semicolon for `tbmq.client.session` topic
queue.kafka.client-session.additional-consumer-configTB_KAFKA_CLIENT_SESSION_ADDITIONAL_CONSUMER_CONFIG Additional Kafka consumer configs separated by semicolon for `tbmq.client.session` topic
queue.kafka.client-session.additional-producer-configTB_KAFKA_CLIENT_SESSION_ADDITIONAL_PRODUCER_CONFIGretries:3 Additional Kafka producer configs separated by semicolon for `tbmq.client.session` topic
queue.kafka.client-subscriptions.topicTB_KAFKA_CLIENT_SUBSCRIPTIONS_TOPICtbmq.client.subscriptions Topic for persisting client subscriptions
queue.kafka.client-subscriptions.topic-propertiesTB_KAFKA_CLIENT_SUBSCRIPTIONS_TOPIC_PROPERTIESsegment.bytes:26214400;partitions:1;replication.factor:1 Kafka topic properties separated by semicolon for `tbmq.client.subscriptions` topic
queue.kafka.client-subscriptions.additional-consumer-configTB_KAFKA_CLIENT_SUBSCRIPTIONS_ADDITIONAL_CONSUMER_CONFIG Additional Kafka consumer configs separated by semicolon for `tbmq.client.subscriptions` topic
queue.kafka.client-subscriptions.additional-producer-configTB_KAFKA_CLIENT_SUBSCRIPTIONS_ADDITIONAL_PRODUCER_CONFIGretries:3 Additional Kafka producer configs separated by semicolon for `tbmq.client.subscriptions` topic
queue.kafka.client-session-event.topicTB_KAFKA_CLIENT_SESSION_EVENT_TOPICtbmq.client.session.event.request Topic for sending client session event requests
queue.kafka.client-session-event.topic-propertiesTB_KAFKA_CLIENT_SESSION_EVENT_TOPIC_PROPERTIESretention.ms:604800000;segment.bytes:26214400;retention.bytes:1048576000;partitions:24;replication.factor:1 Kafka topic properties separated by semicolon for `tbmq.client.session.event.request` topic
queue.kafka.client-session-event.additional-consumer-configTB_KAFKA_CLIENT_SESSION_EVENT_ADDITIONAL_CONSUMER_CONFIGmax.poll.records:1000 Additional Kafka consumer configs separated by semicolon for ``tbmq.client.session.event.request`` topic
queue.kafka.client-session-event.additional-producer-configTB_KAFKA_CLIENT_SESSION_EVENT_ADDITIONAL_PRODUCER_CONFIG Additional Kafka producer configs separated by semicolon for ``tbmq.client.session.event.request`` topic
queue.kafka.client-session-event-response.topic-prefixTB_KAFKA_CLIENT_SESSION_EVENT_RESPONSE_TOPIC_PREFIXtbmq.client.session.event.response Prefix for topics for sending client session event responses to Broker nodes
queue.kafka.client-session-event-response.topic-propertiesTB_KAFKA_CLIENT_SESSION_EVENT_RESPONSE_TOPIC_PROPERTIESretention.ms:604800000;segment.bytes:26214400;retention.bytes:1048576000;partitions:1;replication.factor:1 Kafka topic properties separated by semicolon for `tbmq.client.session.event.response` topics
queue.kafka.client-session-event-response.additional-consumer-configTB_KAFKA_CLIENT_SESSION_EVENT_RESPONSE_ADDITIONAL_CONSUMER_CONFIG Additional Kafka consumer configs separated by semicolon for `tbmq.client.session.event.response` topics
queue.kafka.client-session-event-response.additional-producer-configTB_KAFKA_CLIENT_SESSION_EVENT_RESPONSE_ADDITIONAL_PRODUCER_CONFIG Additional Kafka producer configs separated by semicolon for `tbmq.client.session.event.response` topics
queue.kafka.disconnect-client-command.topic-prefixTB_KAFKA_DISCONNECT_CLIENT_COMMAND_TOPIC_PREFIXtbmq.client.disconnect Prefix for topics for sending disconnect client commands to Broker nodes
queue.kafka.disconnect-client-command.topic-propertiesTB_KAFKA_DISCONNECT_CLIENT_COMMAND_RESPONSE_TOPIC_PROPERTIESretention.ms:604800000;segment.bytes:26214400;retention.bytes:1048576000;partitions:1;replication.factor:1 Kafka topic properties separated by semicolon for `tbmq.client.disconnect` topics
queue.kafka.disconnect-client-command.additional-consumer-configTB_KAFKA_DISCONNECT_CLIENT_COMMAND_ADDITIONAL_CONSUMER_CONFIG Additional Kafka consumer configs separated by semicolon for `tbmq.client.disconnect` topics
queue.kafka.disconnect-client-command.additional-producer-configTB_KAFKA_DISCONNECT_CLIENT_COMMAND_ADDITIONAL_PRODUCER_CONFIG Additional Kafka producer configs separated by semicolon for `tbmq.client.disconnect` topics
queue.kafka.basic-downlink-msg.topic-prefixTB_KAFKA_BASIC_DOWNLINK_MSG_TOPIC_PREFIXtbmq.msg.downlink.basic Prefix for topics for non-persistent Device messages that should be transferred to other Broker nodes
queue.kafka.basic-downlink-msg.topic-propertiesTB_KAFKA_BASIC_DOWNLINK_MSG_TOPIC_PROPERTIESretention.ms:604800000;segment.bytes:26214400;retention.bytes:1048576000;partitions:12;replication.factor:1 Kafka topic properties separated by semicolon for `tbmq.msg.downlink.basic` topics
queue.kafka.basic-downlink-msg.additional-consumer-configTB_KAFKA_BASIC_DOWNLINK_MSG_ADDITIONAL_CONSUMER_CONFIG Additional Kafka consumer configs separated by semicolon for `tbmq.msg.downlink.basic` topics
queue.kafka.basic-downlink-msg.additional-producer-configTB_KAFKA_BASIC_DOWNLINK_MSG_ADDITIONAL_PRODUCER_CONFIGbatch.size:32768 Additional Kafka producer configs separated by semicolon for `tbmq.msg.downlink.basic` topics
queue.kafka.persisted-downlink-msg.topic-prefixTB_KAFKA_PERSISTED_DOWNLINK_MSG_TOPIC_PREFIXtbmq.msg.downlink.persisted Prefix for topics for persistent Device messages that should be transferred to other Broker nodes
queue.kafka.persisted-downlink-msg.topic-propertiesTB_KAFKA_PERSISTED_DOWNLINK_MSG_TOPIC_PROPERTIESretention.ms:604800000;segment.bytes:26214400;retention.bytes:1048576000;partitions:12;replication.factor:1 Kafka topic properties separated by semicolon for `tbmq.msg.downlink.persisted` topics
queue.kafka.persisted-downlink-msg.additional-consumer-configTB_KAFKA_PERSISTED_DOWNLINK_MSG_ADDITIONAL_CONSUMER_CONFIG Additional Kafka consumer configs separated by semicolon for `tbmq.msg.downlink.persisted` topics
queue.kafka.persisted-downlink-msg.additional-producer-configTB_KAFKA_PERSISTED_DOWNLINK_MSG_ADDITIONAL_PRODUCER_CONFIG Additional Kafka producer configs separated by semicolon for `tbmq.msg.downlink.persisted` topics
queue.kafka.application-removed-event.topicTB_KAFKA_APPLICATION_REMOVED_EVENT_TOPICtbmq.sys.app.removed Topic for sending events to remove application topics when application clients are changed to be device clients
queue.kafka.application-removed-event.topic-propertiesTB_KAFKA_APPLICATION_REMOVED_EVENT_TOPIC_PROPERTIESretention.ms:604800000;segment.bytes:26214400;retention.bytes:1048576000;partitions:1;replication.factor:1 Kafka topic properties separated by semicolon for `tbmq.sys.app.removed` topic
queue.kafka.application-removed-event.additional-consumer-configTB_KAFKA_APPLICATION_REMOVED_EVENT_ADDITIONAL_CONSUMER_CONFIG Additional Kafka consumer configs separated by semicolon for `tbmq.sys.app.removed` topic
queue.kafka.application-removed-event.additional-producer-configTB_KAFKA_APPLICATION_REMOVED_EVENT_ADDITIONAL_PRODUCER_CONFIG Additional Kafka producer configs separated by semicolon for `tbmq.sys.app.removed` topic
queue.kafka.historical-data-total.topicTB_KAFKA_HISTORICAL_DATA_TOTAL_TOPICtbmq.sys.historical.data Topic for sending historical data stats to be summed from each broker
queue.kafka.historical-data-total.topic-propertiesTB_KAFKA_HISTORICAL_DATA_TOTAL_TOPIC_PROPERTIESretention.ms:604800000;segment.bytes:26214400;retention.bytes:1048576000;partitions:1;replication.factor:1 Kafka topic properties separated by semicolon for `tbmq.sys.historical.data` topic
queue.kafka.historical-data-total.additional-consumer-configTB_KAFKA_HISTORICAL_DATA_TOTAL_ADDITIONAL_CONSUMER_CONFIG Additional Kafka consumer configs separated by semicolon for `tbmq.sys.historical.data` topic
queue.kafka.historical-data-total.additional-producer-configTB_KAFKA_HISTORICAL_DATA_TOTAL_ADDITIONAL_PRODUCER_CONFIG Additional Kafka producer configs separated by semicolon for `tbmq.sys.historical.data` topic
queue.kafka.integration-downlink.topic-prefixTB_KAFKA_IE_DOWNLINK_TOPIC_PREFIXtbmq.ie.downlink Prefix for topics for sending integration configurations and validation requests from tbmq to integration executors
queue.kafka.integration-downlink.http.topic-propertiesTB_KAFKA_IE_DOWNLINK_HTTP_TOPIC_PROPERTIESretention.ms:604800000;segment.bytes:26214400;retention.bytes:1048576000;partitions:6;replication.factor:1 Kafka topic properties separated by semicolon for `tbmq.ie.downlink.http` topic
queue.kafka.integration-downlink.http.additional-consumer-configTB_KAFKA_IE_DOWNLINK_HTTP_ADDITIONAL_CONSUMER_CONFIG Additional Kafka consumer configs separated by semicolon for `tbmq.ie.downlink.http` topic
queue.kafka.integration-downlink.http.additional-producer-configTB_KAFKA_IE_DOWNLINK_HTTP_ADDITIONAL_PRODUCER_CONFIG Additional Kafka producer configs separated by semicolon for `tbmq.ie.downlink.http` topic
queue.kafka.integration-downlink.kafka.topic-propertiesTB_KAFKA_IE_DOWNLINK_KAFKA_TOPIC_PROPERTIESretention.ms:604800000;segment.bytes:26214400;retention.bytes:1048576000;partitions:6;replication.factor:1 Kafka topic properties separated by semicolon for `tbmq.ie.downlink.kafka` topic
queue.kafka.integration-downlink.kafka.additional-consumer-configTB_KAFKA_IE_DOWNLINK_KAFKA_ADDITIONAL_CONSUMER_CONFIG Additional Kafka consumer configs separated by semicolon for `tbmq.ie.downlink.kafka` topic
queue.kafka.integration-downlink.kafka.additional-producer-configTB_KAFKA_IE_DOWNLINK_KAFKA_ADDITIONAL_PRODUCER_CONFIG Additional Kafka producer configs separated by semicolon for `tbmq.ie.downlink.kafka` topic
queue.kafka.integration-downlink.mqtt.topic-propertiesTB_KAFKA_IE_DOWNLINK_MQTT_TOPIC_PROPERTIESretention.ms:604800000;segment.bytes:26214400;retention.bytes:1048576000;partitions:6;replication.factor:1 Kafka topic properties separated by semicolon for `tbmq.ie.downlink.mqtt` topic
queue.kafka.integration-downlink.mqtt.additional-consumer-configTB_KAFKA_IE_DOWNLINK_MQTT_ADDITIONAL_CONSUMER_CONFIG Additional Kafka consumer configs separated by semicolon for `tbmq.ie.downlink.mqtt` topic
queue.kafka.integration-downlink.mqtt.additional-producer-configTB_KAFKA_IE_DOWNLINK_MQTT_ADDITIONAL_PRODUCER_CONFIG Additional Kafka producer configs separated by semicolon for `tbmq.ie.downlink.mqtt` topic
queue.kafka.integration-uplink.topicTB_KAFKA_IE_UPLINK_TOPICtbmq.ie.uplink Topic for sending messages/events from integration executors to tbmq
queue.kafka.integration-uplink.topic-propertiesTB_KAFKA_IE_UPLINK_TOPIC_PROPERTIESretention.ms:604800000;segment.bytes:26214400;retention.bytes:1048576000;partitions:6;replication.factor:1 Kafka topic properties separated by semicolon for `tbmq.ie.uplink` topic
queue.kafka.integration-uplink.additional-consumer-configTB_KAFKA_IE_UPLINK_ADDITIONAL_CONSUMER_CONFIG Additional Kafka consumer configs separated by semicolon for `tbmq.ie.uplink` topic
queue.kafka.integration-uplink.additional-producer-configTB_KAFKA_IE_UPLINK_ADDITIONAL_PRODUCER_CONFIG Additional Kafka producer configs separated by semicolon for `tbmq.ie.uplink` topic
queue.kafka.integration-uplink-notifications.topic-prefixTB_KAFKA_IE_UPLINK_NOTIF_TOPIC_PREFIXtbmq.ie.uplink.notifications Prefix for topics for sending notifications or replies from integration executors to specific tbmq node
queue.kafka.integration-uplink-notifications.topic-propertiesTB_KAFKA_IE_UPLINK_NOTIF_TOPIC_PROPERTIESretention.ms:604800000;segment.bytes:26214400;retention.bytes:1048576000;partitions:1;replication.factor:1 Kafka topic properties separated by semicolon for `tbmq.ie.uplink.notifications` topics
queue.kafka.integration-uplink-notifications.additional-consumer-configTB_KAFKA_IE_UPLINK_NOTIF_ADDITIONAL_CONSUMER_CONFIG Additional Kafka consumer configs separated by semicolon for `tbmq.ie.uplink.notifications` topic
queue.kafka.integration-uplink-notifications.additional-producer-configTB_KAFKA_IE_UPLINK_NOTIF_ADDITIONAL_PRODUCER_CONFIG Additional Kafka producer configs separated by semicolon for `tbmq.ie.uplink.notifications` topic
queue.kafka.integration-msg.topic-propertiesTB_KAFKA_IE_MSG_TOPIC_PROPERTIESretention.ms:604800000;segment.bytes:26214400;retention.bytes:1048576000;replication.factor:1 Kafka topic properties separated by semicolon for `tbmq.msg.ie` topics
queue.kafka.integration-msg.additional-consumer-configTB_KAFKA_IE_MSG_ADDITIONAL_CONSUMER_CONFIGmax.poll.records:50 Additional Kafka consumer configs separated by semicolon for `tbmq.msg.ie` topics
queue.kafka.integration-msg.additional-producer-configTB_KAFKA_IE_MSG_ADDITIONAL_PRODUCER_CONFIG Additional Kafka producer configs separated by semicolon for `tbmq.msg.ie` topics
queue.kafka.internode-notifications.topic-prefixTB_KAFKA_INTERNODE_NOTIFICATIONS_TOPIC_PREFIXtbmq.sys.internode.notifications Prefix for topics for sending system notifications to Broker nodes
queue.kafka.internode-notifications.topic-propertiesTB_KAFKA_INTERNODE_NOTIFICATIONS_TOPIC_PROPERTIESretention.ms:604800000;segment.bytes:26214400;retention.bytes:1048576000;partitions:1;replication.factor:1 Kafka topic properties separated by semicolon for `tbmq.sys.internode.notifications` topics
queue.kafka.internode-notifications.additional-consumer-configTB_KAFKA_INTERNODE_NOTIFICATIONS_ADDITIONAL_CONSUMER_CONFIG Additional Kafka consumer configs separated by semicolon for `tbmq.sys.internode.notifications` topics
queue.kafka.internode-notifications.additional-producer-configTB_KAFKA_INTERNODE_NOTIFICATIONS_ADDITIONAL_PRODUCER_CONFIG Additional Kafka producer configs separated by semicolon for `tbmq.sys.internode.notifications` topics
queue.kafka.blocked-client.topicTB_KAFKA_BLOCKED_CLIENT_TOPICtbmq.client.blocked Topic for blocked clients
queue.kafka.blocked-client.topic-propertiesTB_KAFKA_BLOCKED_CLIENT_TOPIC_PROPERTIESsegment.bytes:26214400;partitions:1;replication.factor:1 Kafka topic properties separated by semicolon for `tbmq.client.blocked` topic
queue.kafka.blocked-client.additional-consumer-configTB_KAFKA_BLOCKED_CLIENT_ADDITIONAL_CONSUMER_CONFIG Additional Kafka consumer configs separated by semicolon for `tbmq.client.blocked` topic
queue.kafka.blocked-client.additional-producer-configTB_KAFKA_BLOCKED_CLIENT_ADDITIONAL_PRODUCER_CONFIG Additional Kafka producer configs separated by semicolon for `tbmq.client.blocked` topic
queue.kafka.kafka-prefixTB_KAFKA_PREFIX The common prefix for all Kafka topics, producers, consumer groups, and consumers. Defaults to empty string meaning no prefix is added
+ + +## General service parameters + + + + + + + + + + + + + + + + + + + + + +
ParameterEnvironment VariableDefault ValueDescription
service.typeTB_SERVICE_TYPEtbmq Microservice type. Allowed value: tbmq
service.idTB_SERVICE_ID Unique id for this service (autogenerated if empty)
+ + +## Actor system parameters + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
ParameterEnvironment VariableDefault ValueDescription
actors.system.throughputACTORS_SYSTEM_THROUGHPUT5 Number of messages the actor system will process per actor before switching to processing of messages for next actor
actors.system.scheduler-pool-sizeACTORS_SYSTEM_SCHEDULER_POOL_SIZE1 Thread pool size for actor system scheduler
actors.system.max-actor-init-attemptsACTORS_SYSTEM_MAX_ACTOR_INIT_ATTEMPTS10 Maximum number of attempts to init the actor before disabling the actor
actors.system.processing-metrics.enabledACTORS_SYSTEM_PROCESSING_METRICS_ENABLEDfalse Enable/disable actors processing metrics
actors.system.disconnect-wait-timeout-msACTORS_SYSTEM_DISCONNECT_WAIT_TIMEOUT_MS2000 Actors disconnect timeout in milliseconds
actors.persisted-device.dispatcher-pool-sizeACTORS_SYSTEM_PERSISTED_DEVICE_DISPATCHER_POOL_SIZE8 Number of threads processing the Device actor's messages
actors.persisted-device.wait-before-actor-stop-minutesACTORS_SYSTEM_PERSISTED_DEVICE_WAIT_BEFORE_ACTOR_STOP_MINUTES5 Minutes to wait before deleting Device actor after disconnect
actors.client.dispatcher-pool-sizeACTORS_SYSTEM_CLIENT_DISPATCHER_POOL_SIZE8 Number of threads processing the MQTT client actors messages
actors.client.wait-before-generated-actor-stop-secondsACTORS_SYSTEM_CLIENT_WAIT_BEFORE_GENERATED_ACTOR_STOP_SECONDS10 Time in seconds to wait until the actor is stopped for clients that did not specify client id
actors.client.wait-before-named-actor-stop-secondsACTORS_SYSTEM_CLIENT_WAIT_BEFORE_NAMED_ACTOR_STOP_SECONDS60 Time in seconds to wait until the actor is stopped for clients that specified client id
actors.rule.mail_thread_pool_sizeACTORS_RULE_MAIL_THREAD_POOL_SIZE4 Thread pool size for mail sender executor service
actors.rule.mail_password_reset_thread_pool_sizeACTORS_RULE_MAIL_PASSWORD_RESET_THREAD_POOL_SIZE4 Thread pool size for password reset emails executor service
+ + +## Platform integrations parameters + + + + + + + + + + + + + + + + + + + + + + + + + + + +
ParameterEnvironment VariableDefault ValueDescription
integrations.init.connection-check-api-request-timeout-secINTEGRATIONS_INIT_CONNECTION_CHECK_API_REQUEST_TIMEOUT_SEC20 Connection check timeout for API request in seconds
integrations.cleanup.periodINTEGRATIONS_CLEANUP_PERIOD_SEC10800 The parameter to specify the period of execution cleanup task for disconnected integrations. Value set in seconds. Default value corresponds to three hours
integrations.cleanup.ttlINTEGRATIONS_CLEANUP_TTL_SEC604800 Administration TTL (in seconds) for cleaning up disconnected integrations. + The cleanup removes integration topics that persist messages. + The current value is set to one week. A value of 0 or negative disables this TTL
+ + +## Database time series parameters + + + + + + + + + + + + + + + +
ParameterEnvironment VariableDefault ValueDescription
database.ts_max_intervalsDATABASE_TS_MAX_INTERVALS700 Max number of DB queries generated by single API call to fetch time series records
+ + +## SQL configuration parameters + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
ParameterEnvironment VariableDefault ValueDescription
sql.batch_sortSQL_BATCH_SORTtrue Specify whether to sort entities before batch update. Should be enabled for cluster mode to avoid deadlocks
sql.ts_key_value_partitioningSQL_TS_KV_PARTITIONINGDAYS Specify partitioning size for timestamp key-value storage. Example: DAYS, MONTHS, YEARS, INDEFINITE
sql.remove_null_charsSQL_REMOVE_NULL_CHARStrue Specify whether to remove null characters from strValue before insert
sql.ts.batch_sizeSQL_TS_BATCH_SIZE1000 Batch size for persisting time series inserts
sql.ts.batch_max_delaySQL_TS_BATCH_MAX_DELAY_MS100 Max timeout for time series entries queue polling. Value set in milliseconds
sql.ts.batch_threadsSQL_TS_BATCH_THREADS3 Number of threads that execute batch insert/update statements for time series data. Batch thread count have to be a prime number like 3 or 5 to gain perfect hash distribution
sql.ts_latest.batch_sizeSQL_TS_LATEST_BATCH_SIZE1000 Batch size for persisting latest time series inserts
sql.ts_latest.batch_max_delaySQL_TS_LATEST_BATCH_MAX_DELAY_MS50 Max timeout for latest time series entries queue polling. Value set in milliseconds
sql.ts_latest.batch_threadsSQL_TS_LATEST_BATCH_THREADS3 Number of threads that execute batch insert/update statements for latest time series data. Batch thread count have to be a prime number like 3 or 5 to gain perfect hash distribution
sql.unauthorized-client.insert.batch_sizeSQL_UNAUTHORIZED_CLIENT_INSERT_BATCH_SIZE1000 Batch size for persisting unauthorized client inserts
sql.unauthorized-client.insert.batch_max_delaySQL_UNAUTHORIZED_CLIENT_INSERT_BATCH_MAX_DELAY_MS50 Max timeout for unauthorized client insert entries queue polling. Value set in milliseconds
sql.unauthorized-client.insert.batch_threadsSQL_UNAUTHORIZED_CLIENT_INSERT_BATCH_THREADS3 Number of threads that execute batch insert/update statements for unauthorized client data. Batch thread count have to be a prime number like 3 or 5 to gain perfect hash distribution
sql.unauthorized-client.delete.batch_sizeSQL_UNAUTHORIZED_CLIENT_DELETE_BATCH_SIZE1000 Batch size for processing unauthorized client deletes
sql.unauthorized-client.delete.batch_max_delaySQL_UNAUTHORIZED_CLIENT_DELETE_BATCH_MAX_DELAY_MS50 Max timeout for unauthorized client delete entries queue polling. Value set in milliseconds
sql.unauthorized-client.delete.batch_threadsSQL_UNAUTHORIZED_CLIENT_DELETE_BATCH_THREADS3 Number of threads that execute batch delete statements for unauthorized client data. Batch thread count have to be a prime number like 3 or 5 to gain perfect hash distribution
sql.events.batch_sizeSQL_EVENTS_BATCH_SIZE10000 Batch size for persisting events updates
sql.events.batch_max_delaySQL_EVENTS_BATCH_MAX_DELAY_MS100 Max timeout for events entries queue polling. The value set in milliseconds
sql.events.batch_threadsSQL_EVENTS_BATCH_THREADS3 Batch size for processing events insert/update. Batch thread count has to be a prime number like 3 or 5 to gain perfect hash distribution
sql.events.partition_sizeSQL_EVENTS_REGULAR_PARTITION_SIZE_HOURS168 Number of hours to partition the events. The current value corresponds to one week
sql.events.max-symbolsSQL_EVENTS_MAX_SYMBOLS4096 Maximum number of symbols per event. The event content will be truncated if needed
sql.ttl.ts.enabledSQL_TTL_TS_ENABLEDtrue The parameter to specify whether to use TTL (Time To Live) for time series records
sql.ttl.ts.execution_interval_msSQL_TTL_TS_EXECUTION_INTERVAL_MS86400000 The parameter to specify the period of execution TTL task for time series records. Value set in milliseconds. Default value corresponds to one day
sql.ttl.ts.ts_key_value_ttlSQL_TTL_TS_KEY_VALUE_TTL604800 The parameter to specify system TTL(Time To Live) value for time series records. Value set in seconds. 0 - records are never expired. Default value corresponds to seven days
sql.ttl.unauthorized_client.enabledSQL_TTL_UNAUTHORIZED_CLIENT_ENABLEDtrue The parameter to specify whether to use TTL (Time To Live) for unauthorized clients
sql.ttl.unauthorized_client.execution_interval_msSQL_TTL_UNAUTHORIZED_CLIENT_EXECUTION_INTERVAL_MS86400000 The parameter to specify the period of execution TTL task for unauthorized clients. Value set in milliseconds. Default value corresponds to one day
sql.ttl.unauthorized_client.ttlSQL_TTL_UNAUTHORIZED_CLIENT_TTL259200 The parameter to specify system TTL(Time To Live) value for unauthorized clients. Value set in seconds. 0 - records are never expired. Default value corresponds to three days
sql.ttl.events.enabledSQL_TTL_EVENTS_ENABLEDtrue Enable/disable TTL (Time To Live) for event records
sql.ttl.events.execution_interval_msSQL_TTL_EVENTS_EXECUTION_INTERVAL_MS3600000 Number of milliseconds (max random initial delay and fixed period). Defaults to 1 hour
sql.ttl.events.events_ttlSQL_TTL_EVENTS_TTL_SEC1209600 Number of seconds for TTL. TTL is set to 14 days by default. The accuracy of the cleanup depends on the sql.events.partition_size parameter
+ + +## Redis lettuce configuration parameters + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
ParameterEnvironment VariableDefault ValueDescription
lettuce.auto-flushREDIS_LETTUCE_CMDS_AUTO_FLUSH_ENABLEDtrue Enable/disable auto-flush. If disabled, commands are buffered and flushed based on cmd count or time interval
lettuce.buffered-cmd-countREDIS_LETTUCE_BUFFERED_CMDS_COUNT5 Number of buffered commands before flush is triggered. Used when auto-flush is disabled
lettuce.flush-interval-msREDIS_LETTUCE_FLUSH_INTERVAL_MS5 Maximum time in milliseconds to buffer commands before flushing, regardless of cmd count
lettuce.config.command-timeoutREDIS_LETTUCE_COMMAND_TIMEOUT_SEC30 Maximum time (in seconds) to wait for a lettuce command to complete. + This affects health checks and any command execution (e.g. GET, SET, PING). + Reduce this to fail fast if Redis is unresponsive
lettuce.config.shutdown-quiet-periodREDIS_LETTUCE_SHUTDOWN_QUIET_PERIOD_SEC1 The shutdown quiet period for lettuce client set in seconds
lettuce.config.shutdown-timeoutREDIS_LETTUCE_SHUTDOWN_TIMEOUT_SEC10 The shutdown timeout for lettuce client set in seconds
lettuce.config.cluster.topology-refresh.enabledREDIS_LETTUCE_CLUSTER_TOPOLOGY_REFRESH_ENABLEDfalse Enables or disables periodic cluster topology updates. + Useful for Redis Cluster setup to handle topology changes, + such as node failover, restarts, or IP address changes
lettuce.config.cluster.topology-refresh.periodREDIS_LETTUCE_CLUSTER_TOPOLOGY_REFRESH_PERIOD_SEC60 Specifies the interval (in seconds) for periodic cluster topology updates
+ + +## Redis jedis configuration parameters + + + + + + + + + + + + + + + + + + + + + +
ParameterEnvironment VariableDefault ValueDescription
jedis.cluster.topology-refresh.enabledREDIS_JEDIS_CLUSTER_TOPOLOGY_REFRESH_ENABLEDfalse Enables or disables periodic cluster topology updates. + Useful for Redis cluster setup to handle topology changes, + such as node failover, restarts, or IP address changes
jedis.cluster.topology-refresh.periodREDIS_JEDIS_CLUSTER_TOPOLOGY_REFRESH_PERIOD_SEC60 Specifies the interval (in seconds) for periodic cluster topology updates
+ + +## SQL DAO configuration parameters + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
ParameterEnvironment VariableDefault ValueDescription
spring.data.jpa.repositories.enabledSPRING_DATA_JPA_REPOSITORIES_ENABLEDtrue Enable/Disable the Spring Data JPA repositories support
spring.jpa.open-in-viewSPRING_JPA_OPEN_IN_VIEWfalse Enable/disable OSIV
spring.jpa.hibernate.ddl-autoSPRING_JPA_HIBERNATE_DDL_AUTOnone You can set a Hibernate feature that controls the DDL behavior in a more fine-grained way. + The standard Hibernate property values are none, validate, update, create-drop. + Spring Boot chooses a default value for you based on whether it thinks your database is embedded (default create-drop) or not (default none)
spring.datasource.driverClassNameSPRING_DRIVER_CLASS_NAMEorg.postgresql.Driver Database driver for Spring JPA
spring.datasource.urlSPRING_DATASOURCE_URLjdbc:postgresql://localhost:5432/thingsboard_mqtt_broker Database connection URL
spring.datasource.usernameSPRING_DATASOURCE_USERNAMEpostgres Database username
spring.datasource.passwordSPRING_DATASOURCE_PASSWORDpostgres Database user password
spring.datasource.hikari.maximumPoolSizeSPRING_DATASOURCE_MAXIMUM_POOL_SIZE16 This property allows the number of connections in the pool to increase as demand increases. + At the same time, the property ensures that the pool doesn't grow to the point of exhausting a system's resources, which ultimately affects an application's performance and availability
spring.datasource.hikari.maxLifetimeSPRING_DATASOURCE_MAX_LIFETIME600000 This property controls the max lifetime in milliseconds of a connection. Only when it is closed will it then be removed. Default is 10 minutes
spring.datasource.hikari.connectionTimeoutSPRING_DATASOURCE_CONNECTION_TIMEOUT_MS30000 Maximum time (in milliseconds) HikariCP will wait to acquire a connection from the pool. + If exceeded, an exception is thrown. Default is 30 seconds
+ + +## General Spring parameters + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
ParameterEnvironment VariableDefault ValueDescription
spring.lifecycle.timeout-per-shutdown-phaseSPRING_LIFECYCLE_TIMEOUT_PER_SHUTDOWN_PHASE1m The server will wait for active requests to finish their work up to a specified amount of time before graceful shutdown
spring.jpa.properties.hibernate.jdbc.lob.non_contextual_creationSPRING_JPA_HIBERNATE_JDBC_LOB_NON_CONTEXTUAL_CREATIONtrue Setting this property to true disables contextual LOB creation and forces the use of Hibernate's own LOB implementation. Fixes Postgres JPA Error
spring.jpa.properties.hibernate.order_by.default_null_orderingSPRING_JPA_HIBERNATE_ORDER_BY_DEFAULT_NULL_ORDERINGlast Default ordering for null values
spring.data.redis.repositories.enabledSPRING_DATA_REDIS_REPOSITORIES_ENABLEDfalse Disables redis repositories scanning
spring.freemarker.checkTemplateLocationSPRING_FREEMARKER_CHECK_TEMPLATE_LOCATIONfalse Spring freemarker configuration to check that the templates location exists
spring.mvc.async.request-timeoutSPRING_MVC_ASYNC_REQUEST_TIMEOUT30000 The default timeout for asynchronous requests in milliseconds
spring.mvc.pathmatch.matching-strategySPRING_MVC_PATH_MATCH_MATCHING_STRATEGYANT_PATH_MATCHER For endpoints matching in Swagger
spring.servlet.multipart.max-file-sizeSPRING_SERVLET_MULTIPART_MAX_FILE_SIZE50MB Total file size cannot exceed 50MB when configuring file uploads
spring.servlet.multipart.max-request-sizeSPRING_SERVLET_MULTIPART_MAX_REQUEST_SIZE50MB Total request size for a multipart/form-data cannot exceed 50MB
+ + +## Security parameters + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
ParameterEnvironment VariableDefault ValueDescription
security.mqtt.auth_strategySECURITY_MQTT_AUTH_STRATEGYBOTH DEPRECATED: BOTH or SINGLE - the former means the first attempt of client authentication will be by 'basic' provider + and then by 'ssl' provider if 'basic' is not successful; + the latter means only one attempt is done according to the listener communication chosen (see listener.tcp/listener.ssl)
security.mqtt.basic.enabledSECURITY_MQTT_BASIC_ENABLEDfalse DEPRECATED: If enabled the server will try to authenticate client with clientId and/or username and/or password
security.mqtt.ssl.enabledSECURITY_MQTT_SSL_ENABLEDfalse DEPRECATED: If enabled the server will try to authenticate client with client certificate chain
security.mqtt.ssl.skip_validity_check_for_client_certSECURITY_MQTT_SSL_SKIP_VALIDITY_CHECK_FOR_CLIENT_CERTfalse DEPRECATED: Skip certificate validity check for client certificates
security.jwt.tokenExpirationTimeJWT_TOKEN_EXPIRATION_TIME9000 User JWT Token expiration time in seconds (2.5 hours)
security.jwt.refreshTokenExpTimeJWT_REFRESH_TOKEN_EXPIRATION_TIME604800 User JWT Refresh Token expiration time in seconds (1 week)
security.jwt.tokenIssuerJWT_TOKEN_ISSUERthingsboard.io User JWT Token issuer
security.jwt.tokenSigningKeyJWT_TOKEN_SIGNING_KEYQk1xUnloZ0VQTlF1VlNJQXZ4cWhiNWt1cVd1ZzQ5cWpENUhMSHlaYmZIM0JrZ2pPTVlhQ3N1Z0ZMUnd0SDBieg== User JWT Token sign key
security.basic.enabledSECURITY_BASIC_ENABLEDfalse Enable/Disable basic security options
security.user_token_access_enabledSECURITY_USER_TOKEN_ACCESS_ENABLEDtrue Enable/disable access to other Administrators JWT token by System Administrator
security.user_login_case_sensitiveSECURITY_USER_LOGIN_CASE_SENSITIVEtrue Enable/disable case-sensitive username login
security.oauth2.loginProcessingUrlSECURITY_OAUTH2_LOGIN_PROCESSING_URL/login/oauth2/code/ Redirect URL where access code from external user management system will be processed
security.oauth2.githubMapper.emailUrlSECURITY_OAUTH2_GITHUB_MAPPER_EMAIL_URL_KEYhttps://api.github.com/user/emails The email addresses that will be mapped from the URL
+ + +## MQTT parameters + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
ParameterEnvironment VariableDefault ValueDescription
mqtt.connect.threadsMQTT_CONNECT_THREADS4 Number of threads for clients connection thread pool
mqtt.msg-subscriptions-parallel-processingMQTT_MSG_SUBSCRIPTIONS_PARALLEL_PROCESSINGfalse Enable/disable processing of found subscriptions in parallel for published messages. + Helpful when the "PUBLISH" message should be delivered to lots of subscribers. + It is recommended to count the impact of this parameter before setting it on production
mqtt.pre-connect-queue.max-sizeMQTT_PRE_CONNECT_QUEUE_MAX_SIZE10000 Max number of messages that can be stored in queue before client gets connected and start processing them
mqtt.max-in-flight-msgsMQTT_MAX_IN_FLIGHT_MSGS1000 Max number of PUBLISH messages not yet responded
mqtt.flow-control.enabledMQTT_FLOW_CONTROL_ENABLEDtrue Enable/disable flow control MQTT 5 feature for server. If disabled, the server will not control the number of messages sent to subscribers by "Receive Maximum". + This feature works for MQTT 3.x clients as well when enabled. "Receive Maximum" for MQTT 3.x clients can be set using `MQTT_FLOW_CONTROL_MQTT_3X_RECEIVE_MAX` parameter
mqtt.flow-control.timeoutMQTT_FLOW_CONTROL_TIMEOUT1000 Timeout to wait in case there is nothing to process regarding the flow control feature. The separate thread is responsible for sending delayed messages to subscribers. + If no clients are affected by flow control restrictions, there is no need to continuously try to find and send such messages
mqtt.flow-control.ttlMQTT_FLOW_CONTROL_TTL600 Time in seconds to store delayed messages for subscribers. Delayed messages are those that can not be sent immediately due to flow control restrictions. + Default is 10 minutes
mqtt.flow-control.delayed-queue-max-sizeMQTT_FLOW_CONTROL_DELAYED_QUEUE_MAX_SIZE1000 Max allowed queue length for delayed messages - publishing messages from broker to client when in-flight window is full
mqtt.flow-control.mqtt3x-receive-maxMQTT_FLOW_CONTROL_MQTT_3X_RECEIVE_MAX65535 Receive maximum value for MQTT 3.x clients
mqtt.retransmission.enabledMQTT_RETRANSMISSION_ENABLEDfalse Enable/disable MQTT msg retransmission
mqtt.retransmission.scheduler-pool-sizeMQTT_RETRANSMISSION_SCHEDULER_POOL_SIZE0 Retransmission scheduler pool size (0 means the number of processors available to the JVM multiplied by 2 will be used)
mqtt.retransmission.initial-delayMQTT_RETRANSMISSION_INITIAL_DELAY10 Initial delay for the msg retransmission in seconds
mqtt.retransmission.periodMQTT_RETRANSMISSION_PERIOD5 Increment period for the subsequent retransmissions of the msg in seconds (retransmission interval is increased by period for each run)
mqtt.keep-alive.monitoring-delay-msMQTT_KEEP_ALIVE_MONITORING_DELAY_MS1000 Time in milliseconds between subsequent checks for the non-active clients
mqtt.keep-alive.max-keep-aliveMQTT_KEEP_ALIVE_MAX_KEEP_ALIVE_SEC600 Max value in seconds allowed by the server for keep-alive that can be used by clients. Defaults to 10 minutes, used for MQTT v5 clients
mqtt.topic.max-segments-countMQTT_TOPIC_MAX_SEGMENTS_COUNT0 Maximum number of segments in topics. If it's too large, processing of topics with too much segments can lead to errors. 0 means limitation is disabled
mqtt.topic.alias-maxMQTT_TOPIC_ALIAS_MAX10 Max count of topic aliases per connection. 0 indicates that the Broker does not accept any Topic Aliases for all connections meaning the 'Topic Alias' feature is disabled
mqtt.topic.min-length-for-alias-replacementMQTT_TOPIC_MIN_LENGTH_FOR_ALIAS_REPLACEMENT50 Minimal required topic name length that Broker publishes to client that can be replaced with topic alias + (e.g. if topic has more than 50 chars - it can be replaced with alias)
mqtt.shared-subscriptions.processing-typeMQTT_SHARED_SUBSCRIPTIONS_PROCESSING_TYPEROUND_ROBIN Processing strategy type - how messages are split between clients in shared subscription. Supported types: ROUND_ROBIN
mqtt.subscription-trie.wait-for-clear-lock-msMQTT_SUB_TRIE_WAIT_FOR_CLEAR_LOCK_MS100 Maximum pause in milliseconds for clearing subscription storage from empty nodes. + If wait is unsuccessful the subscribing clients will be resumed, but the clear will fail
mqtt.subscription-trie.clear-nodes-cronMQTT_SUB_TRIE_CLEAR_NODES_CRON0 0 0 * * * Cron job to schedule clearing of empty subscription nodes. Defaults to 'every day at midnight'
mqtt.subscription-trie.clear-nodes-zoneMQTT_SUB_TRIE_CLEAR_NODES_ZONEUTC Timezone for the subscription clearing cron-job
mqtt.retain-msg-trie.wait-for-clear-lock-msMQTT_RETAIN_MSG_TRIE_WAIT_FOR_CLEAR_LOCK_MS100 Maximum pause in milliseconds for clearing retain msg storage from empty nodes. + If wait is unsuccessful retain messages processing will be resumed, but the clear will fail
mqtt.retain-msg-trie.clear-nodes-cronMQTT_RETAIN_MSG_TRIE_CLEAR_NODES_CRON0 0 0 * * * Cron job to schedule clearing of empty retain msg nodes. Defaults to 'every day at midnight'
mqtt.retain-msg-trie.clear-nodes-zoneMQTT_RETAIN_MSG_TRIE_CLEAR_NODES_ZONEUTC Timezone for retain msg clearing cron-job
mqtt.retain-msg.expiry-processing-period-msMQTT_RETAIN_MSG_EXPIRY_PROCESSING_PERIOD_MS60000 Period in milliseconds to clear retained messages by expiry feature of MQTT
mqtt.client-session-expiry.cronMQTT_CLIENT_SESSION_EXPIRY_CRON0 0 * ? * * Cron job to schedule clearing of expired and not active client sessions. Defaults to 'every hour', e.g. at 20:00:00 UTC
mqtt.client-session-expiry.zoneMQTT_CLIENT_SESSION_EXPIRY_ZONEUTC Timezone for the client sessions clearing cron-job
mqtt.client-session-expiry.max-expiry-intervalMQTT_CLIENT_SESSION_EXPIRY_MAX_EXPIRY_INTERVAL604800 Max expiry interval allowed of inactive sessions in seconds. The current value corresponds to one week
mqtt.client-session-expiry.ttlMQTT_CLIENT_SESSION_EXPIRY_TTL604800 Administration TTL in seconds for clearing sessions that do not expire by session expiry interval + (e.g. MQTTv3 cleanSession=false or MQTTv5 cleanStart=false && sessionExpiryInterval == 0). + The current value corresponds to one week. 0 or negative value means this TTL is disabled
mqtt.version-3-1.max-client-id-lengthMQTT_3_1_MAX_CLIENT_ID_LENGTH1024 Max ClientId length for 3.1 version of protocol
mqtt.write-and-flushMQTT_MSG_WRITE_AND_FLUSHtrue If enabled, each message is published to non-persistent subscribers with flush. When disabled, the messages are buffered in the channel and are flushed once in a while
mqtt.buffered-msg-countMQTT_BUFFERED_MSG_COUNT5 Number of messages buffered in the channel before the flush is made. Used when `MQTT_MSG_WRITE_AND_FLUSH` = false
mqtt.buffered-delivery.session-cache-max-sizeMQTT_BUFFERED_CACHE_MAX_SIZE10000 When either `MQTT_MSG_WRITE_AND_FLUSH` or `MQTT_PERSISTENT_MSG_WRITE_AND_FLUSH` is set to false, + the broker buffers outgoing messages in the outbound channel to improve throughput. + The respective buffer sizes are controlled by `MQTT_BUFFERED_MSG_COUNT` (for non-persistent clients) + and `MQTT_PERSISTENT_BUFFERED_MSG_COUNT` (for persistent clients). + Defines the maximum number of session entries that can be stored in the flush state cache. + When the cache exceeds this size, the least recently used sessions are evicted + and their pending message buffers are flushed automatically
mqtt.buffered-delivery.session-cache-expiration-msMQTT_BUFFERED_CACHE_EXPIRY_MS300000 Time in milliseconds after which an inactive session entry in the flush cache expires. + A session is considered inactive if it receives no new messages during this period. + Upon expiration, the session is evicted from the cache and its buffer is flushed. + Default is 5 minutes
mqtt.buffered-delivery.scheduler-execution-interval-msMQTT_BUFFERED_SCHEDULER_INTERVAL_MS100 Interval in milliseconds at which the scheduler checks all sessions in the cache + for potential flushing. A smaller value results in more frequent flush checks
mqtt.buffered-delivery.idle-session-flush-timeout-msMQTT_BUFFERED_IDLE_FLUSH_MS200 Maximum duration in milliseconds that a session can remain idle (i.e., without being flushed) + before its message buffer is automatically flushed to the client. + In essence, a flush occurs either when the buffer limit is reached or when this timeout elapses
mqtt.persistent-session.device.persisted-messages.limitMQTT_PERSISTENT_SESSION_DEVICE_PERSISTED_MESSAGES_LIMIT10000 Maximum number of PUBLISH messages stored for each persisted DEVICE client
mqtt.persistent-session.device.persisted-messages.ttlMQTT_PERSISTENT_SESSION_DEVICE_PERSISTED_MESSAGES_TTL604800 TTL of persisted DEVICE messages in seconds. The current value corresponds to one week
mqtt.persistent-session.device.persisted-messages.write-and-flushMQTT_PERSISTENT_MSG_WRITE_AND_FLUSHtrue If enabled, each message is published to persistent DEVICE client subscribers with flush. When disabled, the messages are buffered in the channel and are flushed once in a while
mqtt.persistent-session.device.persisted-messages.buffered-msg-countMQTT_PERSISTENT_BUFFERED_MSG_COUNT5 Number of messages buffered in the channel before the flush is made. Used when `MQTT_PERSISTENT_MSG_WRITE_AND_FLUSH` = false
mqtt.persistent-session.app.persisted-messages.write-and-flushMQTT_APP_MSG_WRITE_AND_FLUSHfalse If enabled, each message is published to persistent APPLICATION client subscribers with flush. When disabled, the messages are buffered in the channel and are flushed once in a while
mqtt.persistent-session.app.persisted-messages.buffered-msg-countMQTT_APP_BUFFERED_MSG_COUNT10 Number of messages buffered in the channel before the flush is made. Used when `MQTT_APP_MSG_WRITE_AND_FLUSH` = false
mqtt.rate-limits.threads-countMQTT_RATE_LIMITS_THREADS_COUNT1 The number of parallel threads dedicated to processing total rate limit checks for incoming messages
mqtt.rate-limits.batch-sizeMQTT_RATE_LIMITS_BATCH_SIZE50 The number of messages to process in each batch when checking total rate limits for incoming messages
mqtt.rate-limits.period-msMQTT_RATE_LIMITS_PERIOD_MS50 The period, in milliseconds, to wait before processing a batch of messages for total rate limits for incoming messages
mqtt.rate-limits.total.enabledMQTT_TOTAL_RATE_LIMITS_ENABLEDfalse Enable/disable total incoming and outgoing messages rate limits for the broker (per whole cluster)
mqtt.rate-limits.total.configMQTT_TOTAL_RATE_LIMITS_CONFIG1000:1,50000:60 Limit the maximum count of total incoming and outgoing messages for specified time intervals in seconds. Comma separated list of limit:seconds pairs. + Example: 1000 messages per second or 50000 messages per minute
mqtt.rate-limits.incoming-publish.enabledMQTT_INCOMING_RATE_LIMITS_ENABLEDfalse Enable/disable publish rate limits per client for incoming messages to the broker from publishers
mqtt.rate-limits.incoming-publish.client-configMQTT_INCOMING_RATE_LIMITS_CLIENT_CONFIG10:1,300:60 Limit the maximum count of publish messages per publisher for specified time intervals in seconds. Comma separated list of limit:seconds pairs. + Example: 10 messages per second or 300 messages per minute
mqtt.rate-limits.outgoing-publish.enabledMQTT_OUTGOING_RATE_LIMITS_ENABLEDfalse Enable/disable publish rate limits per client for outgoing messages from the broker to subscribers. Used only for non-persistent subscribers with QoS = 0 ("AT_MOST_ONCE")
mqtt.rate-limits.outgoing-publish.client-configMQTT_OUTGOING_RATE_LIMITS_CLIENT_CONFIG10:1,300:60 Limit the maximum count of publish messages per subscriber for specified time intervals in seconds. Comma separated list of limit:seconds pairs. + Example: 10 messages per second or 300 messages per minute
mqtt.rate-limits.device-persisted-messages.enabledMQTT_DEVICE_PERSISTED_MSGS_RATE_LIMITS_ENABLEDfalse Enable/disable Device clients persisted messages rate limits for the broker (per whole cluster)
mqtt.rate-limits.device-persisted-messages.configMQTT_DEVICE_PERSISTED_MSGS_RATE_LIMITS_CONFIG100:1,1000:60 Limit the maximum count of Device clients persisted messages for specified time intervals in seconds. Comma separated list of limit:seconds pairs. + Example: 100 messages per second or 1000 messages per minute
mqtt.sessions-limitMQTT_SESSIONS_LIMIT0 Limit the total number of sessions (connected + disconnected) stored on the broker, not individually for each server (node) if it is a cluster, but as a collective limit. + For example, when set to 1000 either the single broker node or cluster of 2 or X nodes can store 1000 sessions in total. It is a soft limit meaning a bit more than 1000 sessions can be stored. + A setting of 0 means the limitation is disabled
mqtt.sessions-limit-correctionMQTT_SESSIONS_LIMIT_CORRECTIONfalse Enable/disable sessions limit value correction in the cache
mqtt.sessions-limit-correction-period-msMQTT_SESSIONS_LIMIT_CORRECTION_PERIOD_MS10800000 Period in milliseconds to execute the job to correct the value of sessions limit in the cache. Defaults to 3 hours
mqtt.application-clients-limitMQTT_APPLICATION_CLIENTS_LIMIT0 Limit the total number of Application persistent clients and external system integrations. A setting of 0 means the limitation is disabled
mqtt.handler.all_msg_callback_threadsMQTT_HANDLER_ALL_MSG_CALLBACK_THREADS2 Number of threads in thread pool for processing all publish messages callbacks after sending them to Kafka
mqtt.handler.device_msg_callback_threadsMQTT_HANDLER_DEVICE_MSG_CALLBACK_THREADS2 Number of threads in thread pool for processing device persisted publish messages callbacks after sending them to Kafka
mqtt.handler.app_msg_callback_threadsMQTT_HANDLER_APP_MSG_CALLBACK_THREADS2 Number of threads in thread pool for processing application persisted publish messages callbacks after sending them to Kafka
mqtt.handler.downlink_msg_callback_threadsMQTT_HANDLER_DOWNLINK_MSG_CALLBACK_THREADS2 Number of threads in thread pool for processing downlink messages callbacks after sending them to Kafka
mqtt.response-infoMQTT_RESPONSE_INFO Response info value for MQTT 5 request-response feature to be returned to clients that request it. + If not set the broker will not reply with response info to mqtt 5 clients that connect with "request response info" = 1. + Set it to topic to be used for request-response feature, e.g. "example/"
mqtt.blocked-client.cleanup.periodBLOCKED_CLIENT_CLEANUP_PERIOD_MINUTES5 The parameter to specify the period of execution cleanup task for expired blocked clients. Value set in minutes. Default value corresponds to five minutes
mqtt.blocked-client.cleanup.ttlBLOCKED_CLIENT_CLEANUP_TTL_MINUTES10080 Time to Live for expired blocked clients. After this time, the expired blocked client is removed completely. Value set in minutes. Default value corresponds to one week
+ + +## Cache parameters + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
ParameterEnvironment VariableDefault ValueDescription
cache.stats.enabledCACHE_STATS_ENABLEDtrue Enable/disable cache stats logging
cache.stats.intervalSecCACHE_STATS_INTERVAL_SEC60 Cache stats logging interval in seconds
cache.cache-prefixCACHE_PREFIX The common prefix for all cache keys. Defaults to empty string meaning no prefix is added
cache.specs.mqttClientCredentials.timeToLiveInMinutesCACHE_SPECS_MQTT_CLIENT_CREDENTIALS_TTL1440 Cache TTL in minutes. Defaults to 1 day
cache.specs.basicCredentialsPassword.timeToLiveInMinutesCACHE_SPECS_BASIC_CREDENTIALS_PASSWORD_TTL1 Cache TTL in minutes. It is recommended to set this TTL as a small value to not store them for a long time (e.g., 1-5 minutes)
cache.specs.sslRegexBasedCredentials.timeToLiveInMinutesCACHE_SPECS_SSL_REGEX_BASED_CREDENTIALS_TTL1440 Cache TTL in minutes. Defaults to 1 day
cache.specs.clientSessionCredentials.timeToLiveInMinutesCACHE_SPECS_CLIENT_SESSION_CREDENTIALS_TTL0 Cache TTL in minutes. Defaults to 0 meaning the cache is eternal
cache.specs.clientMqttVersion.timeToLiveInMinutesCACHE_SPECS_CLIENT_MQTT_VERSION_TTL0 Cache TTL in minutes. Defaults to 0 meaning the cache is eternal
cache.image.etag.timeToLiveInMinutesCACHE_IMAGE_ETAG_TTL10080 Image ETags cache TTL in minutes. Defaults to 7 days
cache.image.etag.maxSizeCACHE_IMAGE_ETAG_MAX_SIZE10000 Max size of entries in the cache. 0 means the cache is disabled
cache.image.systemImagesBrowserTtlInMinutesCACHE_IMAGE_SYSTEM_BROWSER_TTL0 Browser cache TTL for system images in minutes. 0 means the cache is disabled
+ + +## Redis configuration parameters + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
ParameterEnvironment VariableDefault ValueDescription
redis.connection.typeREDIS_CONNECTION_TYPEstandalone Connection type: standalone or cluster or sentinel
redis.standalone.hostREDIS_HOSTlocalhost Redis connection host
redis.standalone.portREDIS_PORT6379 Redis connection port
redis.standalone.useDefaultClientConfigREDIS_USE_DEFAULT_CLIENT_CONFIGtrue Use the default Redis configuration file
redis.standalone.clientNameREDIS_CLIENT_NAMEstandalone This value may be used only if you did not use the default ClientConfig, to specify client name
redis.standalone.connectTimeoutREDIS_CLIENT_CONNECT_TIMEOUT30000 This value may be used only if you did not use the default ClientConfig, to specify connection timeout
redis.standalone.readTimeoutREDIS_CLIENT_READ_TIMEOUT60000 This value may be used only if you did not use the default ClientConfig, to specify read timeout
redis.standalone.usePoolConfigREDIS_CLIENT_USE_POOL_CONFIGfalse This value may be used only if you did not use the default ClientConfig, to use pool config section
redis.cluster.nodesREDIS_NODES Comma-separated list of "host:port" pairs to bootstrap from
redis.cluster.maxRedirectsREDIS_MAX_REDIRECTS12 Maximum number of redirects to follow when executing commands across the cluster
redis.cluster.useDefaultPoolConfigREDIS_CLUSTER_USE_DEFAULT_POOL_CONFIGtrue If set false will be used pool config build from values of the pool config section
redis.sentinel.masterREDIS_MASTER Name of master node
redis.sentinel.sentinelsREDIS_SENTINELS Comma-separated list of "host:port" pairs of sentinels
redis.sentinel.passwordREDIS_SENTINEL_PASSWORD Password to authenticate with sentinel
redis.sentinel.useDefaultPoolConfigREDIS_SENTINEL_USE_DEFAULT_POOL_CONFIGtrue If set false will be used pool config build from values of the pool config section
redis.dbREDIS_DB0 DB index
redis.passwordREDIS_PASSWORD DB password
redis.pool_config.maxTotalREDIS_POOL_CONFIG_MAX_TOTAL128 Maximum number of connections that can be allocated by the connection pool
redis.pool_config.maxIdleREDIS_POOL_CONFIG_MAX_IDLE128 Maximum number of idle connections that can be maintained in the pool without being closed
redis.pool_config.minIdleREDIS_POOL_CONFIG_MIN_IDLE16 Minimum number of idle connections that can be maintained in the pool without being closed
redis.pool_config.testOnBorrowREDIS_POOL_CONFIG_TEST_ON_BORROWtrue Enable/Disable PING command sent when a connection is borrowed
redis.pool_config.testOnReturnREDIS_POOL_CONFIG_TEST_ON_RETURNtrue The property is used to specify whether to test the connection before returning it to the connection pool
redis.pool_config.testWhileIdleREDIS_POOL_CONFIG_TEST_WHILE_IDLEtrue Indicates whether to use the ping command to monitor the connection validity during idle resource monitoring. Invalid connections will be destroyed
redis.pool_config.minEvictableMsREDIS_POOL_CONFIG_MIN_EVICTABLE_MS60000 Minimum time the connection should be idle before it can be evicted from the connection pool. The value is set in milliseconds
redis.pool_config.evictionRunsMsREDIS_POOL_CONFIG_EVICTION_RUNS_MS30000 Specifies the time interval in milliseconds between two consecutive eviction runs
redis.pool_config.maxWaitMillsREDIS_POOL_CONFIG_MAX_WAIT_MS60000 Maximum time in milliseconds where a client is willing to wait for a connection from the pool when all connections are exhausted
redis.pool_config.numberTestsPerEvictionRunREDIS_POOL_CONFIG_NUMBER_TESTS_PER_EVICTION_RUN3 Specifies the number of connections to test for eviction during each eviction run
redis.pool_config.blockWhenExhaustedREDIS_POOL_CONFIG_BLOCK_WHEN_EXHAUSTEDtrue Determines the behavior when a thread requests a connection from the pool, but there are no available connections, and the pool cannot create more due to the maxTotal configuration
+ + +## Statistics parameters + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
ParameterEnvironment VariableDefault ValueDescription
stats.enabledSTATS_ENABLEDtrue Enable/disable stats printing to the logs
stats.print-interval-msSTATS_PRINT_INTERVAL_MS60000 Period in milliseconds to print stats. Default value corresponds to 1 minute
stats.timer.percentilesSTATS_TIMER_PERCENTILES0.5 Metrics percentiles returned by actuator for timer metrics. List of comma-separated (,) double values
stats.application-processor.enabledAPPLICATION_PROCESSOR_STATS_ENABLEDtrue Enable/disable specific Application clients stats
stats.system-info.persist-frequencySTATS_SYSTEM_INFO_PERSIST_FREQUENCY_SEC60 Persist frequency of system info (CPU, memory usage, etc.) in seconds
+ + +## Historical data statistics parameters + + + + + + + + + + + + + + + + + + + + + + + + + + + +
ParameterEnvironment VariableDefault ValueDescription
historical-data-report.enabledHISTORICAL_DATA_REPORT_ENABLEDtrue Enable/disable historical data stats reporting and persistence to the time series
historical-data-report.intervalHISTORICAL_DATA_REPORT_INTERVAL1 Period in minutes (1-60) to collect stats for each broker. Used in cron expression
historical-data-report.zoneHISTORICAL_DATA_REPORT_ZONEUTC Timezone for the historical data stats processing
+ + +## Metrics management parameters + + + + + + + + + + + + + + + + + + + + + + + + + + + +
ParameterEnvironment VariableDefault ValueDescription
management.health.diskspace.enabledHEALTH_DISKSPACE_ENABLEDfalse Enable/disable disk space health check
management.endpoint.health.show-detailsHEALTH_SHOW_DETAILSnever Controls whether health endpoint shows full component details (e.g., Redis, DB, TBMQ). + Options: + - 'never': always hide details (default if security is enabled). + - 'when-authorized': show details only to authenticated users. + - 'always': always include full health details in the response
management.endpoints.web.exposure.includeMETRICS_ENDPOINTS_EXPOSEhealth,info,prometheus Specify which Actuator endpoints should be exposed via HTTP. + Use 'health,info' to expose only basic health and information endpoints. + For exposing Prometheus metrics, update this to include 'prometheus' in the list (e.g., 'health,info,prometheus')
+ + +## Spring CORS configuration + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
ParameterEnvironment VariableDefault ValueDescription
spring.mvc.cors.mappings."[/api/**]".allowed-origin-patternsMVC_CORS_API_ALLOWED_ORIGIN_PATTERNS* Comma-separated list of origins to allow. '*' allows all origins. When not set, CORS support is disabled
spring.mvc.cors.mappings."[/api/**]".allowed-methodsMVC_CORS_API_ALLOWED_METHODS* Comma-separated list of methods to allow. '*' allows all methods
spring.mvc.cors.mappings."[/api/**]".allowed-headersMVC_CORS_API_ALLOWED_HEADERS* Comma-separated list of headers to allow in a request. '*' allows all headers
spring.mvc.cors.mappings."[/api/**]".max-ageMVC_CORS_API_MAX_AGE1800 How long, in seconds, the response from a pre-flight request can be cached by clients
spring.mvc.cors.mappings."[/api/**]".allow-credentialsMVC_CORS_API_ALLOW_CREDENTIALStrue Set whether credentials are supported. When not set, credentials are not supported
+ + +## Spring doc common parameters + + + + + + + + + + + + + + + + + + + + + +
ParameterEnvironment VariableDefault ValueDescription
springdoc.api-docs.enabledSWAGGER_ENABLEDtrue If false swagger API docs will be unavailable
springdoc.default-produces-media-typeSWAGGER_DEFAULT_PRODUCES_MEDIA_TYPEapplication/json Swagger default produces media-type
+ + +## Swagger common parameters + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
ParameterEnvironment VariableDefault ValueDescription
swagger.api_pathSWAGGER_API_PATH/api/** General swagger match pattern of swagger UI links
swagger.security_path_regexSWAGGER_SECURITY_PATH_REGEX/api/.* General swagger match pattern path of swagger UI links
swagger.non_security_path_regexSWAGGER_NON_SECURITY_PATH_REGEX/api/noauth.* Non-security API path match pattern of swagger UI links
swagger.titleSWAGGER_TITLETBMQ REST API The title on the API doc UI page
swagger.descriptionSWAGGER_DESCRIPTIONTBMQ Professional Edition REST API documentation The description on the API doc UI page
swagger.contact.nameSWAGGER_CONTACT_NAMETBMQ team The contact name on the API doc UI page
swagger.contact.urlSWAGGER_CONTACT_URLhttps://thingsboard.io/products/mqtt-broker/ The contact URL on the API doc UI page
swagger.contact.emailSWAGGER_CONTACT_EMAILinfo@thingsboard.io The contact email on the API doc UI page
swagger.license.titleSWAGGER_LICENSE_TITLEApache License Version 2.0 The license title on the API doc UI page
swagger.license.urlSWAGGER_LICENSE_URLhttps://github.com/thingsboard/tbmq/blob/main/LICENSE Link to the license body on the API doc UI page
swagger.versionSWAGGER_VERSION The version of the API doc to display. Default to the package version
swagger.group_nameSWAGGER_GROUP_NAMETBMQ The group name (definition) on the API doc UI page
+ + +## Application info parameters + + + + + + + + + + + + + + + +
ParameterEnvironment VariableDefault ValueDescription
app.version"@project.version@" Application version
+ + +## Analysis parameters + + + + + + + + + + + + + + + +
ParameterEnvironment VariableDefault ValueDescription
analysis.log.analyzed-client-idsANALYSIS_LOG_CLIENT_IDS List of Client Ids separated with comas. Additional events for those clients will be logged
diff --git a/_includes/docs/pe/mqtt-broker/install/ie-config.md b/_includes/docs/pe/mqtt-broker/install/ie-config.md new file mode 100644 index 0000000000..1dd2240947 --- /dev/null +++ b/_includes/docs/pe/mqtt-broker/install/ie-config.md @@ -0,0 +1,589 @@ + + +## HTTP server parameters + + + + + + + + + + + + + + + + + + + + + +
ParameterEnvironment VariableDefault ValueDescription
server.addressHTTP_BIND_ADDRESS0.0.0.0 HTTP Server bind address
server.portHTTP_BIND_PORT8082 HTTP Server bind port
+ + +## Kafka parameters + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
ParameterEnvironment VariableDefault ValueDescription
queue.integration-downlink.poll-intervalTB_IE_DOWNLINK_POLL_INTERVAL1000 Interval in milliseconds to poll messages from 'tbmq.ie.downlink' topics
queue.integration-msg.poll-intervalTB_IE_MSG_POLL_INTERVAL1000 Interval in milliseconds to poll messages from 'tbmq.msg.ie' topics
queue.integration-msg.pack-processing-timeoutTB_IE_MSG_PACK_PROCESSING_TIMEOUT30000 Timeout in milliseconds for processing the pack of messages
queue.integration-msg.ack-strategy.typeTB_IE_MSG_ACK_STRATEGY_TYPESKIP_ALL Processing strategy for 'tbmq.msg.ie' topics. Can be: SKIP_ALL, RETRY_ALL
queue.integration-msg.ack-strategy.retriesTB_IE_MSG_ACK_STRATEGY_RETRIES5 Number of retries, 0 is unlimited. Use for RETRY_ALL processing strategy
queue.integration-msg.ack-strategy.pause-between-retriesTB_IE_MSG_ACK_STRATEGY_PAUSE_BETWEEN_RETRIES1 Time in seconds to wait in consumer thread before retries
queue.kafka.bootstrap.serversTB_KAFKA_SERVERSlocalhost:9092 List of kafka bootstrap servers used to establish connection
queue.kafka.enable-topic-deletionTB_KAFKA_ENABLE_TOPIC_DELETIONtrue Controls whether TBMQ is allowed to delete Kafka topics that were created for + Integrations. + When set to 'true', TBMQ may automatically remove topics during cleanup + (for example, when the Integration is deleted). + When set to 'false', TBMQ will skip topic deletions and simply stop using them. + This helps prevent accidental data loss in production environments
queue.kafka.default.consumer.partition-assignment-strategyTB_KAFKA_DEFAULT_CONSUMER_PARTITION_ASSIGNMENT_STRATEGYorg.apache.kafka.clients.consumer.StickyAssignor A list of class names or class types, ordered by preference, of supported partition assignment strategies that the client will use to distribute partition ownership amongst consumer instances when group management is used
queue.kafka.default.consumer.session-timeout-msTB_KAFKA_DEFAULT_CONSUMER_SESSION_TIMEOUT_MS10000 The timeout in milliseconds used to detect client failures when using Kafka's group management facility
queue.kafka.default.consumer.max-poll-interval-msTB_KAFKA_DEFAULT_CONSUMER_MAX_POLL_INTERVAL_MS300000 The maximum delay in milliseconds between invocations of poll() when using consumer group management
queue.kafka.default.consumer.max-poll-recordsTB_KAFKA_DEFAULT_CONSUMER_MAX_POLL_RECORDS2000 The maximum number of records returned in a single call to poll()
queue.kafka.default.consumer.max-partition-fetch-bytesTB_KAFKA_DEFAULT_CONSUMER_MAX_PARTITION_FETCH_BYTES16777216 The maximum amount of data in bytes per-partition the server will return
queue.kafka.default.consumer.fetch-max-bytesTB_KAFKA_DEFAULT_CONSUMER_FETCH_MAX_BYTES134217728 The maximum amount of data in bytes the server should return for a fetch request
queue.kafka.default.consumer.heartbeat-interval-msTB_KAFKA_DEFAULT_CONSUMER_HEARTBEAT_INTERVAL_MS3000 The expected time between heartbeats to the consumer coordinator when using Kafka’s group management facilities. + Heartbeats are used to ensure that the consumer’s session stays active and to facilitate rebalancing when new consumers join or leave the group. + The value must be set lower than TB_KAFKA_DEFAULT_CONSUMER_SESSION_TIMEOUT_MS, but typically should be set no higher than 1/3 of that value. + It can be adjusted even lower to control the expected time for normal rebalances. Value in milliseconds. Default is 3 sec
queue.kafka.default.producer.acksTB_KAFKA_DEFAULT_PRODUCER_ACKS1 The number of acknowledgments the producer requires the leader to have received before considering a request complete
queue.kafka.default.producer.retriesTB_KAFKA_DEFAULT_PRODUCER_RETRIES1 Setting a value greater than zero will cause the client to resend any record whose send fails with a potentially transient error
queue.kafka.default.producer.batch-sizeTB_KAFKA_DEFAULT_PRODUCER_BATCH_SIZE16384 The producer will attempt to batch records together into fewer requests whenever multiple records are being sent to the same partition. Size in bytes
queue.kafka.default.producer.linger-msTB_KAFKA_DEFAULT_PRODUCER_LINGER_MS5 The producer groups together any records that arrive in between request transmissions into a single batched request, set in milliseconds
queue.kafka.default.producer.buffer-memoryTB_KAFKA_DEFAULT_PRODUCER_BUFFER_MEMORY33554432 The total bytes of memory the producer can use to buffer records waiting to be sent to the server
queue.kafka.default.producer.compression-typeTB_KAFKA_DEFAULT_COMPRESSION_TYPEnone The compression type for all data generated by the producer. Valid values are `none`, `gzip`, `snappy`, `lz4`, or `zstd`
queue.kafka.admin.configTB_KAFKA_ADMIN_CONFIGretries:1 List of configs separated by semicolon used for admin kafka client creation
queue.kafka.admin.command-timeoutTB_KAFKA_ADMIN_COMMAND_TIMEOUT_SEC30 Kafka Admin client command timeout (in seconds). Applies to operations like describeCluster, listTopics, etc
queue.kafka.consumer-stats.enabledTB_KAFKA_CONSUMER_STATS_ENABLEDtrue Prints lag if enabled between consumer group offset and last messages offset in Kafka topics
queue.kafka.consumer-stats.print-interval-msTB_KAFKA_CONSUMER_STATS_PRINT_INTERVAL_MS60000 Statistics printing interval in milliseconds for Kafka's consumer-groups stats
queue.kafka.consumer-stats.kafka-response-timeout-msTB_KAFKA_CONSUMER_STATS_RESPONSE_TIMEOUT_MS1000 Time to wait in milliseconds for the stats-loading requests to Kafka to finish
queue.kafka.consumer-stats.consumer-configTB_KAFKA_CONSUMER_STATS_CONSUMER_CONFIG List of configs separated by semicolon used for kafka stats consumer
queue.kafka.integration-downlink.topic-prefixTB_KAFKA_IE_DOWNLINK_TOPIC_PREFIXtbmq.ie.downlink Prefix for topics for sending integration configurations and validation requests from tbmq to integration executors
queue.kafka.integration-downlink.http.topic-propertiesTB_KAFKA_IE_DOWNLINK_HTTP_TOPIC_PROPERTIESretention.ms:604800000;segment.bytes:26214400;retention.bytes:1048576000;partitions:6;replication.factor:1 Kafka topic properties separated by semicolon for `tbmq.ie.downlink.http` topic
queue.kafka.integration-downlink.http.additional-consumer-configTB_KAFKA_IE_DOWNLINK_HTTP_ADDITIONAL_CONSUMER_CONFIG Additional Kafka consumer configs separated by semicolon for `tbmq.ie.downlink.http` topic
queue.kafka.integration-downlink.http.additional-producer-configTB_KAFKA_IE_DOWNLINK_HTTP_ADDITIONAL_PRODUCER_CONFIG Additional Kafka producer configs separated by semicolon for `tbmq.ie.downlink.http` topic
queue.kafka.integration-downlink.kafka.topic-propertiesTB_KAFKA_IE_DOWNLINK_KAFKA_TOPIC_PROPERTIESretention.ms:604800000;segment.bytes:26214400;retention.bytes:1048576000;partitions:6;replication.factor:1 Kafka topic properties separated by semicolon for `tbmq.ie.downlink.kafka` topic
queue.kafka.integration-downlink.kafka.additional-consumer-configTB_KAFKA_IE_DOWNLINK_KAFKA_ADDITIONAL_CONSUMER_CONFIG Additional Kafka consumer configs separated by semicolon for `tbmq.ie.downlink.kafka` topic
queue.kafka.integration-downlink.kafka.additional-producer-configTB_KAFKA_IE_DOWNLINK_KAFKA_ADDITIONAL_PRODUCER_CONFIG Additional Kafka producer configs separated by semicolon for `tbmq.ie.downlink.kafka` topic
queue.kafka.integration-downlink.mqtt.topic-propertiesTB_KAFKA_IE_DOWNLINK_MQTT_TOPIC_PROPERTIESretention.ms:604800000;segment.bytes:26214400;retention.bytes:1048576000;partitions:6;replication.factor:1 Kafka topic properties separated by semicolon for `tbmq.ie.downlink.mqtt` topic
queue.kafka.integration-downlink.mqtt.additional-consumer-configTB_KAFKA_IE_DOWNLINK_MQTT_ADDITIONAL_CONSUMER_CONFIG Additional Kafka consumer configs separated by semicolon for `tbmq.ie.downlink.mqtt` topic
queue.kafka.integration-downlink.mqtt.additional-producer-configTB_KAFKA_IE_DOWNLINK_MQTT_ADDITIONAL_PRODUCER_CONFIG Additional Kafka producer configs separated by semicolon for `tbmq.ie.downlink.mqtt` topic
queue.kafka.integration-uplink.topicTB_KAFKA_IE_UPLINK_TOPICtbmq.ie.uplink Topic for sending messages/events from integration executors to tbmq
queue.kafka.integration-uplink.topic-propertiesTB_KAFKA_IE_UPLINK_TOPIC_PROPERTIESretention.ms:604800000;segment.bytes:26214400;retention.bytes:1048576000;partitions:6;replication.factor:1 Kafka topic properties separated by semicolon for `tbmq.ie.uplink` topic
queue.kafka.integration-uplink.additional-consumer-configTB_KAFKA_IE_UPLINK_ADDITIONAL_CONSUMER_CONFIG Additional Kafka consumer configs separated by semicolon for `tbmq.ie.uplink` topic
queue.kafka.integration-uplink.additional-producer-configTB_KAFKA_IE_UPLINK_ADDITIONAL_PRODUCER_CONFIG Additional Kafka producer configs separated by semicolon for `tbmq.ie.uplink` topic
queue.kafka.integration-uplink-notifications.topic-prefixTB_KAFKA_IE_UPLINK_NOTIF_TOPIC_PREFIXtbmq.ie.uplink.notifications Prefix for topics for sending notifications or replies from integration executors to specific tbmq node
queue.kafka.integration-uplink-notifications.topic-propertiesTB_KAFKA_IE_UPLINK_NOTIF_TOPIC_PROPERTIESretention.ms:604800000;segment.bytes:26214400;retention.bytes:1048576000;partitions:1;replication.factor:1 Kafka topic properties separated by semicolon for `tbmq.ie.uplink.notifications` topics
queue.kafka.integration-uplink-notifications.additional-consumer-configTB_KAFKA_IE_UPLINK_NOTIF_ADDITIONAL_CONSUMER_CONFIG Additional Kafka consumer configs separated by semicolon for `tbmq.ie.uplink.notifications` topic
queue.kafka.integration-uplink-notifications.additional-producer-configTB_KAFKA_IE_UPLINK_NOTIF_ADDITIONAL_PRODUCER_CONFIG Additional Kafka producer configs separated by semicolon for `tbmq.ie.uplink.notifications` topic
queue.kafka.integration-msg.topic-propertiesTB_KAFKA_IE_MSG_TOPIC_PROPERTIESretention.ms:604800000;segment.bytes:26214400;retention.bytes:1048576000;replication.factor:1 Kafka topic properties separated by semicolon for `tbmq.msg.ie` topics
queue.kafka.integration-msg.additional-consumer-configTB_KAFKA_IE_MSG_ADDITIONAL_CONSUMER_CONFIGmax.poll.records:50 Additional Kafka consumer configs separated by semicolon for `tbmq.msg.ie` topics
queue.kafka.integration-msg.additional-producer-configTB_KAFKA_IE_MSG_ADDITIONAL_PRODUCER_CONFIG Additional Kafka producer configs separated by semicolon for `tbmq.msg.ie` topics
queue.kafka.kafka-prefixTB_KAFKA_PREFIX The common prefix for all Kafka topics, producers, consumer groups, and consumers. Defaults to empty string meaning no prefix is added
+ + +## Service parameters + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
ParameterEnvironment VariableDefault ValueDescription
service.typeTB_SERVICE_TYPEtbmq-integration-executor Microservice type. Allowed value: tbmq-integration-executor
service.idTB_SERVICE_ID Unique id for this service (autogenerated if empty)
service.integrations.supportedTB_SERVICE_INTEGRATIONS_SUPPORTEDALL Allow to enable integration on microservice integration executor. + Allowed values: HTTP, KAFKA, MQTT. By default, ALL
service.integrations.excludedTB_SERVICE_INTEGRATIONS_EXCLUDEDNONE List of integrations to exclude from processing on service/microservice integration executor. + Allowed values: HTTP, KAFKA, MQTT. By default, NONE
+ + +## Integration common parameters + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
ParameterEnvironment VariableDefault ValueDescription
integrations.statistics.enabledINTEGRATIONS_STATISTICS_ENABLEDtrue Enable/disable integrations statistics
integrations.statistics.persist-frequencyINTEGRATIONS_STATISTICS_PERSIST_FREQUENCY3600000 Integration statistic persistence frequency in milliseconds
integrations.init.connection-timeout-secINTEGRATIONS_INIT_CONNECTION_TIMEOUT_SEC15 Maximum connection timeout allowed for integrations in seconds. Any greater user defined timeout will be reduced down to this limit
integrations.init.connection-check-api-request-timeout-secINTEGRATIONS_INIT_CONNECTION_CHECK_API_REQUEST_TIMEOUT_SEC20 Connection check timeout for API request in seconds
integrations.reinit.enabledINTEGRATIONS_REINIT_ENABLEDtrue Enable/disable integrations hot reinitialization. This process is done for integrations with state 'FAILED'
integrations.reinit.frequencyINTEGRATIONS_REINIT_FREQUENCY_MS300000 Checking interval in milliseconds for reinit integrations. Defaults to 5 minutes
integrations.destroy.graceful-timeout-msINTEGRATIONS_DESTROY_TIMEOUT_MS1000 The duration (in milliseconds) to wait during each iteration of the graceful shutdown process for integrations to terminate properly. + Default value is set to 1 seconds
integrations.destroy.countINTEGRATIONS_DESTROY_COUNT10 The number of iterations to attempt a graceful shutdown before forcefully stopping the process
integrations.destroy.forced-shutdown-timeout-msINTEGRATIONS_DESTROY_FORCED_SHUTDOWN_TIMEOUT_MS15000 The maximum duration (in milliseconds) to wait before forcefully stopping the application if the graceful shutdown process has not started or exceeds the allowed time
integrations.allow-local-network-hostsINTEGRATIONS_ALLOW_LOCAL_NETWORK_HOSTStrue Enable/disable integrations local network hosts
integrations.uplink.callback-threads-countINTEGRATIONS_UPLINK_THREADS4 Number of threads in the pool to process callbacks of uplink events to tbmq nodes
integrations.manage.lifecycle-threads-countINTEGRATIONS_MANAGE_LIFECYCLE_THREADS4 Number of threads in the pool to process lifecycle events (CREATE/UPDATE/DELETE) of integrations
integrations.manage.command-threads-countINTEGRATIONS_MANAGE_COMMAND_THREADS4 Number of threads in the pool to process integration validation requests
integrations.external.threads-countINTEGRATIONS_EXTERNAL_THREADS10 Number of threads in the pool dedicated to handling external operations, such as producing messages to Kafka topics
integrations.netty.threads-countINTEGRATIONS_NETTY_SHARED_GROUP_THREADS0 Netty shared worker group threads count. Defaults to 0 meaning the threads count is number of availableProcessors * 2. + Used to send messages to external MQTT brokers using MQTT bridge (integration)
+ + +## Management parameters + + + + + + + + + + + + + + + + + + + + + + + + + + + +
ParameterEnvironment VariableDefault ValueDescription
management.health.diskspace.enabledHEALTH_DISKSPACE_ENABLEDfalse Enable/disable disk space health check
management.endpoint.health.show-detailsHEALTH_SHOW_DETAILSnever Controls whether health endpoint shows full component details (e.g., Redis, DB, TBMQ). + Options: + - 'never': always hide details (default if security is enabled). + - 'when-authorized': show details only to authenticated users. + - 'always': always include full health details in the response
management.endpoints.web.exposure.includeMETRICS_ENDPOINTS_EXPOSEhealth,info,prometheus Specify which Actuator endpoints should be exposed via HTTP. + Use 'health,info' to expose only basic health and information endpoints. + For exposing Prometheus metrics, update this to include 'prometheus' in the list (e.g., 'health,info,prometheus')
+ + +## Statistics parameters + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
ParameterEnvironment VariableDefault ValueDescription
stats.ie.enabledSTATS_IE_ENABLEDtrue Enable/disable stats printing to the logs
stats.ie.print-interval-msSTATS_IE_PRINT_INTERVAL_MS60000 Period in milliseconds to print stats. Default value corresponds to 1 minute
stats.timer.percentilesSTATS_TIMER_PERCENTILES0.5 Metrics percentiles returned by actuator for timer metrics. List of comma-separated (,) double values
stats.system-info.persist-frequencySTATS_SYSTEM_INFO_PERSIST_FREQUENCY_SEC60 Persist frequency of system info (CPU, memory usage, etc.) in seconds
+ + +## Event configuration parameters + + + + + + + + + + + + + + + + + + + + + + + + + + + +
ParameterEnvironment VariableDefault ValueDescription
event.error.rate-limits.enabledEVENT_ERROR_RATE_LIMITS_ENABLEDtrue If true rate limits will be active
event.error.rate-limits.integrationEVENT_ERROR_RATE_LIMITS_INTEGRATION5000:3600,100:60 No more than 5000 messages per hour or 100 messages per minute for all integrations
event.error.rate-limits.ttl-minutesEVENT_ERROR_RATE_LIMITS_TTL60 Time (in minutes) to prevent duplicate persistence of rate limit events once the error event rate limit is reached
diff --git a/_includes/docs/pe/mqtt-broker/oauth-2-support.md b/_includes/docs/pe/mqtt-broker/oauth-2-support.md new file mode 100644 index 0000000000..8af5cb2e86 --- /dev/null +++ b/_includes/docs/pe/mqtt-broker/oauth-2-support.md @@ -0,0 +1,506 @@ +* TOC +{:toc} + +## Overview + +TBMQ Professional Edition allows you to provide Single Sign-On (SSO) functionality for your users and automatically create Administrators or Viewers using external user management platforms that support the OAuth 2.0 protocol. +Examples of platforms that support OAuth 2.0 include: [Google](#login-with-google), [Auth0](#login-with-auth0), [Keycloak](#login-with-keycloak), [Okta](https://www.okta.com/){:target="_blank"}, [Azure](https://portal.azure.com/){:target="_blank"}, etc. + +## OAuth 2.0 authentication flow + +TBMQ supports the Authorization Code grant type to exchange an authorization code for an access token. +Once the user is redirected back to the TBMQ client, the platform retrieves the authorization code from the URL and uses it to request an access token from the external user management platform. +Using the [basic mapper](#basic-mapper) or [custom mapper](#custom-mapper), the external user info object is converted from the external platform into a TBMQ internal OAuth 2.0 user. +After this, the regular TBMQ authorization flow takes place. + +## Setting up authentication via an external provider + +OAuth 2.0 clients are configured separately from domains, allowing reuse of the configured client and making the settings clearer. +To use authentication through an external provider, first configure an OAuth 2.0 client with the necessary credentials. +Then, either add a new domain or use an existing one, and update the OAuth 2.0 client list with the new client. + +### Operations with domain + +**Adding a domain** + +Follow these steps to add a new domain: + +* On the "Domains" tab of the "OAuth 2.0" page, click the "plus" icon to add a new domain; +* Provide your domain name and OAuth 2.0 client; +* Click "Add" to finalize. + +{% include images-gallery.html imageCollection="adding-domain-1" %} + +**Editing a domain** + +To update the settings for an existing domain, follow these steps: + +* Click on the domain to view its details; +* Switch to editing mode by clicking the large orange button; +* Make the required modifications; +* Save your changes by clicking the "Apply changes" button. + +{% include images-gallery.html imageCollection="editing-domain-1" %} + +**Deleting a domain** + +To remove a domain, follow these steps: + +* Click the "trash" icon in the row of the domain you wish to remove; +* Confirm the deletion by clicking "Yes". + +{% include images-gallery.html imageCollection="deleting-domain-1" %} + +### Operations with OAuth 2.0 client + +**Adding an OAuth 2.0 client** + +Follow these steps to add a new OAuth 2.0 client to TBMQ: + +* Navigate to the "OAuth 2.0 clients" tab on the "OAuth 2.0" page, and click the "plus" icon; +* Enter a descriptive title for the client; +* Select the authentication provider from the dropdown menu; +* Provide the Client ID and Client Secret obtained from your authentication provider; +* Configure advanced settings as necessary; +* Click "Add" to finalize. + +{% include images-gallery.html imageCollection="adding-oauth2-client-1" %} + +**Editing an OAuth 2.0 client** + +To update an existing OAuth 2.0 client: + +* Click on the client to view its details; +* Switch to editing mode by clicking the large orange button; +* Make the required modifications; +* Save your changes by clicking the "Apply changes" button. + +{% include images-gallery.html imageCollection="editing-oauth2-client-1" %} + +**Deleting an OAuth 2.0 client** + +To remove obsolete or unused clients: + +* Click the "trash" icon in the row of the client you wish to remove; +* Confirm the deletion by clicking "Yes". + +{% include images-gallery.html imageCollection="deleting-oauth2-client-1" %} + +## Login with Google + +In this example, we will use [Google](https://developers.google.com/identity/protocols/oauth2/openid-connect){:target="_blank"} for authentication. + +To map external user information from Google to the OAuth platform, use the built-in [basic mapper](#basic-mapper). +If the [basic mapper](#basic-mapper) does not fit your business needs, you can configure a [custom mapper](#custom-mapper) for more flexibility. + +### Preparations + +To use Google OAuth 2.0 authentication, you must set up a project in the [Google API Console](https://console.developers.google.com/){:target="_blank"} to obtain OAuth 2.0 credentials. + +Follow the instructions on the [OpenID Connect](https://developers.google.com/identity/protocols/oauth2/openid-connect){:target="_blank"} page or the steps below to configure the OAuth 2.0 client. +After completing this setup, you will have a Client ID and a Client Secret. + +* Go to the "Credentials" page in the left menu and select "OAuth client ID" from the "Create credentials" dropdown; +* Enter an OAuth client name and add the TBMQ redirect URI in the "Authorized Redirect URIs" section using the format: + +``` +http(s)://domain:port/login/oauth2/code/ +``` +{: .copy-code} + +* Replace `domain` with your TBMQ domain and specify the port used for HTTP access. + For example, if your domain is *my.tbmq.org*: + +``` +https://my.tbmq.org/login/oauth2/code/ +``` + +* Click "Create". + +The OAuth client is now created. You have credentials consisting of a *Client ID* and a *Client Secret*. + +{% include images-gallery.html imageCollection="google-credentials-for-oauth-1" %} + +### Configuring Google as an OAuth 2.0 authentication provider in TBMQ + +To configure OAuth 2.0 authentication in TBMQ via Google, follow these steps: + +* Log in to your TBMQ instance; +* Go to the "OAuth 2.0" page in the "Security" section; +* On the "Domains" tab, click the "plus" icon; +* Enter your domain name or IP address of your TBMQ instance; +* Click "Create new" in the "OAuth 2.0 clients" section to add one. + +{% include images-gallery.html imageCollection="google-configuration-of-thingsboard-google-1" %} + +Adding a new OAuth 2.0 client: + +* Enter "Google" as the title; +* Set the provider to "Google"; +* Enter the Client ID and Client Secret from the [Google API Console](https://console.developers.google.com/){:target="_blank"}. + +Then expand the "Advanced settings" section and configure the "General" block: + +* Use this [link](https://developers.google.com/identity/protocols/oauth2/openid-connect#discovery){:target="_blank"} to see the latest URLs such as "Access Token URI" and "Authorization URI"; +* Select "POST" as the client authentication method; +* Enable the "Allow user creation" option; +* Add the following to the scope field: `email`, `openid`, `profile`. + +{% include images-gallery.html imageCollection="google-configuration-of-thingsboard-google-2" %} + +Go to the "Mapper" block: + +* Keep the mapper type as "BASIC"; +* Specify the role to be assigned; +* Click "Add". + +{% include images-gallery.html imageCollection="google-configuration-of-thingsboard-google-3" %} + +* The OAuth client has been added successfully. Click "Add" again to confirm the addition of the domain. + +A new domain has now been added. + +{% include images-gallery.html imageCollection="google-configuration-of-thingsboard-google-4" %} + +### Sign in + +Now, go to the TBMQ login screen. You will see a new "Login with Google" option. +Select one of your Google accounts, and you will be logged into TBMQ using your Google email. + +{% include images-gallery.html imageCollection="login-with-google-1" %} + +Go to the "Users" page to find the newly created user. + +{% include images-gallery.html imageCollection="login-with-google-2" %} + +## Login with Auth0 + +In this sample, we will configure **OAuth** authentication using an external provider – [Auth0](https://auth0.com/){:target="_blank"}. + +To map external user information from Auth0 to the OAuth platform, we use the built-in [basic mapper](#basic-mapper). + +If the [basic mapper](#basic-mapper) does not fit your business needs, you can configure the [custom mapper](#custom-mapper) to implement mapping that suits your requirements. + +### Preparations + +Now let's add another provider to our list – [Auth0](https://auth0.com/){:target="_blank"}. + +To apply the configuration properly, we first need to obtain OAuth 2.0 credentials: + +* Go to the [Auth0 management console](https://manage.auth0.com/){:target="_blank"}. Open the "Applications" page, and click the "+ Create Application" button; +* Name your application "TBMQ" and choose the application type **Regular Web Applications**; +* Next, choose the technology being used. Please select **Java Spring Boot**; +* Once your application is created, you are redirected to the application details page. Navigate to the **Settings** tab to find the *Client ID* and *Client Secret*; +* In the **Allowed Callback URLs** field, update the redirect URI using the format: + +``` +http(s)://domain:port/login/oauth2/code/ +``` +{: .copy-code} + +* Replace `domain` with your TBMQ domain and specify the port used for HTTP access. + For example, if your domain is *my.tbmq.org*: + +``` +https://my.tbmq.org/login/oauth2/code/ +``` + +{% capture difference %} +Please note that it is not necessary to update the Application Login URI. +{% endcapture %} +{% include templates/info-banner.md content=difference %} + +* In the **Advanced Settings** section, you will find all the necessary URLs (endpoints) required for configuring OAuth 2.0; +* Click the **Save Changes** button. + +{% include images-gallery.html imageCollection="auth0-credentials-1" %} + +### Configuring Auth0 as an OAuth 2.0 authentication provider in TBMQ + +To configure OAuth 2.0 authentication in TBMQ via Auth0, follow these steps: + +* Log in to your TBMQ instance; +* Go to the "OAuth 2.0" page in the "Security" section; +* On the "Domains" tab, click the "plus" icon; +* Enter your domain name or IP address of your TBMQ instance; +* Click "Create new" in the "OAuth 2.0 clients" section to add a new one. + +{% include images-gallery.html imageCollection="oauth0-configuration-of-thingsboard-1" %} + +Adding a new OAuth 2.0 client: + +* In the opened window, enter **Auth0** as the title for the client; +* Select **Custom** as the provider from the dropdown; +* Enter the *Client ID* and *Client Secret* obtained from the [Auth0 management console](https://manage.auth0.com/){:target="_blank"}. + +In the **General** block of the "Advanced settings" section: + +* Fill in all the required URLs using the values obtained from the [Auth0 management console](https://manage.auth0.com/){:target="_blank"}; +* Select **POST** as the client authentication method; +* Enter **Auth0** as the provider label; +* Add the following scopes to the scope field: `openid`, `email`, `profile`. + +{% include images-gallery.html imageCollection="oauth0-configuration-of-thingsboard-2" %} + +
+Proceed to the "Mapper" block: +- Leave the mapper type as **BASIC**; +- Specify the role to be used; +- Click **Add** to complete the addition of the new OAuth 2.0 client. + +{% include images-gallery.html imageCollection="oauth0-configuration-of-thingsboard-3" %} + +* The Auth0 client has been successfully added. Click **Add** again to confirm the addition of the domain. + +{% include images-gallery.html imageCollection="oauth0-configuration-of-thingsboard-4" %} + +### Sign in + +Navigate to the login screen. You will now find the login method Auth0. +Click the "Login with Auth0" button. + +{% include images-gallery.html imageCollection="login-with-oauth0-1" %} + +Go to the "Users" page. There you will find that a new user has been created. + +{% include images-gallery.html imageCollection="login-with-oauth0-2" %} + +## Login with Keycloak + +In this sample, we will use [Keycloak](https://www.keycloak.org/){:target="_blank"} for authentication. + +To map external user information from Keycloak to the OAuth platform, we use the built-in [basic mapper](#basic-mapper). + +If the [basic mapper](#basic-mapper) does not fit your business needs, you can configure the [custom mapper](#custom-mapper) to implement a mapping that fits your requirements. + +### Preparations + +To use Keycloak for authentication, you need to set up a project in [Keycloak](https://www.keycloak.org/){:target="_blank"} to obtain OAuth 2.0 credentials. +Follow the [official instructions](https://www.keycloak.org/guides){:target="_blank"} or the steps below. +By the end, you should have a new Keycloak client with credentials consisting of a Client ID and a Client Secret. + +**Start Keycloak** + +Get started with Keycloak using your [preferred method](https://www.keycloak.org/guides){:target="_blank"}. +In this example, we will run a test Keycloak server on Docker. + +* Make sure you have [Docker](https://docs.docker.com/compose/install/){:target="_blank"} installed; +* Run the command below to start Keycloak locally on port 8081 and create an initial admin user with the username **admin** and password **admin**: + +```bash +docker run -p 8081:8080 -e KC_BOOTSTRAP_ADMIN_USERNAME=admin -e KC_BOOTSTRAP_ADMIN_PASSWORD=admin quay.io/keycloak/keycloak:26.0.5 start-dev +``` +{: .copy-code} + +{% include images-gallery.html imageCollection="terminal-start-keycloak" %} + +**Log in to the admin console** + +* Log in to the [Keycloak Admin Console](http://localhost:8081/admin){:target="_blank"} using **admin** as username and password. + +{% include images-gallery.html imageCollection="log-in-to-admin-console" %} + +**Create a realm** + +* Click "Keycloak" next to the master realm, then click the "Create realm" button; +* Enter **ThingsBoard** in the realm name field, and click "Create". + +The new realm has been created. + +{% include images-gallery.html imageCollection="create-new-realm" %} + +**Create a new client** + +A client represents an application or service that requests user authentication. + +* Go to the "Clients" page in the left-hand menu, and click the "Create client" button; +* Enter **thingsboard** as the client ID. Leave the client type as **OpenID Connect**. Click "Next"; +* Enable the **Client authentication** option. Confirm that **Standard flow** is enabled. Click "Next"; +* In the "Login settings" section, add the TBMQ redirect URI in the **Authorized Redirect URIs** section using the format: + +``` +http(s)://domain:port/login/oauth2/code/ +``` +{: .copy-code} + +* Replace `domain` with your TBMQ domain and specify the port used for HTTP access. + For example, if your domain is *my.thingsboard.instance*: + +``` +https://my.thingsboard.instance/login/oauth2/code/ +``` + +* Click "Save". + +Client created successfully. + +{% include images-gallery.html imageCollection="create-client" %} + +
+You now have credentials consisting of a Client ID and a Client Secret. +The Client ID is available on the "Settings" tab. The Client Secret is located on the "Credentials" tab. + +{% include images-gallery.html imageCollection="client-id-and-secret" %} + +#### Endpoints + +As a fully compliant OpenID Connect Provider, Keycloak exposes a set of endpoints that applications and services can use for authentication and authorization. + +* Go to the "Realm settings" page; +* Scroll down and locate the "OpenID Endpoint Configuration" link, then click it; +* A new window will open with the configuration. Check the "Pretty-print" option for easier reading. + +Here you can find values such as **Access Token URI**, **Authorization URI**, **JSON Web Key URI**, and **User Info URI**, which are required for configuring the OAuth 2.0 client in TBMQ. +A description of the available endpoints is provided [here](https://www.keycloak.org/securing-apps/oidc-layers){:target="_blank"}. + +{% include images-gallery.html imageCollection="endpoint-configuration" %} + +### Create a user + +Now add a user. Only added users will be able to authenticate via Keycloak. + +* Go to the "Users" page in the left-hand menu; +* Click "Create new user"; +* Enter the username and email address. First name and last name are optional; +* Click "Create". + +The user has been created. + +{% include images-gallery.html imageCollection="create-user" %} + +Set a password for this user: + +* Navigate to the "Credentials" tab and click **Set password**; +* Fill in the password form. Toggle **Temporary** to **Off** so that the user is not forced to change the password on first login; +* Click **Save password**. + +The password has been set successfully. + +{% include images-gallery.html imageCollection="create-password" %} + +### Configuring Keycloak as an OAuth 2.0 authentication provider in TBMQ + +To configure OAuth 2.0 authentication in TBMQ via Keycloak, follow the steps below: + +* Log in to your TBMQ instance; +* Go to the "OAuth 2.0" page of the "Security" section; +* Navigate to the "OAuth 2.0 clients" tab, and click the "plus" icon; +* Enter **Keycloak** as the title; +* Select **Custom** as the provider from the dropdown menu; +* Enter the *Client ID* and *Client Secret* retrieved from the [Keycloak console](http://localhost:8081/admin){:target="_blank"}. + +Then expand the "Advanced settings" menu and configure the "General" block: + +* Use the [endpoint configuration file](#endpoints) to find the current values for **Access Token URI**, **Authorization URI**, **JSON Web Key URI**, and **User Info URI**. Fill in the corresponding fields; +* Set the client authentication method to **POST**; +* Enter **Keycloak** as the provider label; +* Add the following scopes: `email`, `openid`, `profile`. + +{% include images-gallery.html imageCollection="keycloak-add-thingsboard-oauth-client-1" %} + +Go to the "Mapper" block: + +* Leave the mapper type as **BASIC**; +* Specify the role to be used; +* Click **Add** to confirm. + +A new OAuth 2.0 client has been added. + +{% include images-gallery.html imageCollection="keycloak-add-thingsboard-oauth-client-2" %} + +
+Now, add a new domain: + +* Go to the "Domains" tab of the "OAuth 2.0" page, and click the "plus" icon; +* Enter your domain name or IP address of your TBMQ instance; +* Specify **Keycloak** as the OAuth 2.0 client; +* Click **Add** again to confirm. + +A new domain has been added. + +{% include images-gallery.html imageCollection="keycloak-add-domain" %} + +### Sign in + +Go to the TBMQ login screen. You will now see the option **Login with Keycloak**. +Click this button. A window will open prompting you to sign in to your Keycloak account. +Enter your Keycloak credentials and click **Sign In**. You are now logged into TBMQ using Keycloak. + +{% include images-gallery.html imageCollection="login-with-keycloak-1" %} + +Go to the "Users" page. There you will find that a new user has been created. + +{% include images-gallery.html imageCollection="login-with-keycloak-2" %} + +## Mapping of the external user into the TBMQ internal user structure + +Mapping an external user info object into a TBMQ user can be achieved using the [Basic](#basic-mapper), [Custom](#custom-mapper), GitHub, and Apple mappers. + +### Basic mapper + +The basic mapper merges an external OAuth 2.0 user info object into the TBMQ OAuth 2.0 user with a predefined set of rules. + +To use the basic mapper, set the mapper type to **Basic**. + +{% include images-gallery.html imageCollection="mapper-basic-1" %} + +Details of the available properties: + +* **Allow user creation** – If enabled, and the user account does not yet exist in TBMQ, it will be created automatically. + If disabled, the user will receive an *access denied* error when trying to log in with an external OAuth 2.0 provider, if no corresponding TBMQ user exists. + +* **Email attribute key** – The attribute key from the external OAuth 2.0 user info that will be used for the TBMQ user email property. + +* **First name attribute key** – The attribute key from the external OAuth 2.0 user info that will be used for the TBMQ user first name property. + +* **Last name attribute key** – The attribute key from the external OAuth 2.0 user info that will be used for the TBMQ user last name property. + +* **Role** – Choose from the predefined roles to be assigned to the user. + +> {% include templates/mqtt-broker/security/user-password.md %} + +### Custom mapper + +If the basic mapper functionality does not meet your business needs, you can configure a custom mapper to implement logic that fits your specific goals. + +A custom mapper is designed as a separate microservice running alongside the TBMQ microservice. +TBMQ forwards all mapping requests to this microservice and expects a TBMQ OAuth 2.0 user object in response. + +Refer to this [base implementation](https://github.com/thingsboard/tbmq-custom-oauth2-mapper){:target="_blank"} as a starting point for your custom mapper. + +To use the custom mapper, set the mapper type to **Custom**. + +{% include images-gallery.html imageCollection="mapper-custom-1" %} + +Details of the available properties: + +* **URL** – The URL of the custom mapper endpoint; +* **username** – If the custom mapper endpoint is configured with basic authentication, specify the *username* here; +* **password** – If the custom mapper endpoint is configured with basic authentication, specify the *password* here. + +## HAProxy configuration + +If TBMQ is running behind a load balancer such as HAProxy, configure the balancing algorithm properly to ensure that the correct session is maintained on the TBMQ instance: + +```bash +backend tbmq-api-backend + ... + balance source # balance must be set to 'source' + ... +``` + +Also, configure ACL mapping for HTTP and HTTPS requests: + +```bash +frontend http-in + ... + acl tbmq_api_acl path_beg /api/ /swagger /webjars /v2/ /oauth2/ /login/oauth2/ # '/oauth2/ /login/oauth2/' added + ... +``` + +```bash +frontend https_in + ... + acl tbmq_api_acl path_beg /api/ /swagger /webjars /v2/ /oauth2/ /login/oauth2/ # '/oauth2/ /login/oauth2/' added + ... +``` diff --git a/_includes/docs/pe/mqtt-broker/rbac.md b/_includes/docs/pe/mqtt-broker/rbac.md new file mode 100644 index 0000000000..52a13d81f1 --- /dev/null +++ b/_includes/docs/pe/mqtt-broker/rbac.md @@ -0,0 +1,24 @@ +* TOC +{:toc} + +**Role-Based Access Control (RBAC)** in TBMQ PE provides a structured and secure way to manage access to broker features +and operations through predefined [user roles](/docs/pe/mqtt-broker/user-guide/ui/users/). +This system enables administrators to grant appropriate permissions to users based on their role within the organization. + +### Available Roles + +TBMQ PE introduces two predefined user roles: + +* **Admin**: Full access to all broker features. +* **Viewer**: Read-only access to all broker data — without the ability to perform changes or administrative actions. + +### Benefits + +* **Enhanced security**: Limit access to sensitive broker features based on user responsibilities. +* **Simplified administration**: Easily assign predefined roles to users without managing granular permissions. +* **Compliance and auditing**: Support best practices in access control by separating duties between administrative and observability roles. + +### Use Cases + +* Assign the **Admin** role to team members responsible for configuring or maintaining the broker environment. +* Grant the **Viewer** role to operations or monitoring personnel who need visibility into system health and client behavior without risking configuration changes. diff --git a/_includes/docs/pe/mqtt-broker/white-labeling.md b/_includes/docs/pe/mqtt-broker/white-labeling.md new file mode 100644 index 0000000000..36f6858979 --- /dev/null +++ b/_includes/docs/pe/mqtt-broker/white-labeling.md @@ -0,0 +1,100 @@ +{% assign feature = "White labeling" %}{% include templates/mqtt-broker/pe-tbmq-feature-banner.md %} + +* TOC +{:toc} + +## Overview + +White labeling lets you tailor your TBMQ instance to match your brand and preferences - especially useful for companies delivering IoT solutions to their customers. + +Set your company or product name, upload your logo, choose color palettes. + +## Customize TBMQ web interface + +To configure your company or product **logo** and **color scheme**, go to the "White labeling" page. + +{% include images-gallery.html imageCollection="white-labeling-default" %} + +In the "General" tab you can set or change the following options: + + - Application title - you can specify a custom page title, which is displayed in the browser tab; + - Favicon (website icon) - you can change the default website icon to your own; + - Logo - you can change the standard logo in the upper left corner to your company logo; + - Logo height - you can resize the logo; + +![image](/images/pe/mqtt-broker/user-guide/white-labeling/white-labeling-title-logo-favicon.png) + + - White labeling allows you to customize the color theme by adjusting the primary and accent palettes to match your desired UI design. + + - Primary palette - you can customize the background color and font color by choosing one of the suggested UI design options or customizing an existing one; + - Accent palette - you can customize the color for some elements, for example, for a toggle; + + ![image](/images/pe/mqtt-broker/user-guide/white-labeling/primary-accent-palette.png) + + - Advanced CSS - you can stylize any elements of the TBMQ user interface as you wish. We will talk more about this functionality [below](#advanced-css); + - Show/hide platform name and version - by checking this option, the name of the platform and its current version will be displayed in the lower left corner. + + ![image](/images/pe/mqtt-broker/user-guide/white-labeling/show-platform-name-and-version.png) + +The final look of the customized user interface: + +![image](/images/pe/mqtt-broker/user-guide/white-labeling/white-labeling-custom.png) + +### Advanced CSS + +Using CSS, you can stylize any elements of the TBMQ user interface as you wish. Such elements can be background, icons, fonts, etc. + +To use CSS in your UI design, do the following: + +{% include images-gallery.html imageCollection="advanced-css" showListImageTitles="true" %} + +
+CSS code example for customize icons color, scroll color and active button: + +```css +/*icon color*/ + +a.mat-mdc-button.mat-mdc-button-base .mat-icon { + color: #a60062; +} + +/*scroll color*/ + +mat-toolbar::-webkit-scrollbar-thumb, +div::-webkit-scrollbar-thumb, +ng-component::-webkit-scrollbar-thumb { + background-color: #c526a5 !important; + background-image: linear-gradient(#e72c83, #a742c6); + border-radius: 200px/300px !important; + border: 0.1rem linear-gradient(#e72c83, #a742c6); +} + +/*active button color*/ + +.mat-mdc-button.mat-mdc-button-base.tb-active{ + color: #a60062; +} +``` +{: .copy-code} + +Using the functionality described in this documentation, you can customize the appearance of the TBMQ UI according to your preferences. + +## Customize the login page + +On the "Login" tab, you can configure the TBMQ **login page**. + +- Enter the registered domain name, or refer to [this documentation](/docs/pe/mqtt-broker/security/domains/#domain-registration){:target="_blank"} to learn how to register a new domain; +- It is recommended to prevent usage of hostnames from headers of the request; +- Enter a custom application title; +- Replace the default website icon and logo with your own; +- Define the primary and accent color palettes; +- Set the page background color. + +Once done, save the changes. + +{% include images-gallery.html imageCollection="customize-login-page" %} + +
+Now, use your custom domain name to access the TBMQ web interface login page and verify the result of your configuration. + +{% include images-gallery.html imageCollection="verify-result-customize-login-page" %} diff --git a/_includes/docwithnav.html b/_includes/docwithnav.html index 5b7d10da15..6d4080f735 100755 --- a/_includes/docwithnav.html +++ b/_includes/docwithnav.html @@ -10,6 +10,8 @@ {% assign searchPath = "/docs/" | append: "pe/mobile" %} {% elsif docsTag == "paas-eu" %} {% assign searchPath = "/docs/" | append: "paas/eu" %} + {% elsif docsTag == "mqtt-broker-pe" %} + {% assign searchPath = "/docs/" | append: "pe/mqtt-broker" %} {% else %} {% assign searchPath = "/docs/" | append: docsTag %} {% endif %} diff --git a/_includes/head-header.html b/_includes/head-header.html index c715785766..1407064a93 100644 --- a/_includes/head-header.html +++ b/_includes/head-header.html @@ -8,6 +8,9 @@ {% if docsTag == "mqtt-broker" %} {% assign githubLink = "https://github.com/thingsboard/tbmq" %} {% assign githubLabel = "Star thingsboard/tbmq on GitHub" %} + {% elsif docsTag == "mqtt-broker-pe" %} + {% assign githubLink = "https://github.com/thingsboard/tbmq" %} + {% assign githubLabel = "Star thingsboard/tbmq on GitHub" %} {% elsif docsTag == "gw" %} {% assign githubLink = "https://github.com/thingsboard/thingsboard-gateway" %} {% assign githubLabel = "Star thingsboard/thingsboard-gateway on GitHub" %} diff --git a/_includes/templates/mqtt-broker-guides-banner.md b/_includes/templates/mqtt-broker-guides-banner.md index 2518b9d5d9..1f097f1be9 100644 --- a/_includes/templates/mqtt-broker-guides-banner.md +++ b/_includes/templates/mqtt-broker-guides-banner.md @@ -1,18 +1,18 @@ {% if currentGuide != "GettingStartedGuide" %} -- [**Getting started guide**](/docs/mqtt-broker/getting-started/) - This guide provide quick overview of TBMQ. +- [**Getting started guide**](/docs/{{docsPrefix}}mqtt-broker/getting-started/) - This guide provide quick overview of TBMQ. {% endif %} {% if currentGuide != "InstallationGuides" %} -- [**Installation guides**](/docs/mqtt-broker/install/installation-options/) - Learn how to set up TBMQ using Docker or deploy it in K8S environments on AWS, GCP, and Azure. +- [**Installation guides**](/docs/{{docsPrefix}}mqtt-broker/install/installation-options/) - Learn how to set up TBMQ using Docker or deploy it in K8S environments on AWS, GCP, and Azure. {% endif %} {% if currentGuide != "SecurityGuide" %} -- [**Security guide**](/docs/mqtt-broker/security/overview/) - Learn how to enable authentication and authorization for MQTT clients. +- [**Security guide**](/docs/{{docsPrefix}}mqtt-broker/security/overview/) - Learn how to enable authentication and authorization for MQTT clients. {% endif %} {% if currentGuide != "ConfigurationGuide" %} -- [**Configuration guide**](/docs/mqtt-broker/install/config/) - Learn about TBMQ configuration files and parameters. +- [**Configuration guide**](/docs/{{docsPrefix}}mqtt-broker/install/config/) - Learn about TBMQ configuration files and parameters. {% endif %} {% if currentGuide != "MQTTClientTypeGuide" %} -- [**MQTT client type guide**](/docs/mqtt-broker/user-guide/mqtt-client-type/) - Learn about TBMQ client types. +- [**MQTT client type guide**](/docs/{{docsPrefix}}mqtt-broker/user-guide/mqtt-client-type/) - Learn about TBMQ client types. {% endif %} {% if currentGuide != "TBIntegrationGuide" %} -- [**Integration with ThingsBoard**](/docs/mqtt-broker/user-guide/integrations/how-to-connect-thingsboard-to-tbmq/) - Learn about how to integrate TBMQ with ThingsBoard. +- [**Integration with ThingsBoard**](/docs/{{docsPrefix}}mqtt-broker/user-guide/integrations/how-to-connect-thingsboard-to-tbmq/) - Learn about how to integrate TBMQ with ThingsBoard. {% endif %} diff --git a/_includes/templates/mqtt-broker/application-shared-subscriptions.md b/_includes/templates/mqtt-broker/application-shared-subscriptions.md index 1eb97b4e63..baa27aa84e 100644 --- a/_includes/templates/mqtt-broker/application-shared-subscriptions.md +++ b/_includes/templates/mqtt-broker/application-shared-subscriptions.md @@ -27,4 +27,4 @@ By default, this variable is enabled, meaning that the validation process is act However, if you choose to disable this validation by setting the variable to _false_, the system will no longer create Kafka topics for shared subscriptions having topic filters with special characters, resulting in a failure to create the corresponding topics. -It's important to consider this when configuring your environment and handling client IDs with special characters. +It's important to consider this when configuring your environment and handling topic filters with special characters. diff --git a/_includes/templates/mqtt-broker/install/aws/gp3-sc.md b/_includes/templates/mqtt-broker/install/aws/gp3-sc.md new file mode 100644 index 0000000000..dcac75d52b --- /dev/null +++ b/_includes/templates/mqtt-broker/install/aws/gp3-sc.md @@ -0,0 +1,43 @@ +The `gp3` EBS volume type is the recommended default for Amazon EKS, offering better performance, cost efficiency, and flexibility compared to `gp2`. + +Please download the storage class configuration file: + +```bash +curl -o gp3-def-sc.yml https://raw.githubusercontent.com/thingsboard/tbmq/{{ site.release.broker_branch }}/k8s/helm/aws/gp3-def-sc.yml +``` +{: .copy-code} + +Apply the configuration: + +```bash +kubectl apply -f gp3-def-sc.yml +``` +{: .copy-code} + +If a `gp2` StorageClass exists, it may conflict with `gp3`. You can either make `gp2` storage class non-default: + +```bash +kubectl patch storageclass gp2 -p '{"metadata": {"annotations":{"storageclass.kubernetes.io/is-default-class":"false"}}}' +``` +{: .copy-code} + +Or delete the `gp2` StorageClass (if unused): + +```bash +kubectl delete storageclass gp2 +``` +{: .copy-code} + +Check the `gp3` storage class available and marked as default: + +```bash +kubectl get sc +``` +{: .copy-code} + +You should see the similar output: + +```text +NAME PROVISIONER RECLAIMPOLICY VOLUMEBINDINGMODE ALLOWVOLUMEEXPANSION AGE +gp3 (default) ebs.csi.aws.com Delete WaitForFirstConsumer true 30s +``` diff --git a/_includes/templates/mqtt-broker/install/azure/aks-configure-and-create-cluster.md b/_includes/templates/mqtt-broker/install/azure/aks-configure-and-create-cluster.md index abb51c0a32..fca5b1f2f7 100644 --- a/_includes/templates/mqtt-broker/install/azure/aks-configure-and-create-cluster.md +++ b/_includes/templates/mqtt-broker/install/azure/aks-configure-and-create-cluster.md @@ -7,7 +7,7 @@ az group create --name $AKS_RESOURCE_GROUP --location $AKS_LOCATION To see more info about `az group` please follow the next [link](https://learn.microsoft.com/en-us/cli/azure/group?view=azure-cli-latest). -After the Resource group is created, we can create AKS cluster by using the next command: +After the Resource group is created, we can create the AKS cluster by using the next command: ```bash az aks create --resource-group $AKS_RESOURCE_GROUP \ @@ -35,4 +35,4 @@ We will use this gateway as Path-Based Load Balancer for the TBMQ. Full list af `az aks create` options can be found [here](https://learn.microsoft.com/en-us/cli/azure/aks?view=azure-cli-latest#az_aks_create). -Alternatively, you may use this [guide](https://learn.microsoft.com/en-us/azure/aks/learn/quick-kubernetes-deploy-portal?tabs=azure-cli) for custom cluster setup. \ No newline at end of file +Alternatively, you may use this [guide](https://learn.microsoft.com/en-us/azure/aks/learn/quick-kubernetes-deploy-portal?tabs=azure-cli) for custom cluster setup. diff --git a/_includes/templates/mqtt-broker/install/azure/aks-define-env-variables.md b/_includes/templates/mqtt-broker/install/azure/aks-define-env-variables.md index 318e27dd5d..91bb78accd 100644 --- a/_includes/templates/mqtt-broker/install/azure/aks-define-env-variables.md +++ b/_includes/templates/mqtt-broker/install/azure/aks-define-env-variables.md @@ -8,7 +8,6 @@ export AKS_LOCATION=eastus export AKS_GATEWAY=tbmq-gateway export TB_CLUSTER_NAME=tbmq-cluster export TB_DATABASE_NAME=tbmq-db -export TB_REDIS_NAME=tbmq-redis echo "You variables ready to create resource group $AKS_RESOURCE_GROUP in location $AKS_LOCATION and cluster in it $TB_CLUSTER_NAME with database $TB_DATABASE_NAME" ``` @@ -16,8 +15,8 @@ and cluster in it $TB_CLUSTER_NAME with database $TB_DATABASE_NAME" where: -* TBMQResources - a logical group in which Azure resources are deployed and managed. We will refer to it later in this guide using **AKS_RESOURCE_GROUP**; -* eastus - is the location where you want to create resource group. We will refer to it later in this guide using **AKS_LOCATION**. You can see all locations list by executing `az account list-locations`; -* tbmq-gateway - the name of Azure application gateway; -* tbmq-cluster - cluster name. We will refer to it later in this guide using **TB_CLUSTER_NAME**; -* tbmq-db is the name of your database server. You may input a different name. We will refer to it later in this guide using **TB_DATABASE_NAME**. \ No newline at end of file +* TBMQResources — a logical group in which Azure resources are deployed and managed. We will refer to it later in this guide using **AKS_RESOURCE_GROUP**; +* eastus — is the location where you want to create the resource group. We will refer to it later in this guide using **AKS_LOCATION**. You can see all locations list by executing `az account list-locations`; +* tbmq-gateway — the name of Azure application gateway; +* tbmq-cluster — cluster name. We will refer to it later in this guide using **TB_CLUSTER_NAME**; +* tbmq-db — is the name of your database server. You may input a different name. We will refer to it later in this guide using **TB_DATABASE_NAME**. diff --git a/_includes/templates/mqtt-broker/install/azure/aks-prerequisites.md b/_includes/templates/mqtt-broker/install/azure/aks-prerequisites.md index 3faf789bc3..30d46ffb7d 100644 --- a/_includes/templates/mqtt-broker/install/azure/aks-prerequisites.md +++ b/_includes/templates/mqtt-broker/install/azure/aks-prerequisites.md @@ -1,11 +1,11 @@ ### Install and configure tools -To deploy TBMQ on the AKS cluster you will need to install [kubectl](https://kubernetes.io/docs/tasks/tools/), +To deploy TBMQ on the AKS cluster, you will need to install [kubectl](https://kubernetes.io/docs/tasks/tools/), [helm](https://helm.sh/docs/intro/install/), and [az](https://learn.microsoft.com/en-us/cli/azure/) tools. -After installation is done you need to log in to the cli using the next command: +After installation is done, you need to log in to the cli using the next command: ```bash az login ``` -{: .copy-code} \ No newline at end of file +{: .copy-code} diff --git a/_includes/templates/mqtt-broker/install/azure/aks-update-kubectl-ctx.md b/_includes/templates/mqtt-broker/install/azure/aks-update-kubectl-ctx.md index 840cc33920..2a2c9b462b 100644 --- a/_includes/templates/mqtt-broker/install/azure/aks-update-kubectl-ctx.md +++ b/_includes/templates/mqtt-broker/install/azure/aks-update-kubectl-ctx.md @@ -12,4 +12,4 @@ kubectl get nodes ``` {: .copy-code} -You should see cluster`s nodes list. \ No newline at end of file +You should see cluster`s nodes list. diff --git a/_includes/templates/mqtt-broker/install/cluster-common/configure-http-load-balancer.md b/_includes/templates/mqtt-broker/install/cluster-common/configure-http-load-balancer.md index 4b907c799a..95d3faebcc 100644 --- a/_includes/templates/mqtt-broker/install/cluster-common/configure-http-load-balancer.md +++ b/_includes/templates/mqtt-broker/install/cluster-common/configure-http-load-balancer.md @@ -12,9 +12,9 @@ kubectl get ingress ``` {: .copy-code} -Once provisioned, you should see similar output: +Once provisioned, you should see the similar output: ```text -NAME CLASS HOSTS ADDRESS PORTS AGE -tb-broker-http-loadbalancer * 34.111.24.134 80 7m25s -``` \ No newline at end of file +NAME CLASS HOSTS ADDRESS PORTS AGE +tbmq-http-loadbalancer * 34.111.24.134 80 7m25s +``` diff --git a/_includes/templates/mqtt-broker/install/cluster-common/configure-license-key.md b/_includes/templates/mqtt-broker/install/cluster-common/configure-license-key.md new file mode 100644 index 0000000000..58cbdf0b0d --- /dev/null +++ b/_includes/templates/mqtt-broker/install/cluster-common/configure-license-key.md @@ -0,0 +1,25 @@ +{% if docsPrefix == "pe/" %} +## Get the license key + +Before proceeding, make sure you’ve selected your subscription plan or chosen to purchase a perpetual license. +If you haven’t done this yet, please visit the [Pricing page](/pricing/?section=tbmq-options){: target="_blank"} to compare available options +and obtain your license key. + +> **Note:** Throughout this guide, we’ll refer to your license key as **YOUR_LICENSE_KEY_HERE**. + +## Configure the license key + +Create a k8s secret with your license key: + +```bash +export TBMQ_LICENSE_KEY=YOUR_LICENSE_KEY_HERE +kubectl create -n thingsboard-mqtt-broker secret generic tbmq-license --from-literal=license-key=$TBMQ_LICENSE_KEY +``` +{: .copy-code} + +{% capture replace_license_key %} +Don’t forget to replace **YOUR_LICENSE_KEY_HERE** with the value of your license key. +{% endcapture %} +{% include templates/info-banner.md content=replace_license_key %} + +{% endif %} diff --git a/_includes/templates/mqtt-broker/install/cluster-common/configure-mqtt-load-balancer.md b/_includes/templates/mqtt-broker/install/cluster-common/configure-mqtt-load-balancer.md index 7745fd8af0..27e3ce344b 100644 --- a/_includes/templates/mqtt-broker/install/cluster-common/configure-mqtt-load-balancer.md +++ b/_includes/templates/mqtt-broker/install/cluster-common/configure-mqtt-load-balancer.md @@ -1,6 +1,6 @@ Configure MQTT load balancer to be able to use MQTT protocol to connect devices. -Create TCP load balancer using following command: +Create TCP load balancer using the following command: ```bash kubectl apply -f receipts/mqtt-load-balancer.yml @@ -26,11 +26,11 @@ kubectl create configmap tbmq-mqtts-config \ * where **YOUR_PEM_FILENAME** is the name of your **server certificate file**. * where **YOUR_PEM_KEY_FILENAME** is the name of your **server certificate private key file**. -Then, uncomment all sections in the ‘tb-broker.yml’ file that are marked with “Uncomment the following lines to enable two-way MQTTS”. +Then, uncomment all sections in the ‘tbmq.yml’ file that are marked with “Uncomment the following lines to enable two-way MQTTS”. Execute command to apply changes: ```bash -kubectl apply -f tb-broker.yml +kubectl apply -f tbmq.yml ``` -{: .copy-code} \ No newline at end of file +{: .copy-code} diff --git a/_includes/templates/mqtt-broker/install/cluster-common/k8s-type-upgrade-ce-to-pe.md b/_includes/templates/mqtt-broker/install/cluster-common/k8s-type-upgrade-ce-to-pe.md new file mode 100644 index 0000000000..e6b69f2da4 --- /dev/null +++ b/_includes/templates/mqtt-broker/install/cluster-common/k8s-type-upgrade-ce-to-pe.md @@ -0,0 +1,14 @@ +### Upgrade from TBMQ CE to TBMQ PE (v2.2.0) + +To upgrade your existing **TBMQ Community Edition (CE)** to **TBMQ Professional Edition (PE)**, ensure you are running the latest **TBMQ CE {{site.release.broker_full_ver}}** version before starting the process. +Merge your current configuration with the latest [TBMQ PE K8S scripts](https://github.com/thingsboard/tbmq-pe-k8s/tree/{{ site.release.broker_branch }}). +Do not forget to [configure the license key](#configure-the-license-key). + +Run the following commands, including the upgrade script to migrate PostgreSQL database data from CE to PE: + +```bash +./k8s-delete-tbmq.sh +./k8s-upgrade-tbmq.sh --fromVersion=ce +./k8s-deploy-tbmq.sh +``` +{: .copy-code} diff --git a/_includes/templates/mqtt-broker/install/cluster-common/provision-kafka-new.md b/_includes/templates/mqtt-broker/install/cluster-common/provision-kafka-new.md new file mode 100644 index 0000000000..f6be55ca2d --- /dev/null +++ b/_includes/templates/mqtt-broker/install/cluster-common/provision-kafka-new.md @@ -0,0 +1,61 @@ +TBMQ requires a running Kafka cluster. You can set up Kafka in two ways: + +* **Deploy a self-managed Apache Kafka cluster** +* **Deploy a managed Kafka cluster with the Strimzi Operator** + +Choose the option that best fits your environment and operational needs. + +### Option 1. Deploy an Apache Kafka Cluster + +* Runs as a **StatefulSet** with 3 pods in **KRaft dual-role mode** (each node acts as both controller and broker). +* Suitable if you want a lightweight, self-managed Kafka setup. +{% if docsPrefix == null %} +* [See the full deployment guide here](https://github.com/thingsboard/tbmq/blob/{{site.release.broker_branch}}/k8s/{{deployment}}/kafka/README.md). +{% else %} +* [See the full deployment guide here](https://github.com/thingsboard/tbmq-pe-k8s/blob/{{site.release.broker_branch}}/{{deployment}}/kafka/README.md). +{% endif %} + +**Quick steps:** + +```bash +kubectl apply -f kafka/tbmq-kafka.yml +``` +{: .copy-code} + +Update TBMQ configuration files (`tbmq.yml` and `tbmq-ie.yml`) and uncomment the section marked: + +```yaml +# Uncomment the following lines to connect to Apache Kafka +``` + +### Option 2. Deploy a Kafka Cluster with the Strimzi Operator + +* Uses the **Strimzi Cluster Operator** for Kubernetes to manage Kafka. +* Provides easier upgrades, scaling, and operational management. +{% if docsPrefix == null %} +* [See the full deployment guide here](https://github.com/thingsboard/tbmq/blob/{{site.release.broker_branch}}/k8s/{{deployment}}/kafka/operator/README.md). +{% else %} +* [See the full deployment guide here](https://github.com/thingsboard/tbmq-pe-k8s/blob/{{site.release.broker_branch}}/{{deployment}}/kafka/operator/README.md). +{% endif %} + +**Quick steps:** + +Install the Strimzi operator: + +```bash +helm install tbmq-kafka -f kafka/operator/values-strimzi-kafka-operator.yaml oci://quay.io/strimzi-helm/strimzi-kafka-operator --version 0.47.0 +``` +{: .copy-code} + +Deploy the Kafka cluster: + +```bash +kubectl apply -f kafka/operator/kafka-cluster.yaml +``` +{: .copy-code} + +Update TBMQ configuration files (`tbmq.yml` and `tbmq-ie.yml`) and uncomment the section marked: + +```yaml +# Uncomment the following lines to connect to Strimzi +``` diff --git a/_includes/templates/mqtt-broker/install/cluster-common/provision-redis-cluster.md b/_includes/templates/mqtt-broker/install/cluster-common/provision-redis-cluster.md index d2cd6633dc..48fb3c8fb5 100644 --- a/_includes/templates/mqtt-broker/install/cluster-common/provision-redis-cluster.md +++ b/_includes/templates/mqtt-broker/install/cluster-common/provision-redis-cluster.md @@ -1,70 +1,64 @@ -We recommend deploying Bitnami Redis Cluster from Helm. For that, review the `redis` folder. - -```bash -ls redis/ -``` -{: .copy-code} - -You can find there _default-values-redis.yml_ file - -default values downloaded from [Bitnami artifactHub](https://artifacthub.io/packages/helm/bitnami/redis-cluster). -And _values-redis.yml_ file with modified values. -We recommend keeping the first file untouched and making changes to the second one only. This way the upgrade process to the next version will go more smoothly as it will be possible to see diff. - -To add the Bitnami helm repo: - -```bash -helm repo add bitnami https://charts.bitnami.com/bitnami -helm repo update -``` -{: .copy-code} - -To install Bitnami Redis cluster, execute the following command: - -```bash -helm install redis -f redis/values-redis.yml bitnami/redis-cluster --version 10.2.5 -``` -{: .copy-code} - -Once deployed, you should see the information about deployment state, followed by the command to get your REDIS_PASSWORD: - -```text -NAME: redis -LAST DEPLOYED: Tue Apr 8 11:22:44 2025 -NAMESPACE: thingsboard-mqtt-broker -STATUS: deployed -REVISION: 1 -TEST SUITE: None -NOTES: -CHART NAME: redis-cluster -CHART VERSION: 10.2.5 -APP VERSION: 7.2.5** Please be patient while the chart is being deployed ** - - -To get your password run: - export REDIS_PASSWORD=$(kubectl get secret --namespace "thingsboard-mqtt-broker" redis-redis-cluster -o jsonpath="{.data.redis-password}" | base64 -d) -``` - -Let's modify this command to print the password to the terminal: - -```bash -echo $(kubectl get secret --namespace "thingsboard-mqtt-broker" redis-redis-cluster -o jsonpath="{.data.redis-password}" | base64 -d) -``` -{: .copy-code} - -You need to copy the output and paste it into the _tb-broker-cache-configmap.yml_ file, replacing `YOUR_REDIS_PASSWORD`. - -```bash -nano tb-broker-cache-configmap.yml -``` -{: .copy-code} - -{% capture redis-nodes %} - -The value of `REDIS_NODES` in _tb-broker-cache-configmap.yml_ is set to `"redis-redis-cluster-headless:6379"` by default. -The host name is based on the release name (redis) and the default naming conventions of the Bitnami chart. -If you modify the `nameOverride` or `fullnameOverride` fields in your Redis values file, or change the release name during installation, -you must update this value accordingly to match the actual headless service name created by the chart. - -{% endcapture %} -{% include templates/info-banner.md content=redis-nodes %} - +TBMQ relies on **Valkey** to store messages for [DEVICE persistent clients](/docs/{{docsPrefix}}mqtt-broker/architecture/#persistent-device-client). +The cache also improves performance by reducing the number of direct database reads, especially when authentication is enabled and multiple clients connect at once. +Without caching, every new connection triggers a database query to validate MQTT client credentials, which can cause the unnecessary load under high connection rates. + +To set up Valkey in Google Cloud, refer to the Google Memorystore for Valkey documentation: + +* **Create Memorystore for Valkey instances**: + Instructions to provision both **Cluster Mode Enabled** and **Cluster Mode Disabled** instances, including prerequisites like service connection policies and networking setup. + ([Google Cloud][1]) + +* **General overview**: + Details on the managed Valkey service, architecture, and key concepts such as shards, endpoints, and supported Valkey versions (including 8.0). + ([Google Cloud][2]) + +* **Networking requirements**: + Guidance on Private Service Connect and service connection policy setup necessary for secure connectivity. + ([Google Cloud][3]) + +* **Instance & node sizing**: + Recommendations for choosing node types according to workload (e.g., `standard-small`, `highmem-medium`), memory capacity, and performance characteristics. + ([Google Cloud][4]) + +* **Cluster vs Standalone (Cluster Mode Enabled vs Disabled)**: + Comparison of horizontal scaling, throughput, and feature support—helpful in choosing the appropriate mode for your use case. + ([Google Cloud][5]) + +* **High Availability & Replicas**: + Best practices for multi-zone deployment, replica usage for read scaling, and resilience in production scenarios. + ([Google Cloud][6]) + +* **Best practices & scaling guidance**: + Advice on memory management, eviction policies, when to scale, and how to handle growing workloads effectively. + ([Google Cloud][7]) + +Once your Valkey cluster is ready, update the cache configuration in `tbmq-cache-configmap.yml` with the correct endpoint values: + +* **For standalone Valkey**: + Uncomment and set the following values. Make sure the `REDIS_HOST` value does **not** include the port (`:6379`). + + ```yaml + REDIS_CONNECTION_TYPE: "standalone" + REDIS_HOST: "YOUR_VALKEY_ENDPOINT_URL_WITHOUT_PORT" + #REDIS_PASSWORD: "YOUR_REDIS_PASSWORD" + ``` + +* **For Valkey cluster**: + Provide a comma-separated list of "host:port" node endpoints to bootstrap from. + + ```yaml + REDIS_CONNECTION_TYPE: "cluster" + REDIS_NODES: "COMMA_SEPARATED_LIST_OF_NODES" + #REDIS_PASSWORD: "YOUR_REDIS_PASSWORD" + # Recommended in Kubernetes for handling dynamic IPs and failover: + #REDIS_LETTUCE_CLUSTER_TOPOLOGY_REFRESH_ENABLED: "true" + #REDIS_JEDIS_CLUSTER_TOPOLOGY_REFRESH_ENABLED: "true" + ``` + +[1]: https://cloud.google.com/memorystore/docs/valkey/create-instances?utm_source=chatgpt.com "Create instances | Memorystore for Valkey | Google Cloud" +[2]: https://cloud.google.com/memorystore/docs/valkey/product-overview?utm_source=chatgpt.com "Memorystore for Valkey overview - Google Cloud" +[3]: https://cloud.google.com/memorystore/docs/valkey/networking?utm_source=chatgpt.com "Networking | Memorystore for Valkey | Google Cloud" +[4]: https://cloud.google.com/memorystore/docs/valkey/instance-node-specification?utm_source=chatgpt.com "Instance and node specification | Memorystore for Valkey | Google Cloud" +[5]: https://cloud.google.com/memorystore/docs/valkey/cluster-mode-enabled-and-disabled?utm_source=chatgpt.com "Enable and disable cluster mode | Memorystore for Valkey - Google Cloud" +[6]: https://cloud.google.com/memorystore/docs/valkey/ha-and-replicas?utm_source=chatgpt.com "High availability and replicas | Memorystore for Valkey | Google Cloud" +[7]: https://cloud.google.com/memorystore/docs/valkey/general-best-practices?utm_source=chatgpt.com "Best practices for Memorystore for Valkey - Google Cloud" diff --git a/_includes/templates/mqtt-broker/install/cluster-common/starting.md b/_includes/templates/mqtt-broker/install/cluster-common/starting.md index d6fdf326f1..dd677bbf10 100644 --- a/_includes/templates/mqtt-broker/install/cluster-common/starting.md +++ b/_includes/templates/mqtt-broker/install/cluster-common/starting.md @@ -12,4 +12,4 @@ kubectl get pods ``` {: .copy-code} -If everything went fine, you should be able to see `tb-broker-0` and `tb-broker-1` pods. Every pod should be in the `READY` state. \ No newline at end of file +If everything went fine, you should be able to see `tbmq-0` and `tbmq-1` pods. Every pod should be in the `READY` state. diff --git a/_includes/templates/mqtt-broker/install/cluster-common/troubleshooting.md b/_includes/templates/mqtt-broker/install/cluster-common/troubleshooting.md index cc184b6c04..cc0830d586 100644 --- a/_includes/templates/mqtt-broker/install/cluster-common/troubleshooting.md +++ b/_includes/templates/mqtt-broker/install/cluster-common/troubleshooting.md @@ -1,14 +1,15 @@ -In case of any issues you can examine service logs for errors. For example to see TBMQ logs execute the following command: +In case of any issues, you can examine service logs for errors. For example, to see TBMQ logs, execute the following command: ```bash -kubectl logs -f tb-broker-0 +kubectl logs -f tbmq-0 ``` {: .copy-code} Use the next command to see the state of all statefulsets. + ```bash kubectl get statefulsets ``` {: .copy-code} -See [kubectl Cheat Sheet](https://kubernetes.io/docs/reference/kubectl/cheatsheet/) command reference for more details. \ No newline at end of file +See [kubectl Cheat Sheet](https://kubernetes.io/docs/reference/kubectl/cheatsheet/) command reference for more details. diff --git a/_includes/templates/mqtt-broker/install/cluster-common/validate-mqtt-access.md b/_includes/templates/mqtt-broker/install/cluster-common/validate-mqtt-access.md index 3f3f481240..06b4988775 100644 --- a/_includes/templates/mqtt-broker/install/cluster-common/validate-mqtt-access.md +++ b/_includes/templates/mqtt-broker/install/cluster-common/validate-mqtt-access.md @@ -1,4 +1,4 @@ -To connect to the cluster via MQTT you will need to get corresponding service IP. You can do this with the command: +To connect to the cluster via MQTT, you will need to get the corresponding service IP. You can do this with the command: ```bash kubectl get services @@ -8,8 +8,8 @@ kubectl get services You should see the similar picture: ```text -NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE -tb-broker-mqtt-loadbalancer LoadBalancer 10.100.119.170 ******* 1883:30308/TCP,8883:31609/TCP 6m58s +NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE +tbmq-mqtt-loadbalancer LoadBalancer 10.100.119.170 ******* 1883:30308/TCP,8883:31609/TCP 6m58s ``` -Use `EXTERNAL-IP` field of the load-balancer to connect to the cluster via MQTT protocol. \ No newline at end of file +Use `EXTERNAL-IP` field of the load-balancer to connect to the cluster via MQTT protocol. diff --git a/_includes/templates/mqtt-broker/install/cluster-common/validate-the-setup.md b/_includes/templates/mqtt-broker/install/cluster-common/validate-the-setup.md index 61596d8aa8..6823d65f76 100644 --- a/_includes/templates/mqtt-broker/install/cluster-common/validate-the-setup.md +++ b/_includes/templates/mqtt-broker/install/cluster-common/validate-the-setup.md @@ -1,6 +1,6 @@ -Now you can open TBMQ web interface in your browser using DNS name of the load balancer. +Now you can open the TBMQ web interface in your browser using the DNS name of the load balancer. -You can get DNS name of the load-balancers using the next command: +You can get the DNS name of the load-balancers using the next command: ```bash kubectl get ingress @@ -10,10 +10,10 @@ kubectl get ingress You should see the similar picture: ```text -NAME CLASS HOSTS ADDRESS PORTS AGE -tb-broker-http-loadbalancer * 34.111.24.134 80 3d1h +NAME CLASS HOSTS ADDRESS PORTS AGE +tbmq-http-loadbalancer * 34.111.24.134 80 3d1h ``` -Use `ADDRESS` field of the tb-broker-http-loadbalancer to connect to the cluster. +Use `ADDRESS` field of the tbmq-http-loadbalancer to connect to the cluster. {% include templates/mqtt-broker/login.md %} diff --git a/_includes/templates/mqtt-broker/install/gcp/configure-https-load-balancer.md b/_includes/templates/mqtt-broker/install/gcp/configure-https-load-balancer.md index 6d8af77aaa..3c60fd3e63 100644 --- a/_includes/templates/mqtt-broker/install/gcp/configure-https-load-balancer.md +++ b/_includes/templates/mqtt-broker/install/gcp/configure-https-load-balancer.md @@ -6,7 +6,7 @@ gcloud compute addresses create {{staticIP}} --global ``` {: .copy-code} -Replace the *PUT_YOUR_DOMAIN_HERE* with valid domain name in the *https-load-balancer.yml* file: +Replace the *PUT_YOUR_DOMAIN_HERE* with a valid domain name in the *https-load-balancer.yml* file: ```bash nano receipts/https-load-balancer.yml @@ -27,11 +27,11 @@ kubectl get ingress ``` {: .copy-code} -Once provisioned, you should see similar output: +Once provisioned, you should see a similar output: ```text -NAME CLASS HOSTS ADDRESS PORTS AGE -tb-broker-https-loadbalancer gce * 34.111.24.134 80 7m25s +NAME CLASS HOSTS ADDRESS PORTS AGE +tbmq-https-loadbalancer gce * 34.111.24.134 80 7m25s ``` Now, **assign the domain name** you have used to the load balancer IP address (the one you see instead of 34.111.24.134 in the command output). @@ -75,4 +75,4 @@ kubectl describe managedcertificate managed-cert ``` {: .copy-code} -Certificate will be eventually provisioned if you have configured domain records properly. \ No newline at end of file +Certificate will be eventually provisioned if you have configured domain records properly. diff --git a/_includes/templates/mqtt-broker/install/gcp/env-variables.md b/_includes/templates/mqtt-broker/install/gcp/env-variables.md index e52dc6c976..4701c681ce 100644 --- a/_includes/templates/mqtt-broker/install/gcp/env-variables.md +++ b/_includes/templates/mqtt-broker/install/gcp/env-variables.md @@ -18,8 +18,8 @@ echo "You have selected project: $GCP_PROJECT, region: $GCP_REGION, gcp zones: $ where: -* first line uses gcloud command to fetch your current GCP project id. We will refer to it later in this guide using **$GCP_PROJECT**; +* the first line uses gcloud command to fetch your current GCP project id. We will refer to it later in this guide using **$GCP_PROJECT**; * *us-central1* is one of the available compute [regions](https://cloud.google.com/compute/docs/regions-zones#available). We will refer to it later in this guide using **$GCP_REGION**; * *default* is a default GCP network name; We will refer to it later in this guide using **$GCP_NETWORK**; * *{{tbClusterName}}* is the name of your cluster. You may input a different name. We will refer to it later in this guide using **$TB_CLUSTER_NAME**; -* *{{tbDbClusterName}}* is the name of your database server. You may input a different name. We will refer to it later in this guide using **$TB_DATABASE_NAME**; +* *{{tbDbClusterName}}* is the name of your database server. You may input a different name. We will refer to it later in this guide using **$TB_DATABASE_NAME**. diff --git a/_includes/templates/mqtt-broker/install/gcp/gke-prerequisites.md b/_includes/templates/mqtt-broker/install/gcp/gke-prerequisites.md new file mode 100644 index 0000000000..061dc35d4d --- /dev/null +++ b/_includes/templates/mqtt-broker/install/gcp/gke-prerequisites.md @@ -0,0 +1,23 @@ +### Install and configure tools + +To deploy TBMQ {{tbmqSuffix}} on GKE cluster you'll need to install +[`kubectl`](https://kubernetes.io/docs/tasks/tools/) and [`gcloud`](https://cloud.google.com/sdk/downloads) tools. +See [before you begin](https://cloud.google.com/kubernetes-engine/docs/how-to/creating-a-zonal-cluster#before_you_begin) guide for more info. + +Create a new Google Cloud Platform project (recommended) or choose the existing one. + +Make sure you have selected the correct project by executing the following command: + +```bash +gcloud init +``` +{: .copy-code} + +### Enable GCP services + +Enable the GKE and SQL services for your project by executing the following command: + +```bash +gcloud services enable container.googleapis.com sql-component.googleapis.com sqladmin.googleapis.com +``` +{: .copy-code} diff --git a/_includes/templates/mqtt-broker/install/gcp/install.md b/_includes/templates/mqtt-broker/install/gcp/install.md index 14811c2cc9..2164d0dae1 100644 --- a/_includes/templates/mqtt-broker/install/gcp/install.md +++ b/_includes/templates/mqtt-broker/install/gcp/install.md @@ -1,11 +1,11 @@ -Execute the following command to run installation: +Execute the following command to run the installation: ```bash ./k8s-install-tbmq.sh ``` {: .copy-code} -After this command finishes, you should see the next line in the console: +After this command is finished, you should see the next line in the console: ``` Installation finished successfully! diff --git a/_includes/templates/mqtt-broker/install/gcp/provision-postgresql.md b/_includes/templates/mqtt-broker/install/gcp/provision-postgresql.md new file mode 100644 index 0000000000..6d3d0de51a --- /dev/null +++ b/_includes/templates/mqtt-broker/install/gcp/provision-postgresql.md @@ -0,0 +1,80 @@ +#### Prerequisites + +Enable service networking to allow your K8S cluster to connect to the DB instance: + +```bash +gcloud services enable servicenetworking.googleapis.com --project=$GCP_PROJECT + +gcloud compute addresses create google-managed-services-$GCP_NETWORK \ +--global \ +--purpose=VPC_PEERING \ +--prefix-length=16 \ +--network=projects/$GCP_PROJECT/global/networks/$GCP_NETWORK + +gcloud services vpc-peerings connect \ +--service=servicenetworking.googleapis.com \ +--ranges=google-managed-services-$GCP_NETWORK \ +--network=$GCP_NETWORK \ +--project=$GCP_PROJECT + +``` +{: .copy-code} + +#### Create database server instance + +Create the PostgreSQL instance with database version "**PostgreSQL 17**" and the following recommendations: + +* use the same region where your K8S cluster **GCP_REGION** is located; +* use the same VPC network where your K8S cluster **GCP_REGION** is located; +* use private IP address to connect to your instance and disable public IP address; +* use highly available DB instance for production and single zone instance for development clusters; +* use at least 2 vCPUs and 7.5 GB RAM, which is sufficient for most of the workloads. You may scale it later if needed. + +Execute the following command: + +```bash + +gcloud beta sql instances create $TB_DATABASE_NAME \ +--database-version=POSTGRES_17 \ +--region=$GCP_REGION --availability-type=regional \ +--no-assign-ip --network=projects/$GCP_PROJECT/global/networks/$GCP_NETWORK \ +--cpu=2 --memory=7680MB +``` +{: .copy-code} + +Alternatively, you may follow [this](https://cloud.google.com/sql/docs/postgres/create-instance) guide to configure your database. + +Note your IP address (**YOUR_DB_IP_ADDRESS**) from the command output. Successful command output should look similar to this: + +```text +Created [https://sqladmin.googleapis.com/sql/v1beta4/projects/YOUR_PROJECT_ID/instances/$TB_DATABASE_NAME]. +NAME DATABASE_VERSION LOCATION TIER PRIMARY_ADDRESS PRIVATE_ADDRESS STATUS +$TB_DATABASE_NAME POSTGRES_17 us-central1-f db-custom-2-7680 35.192.189.68 - RUNNABLE +``` + +#### Set database password + +Set the password for your new database server instance: + +```bash +gcloud sql users set-password postgres \ +--instance=$TB_DATABASE_NAME \ +--password=secret +``` +{: .copy-code} + +where: + +* *instance* is the name of your database server instance; +* *secret* is the password. You **should** input a different password. We will refer to it later in this guide using **YOUR_DB_PASSWORD**. + +#### Create the database + +Create "{{tbDbName}}" database inside your postgres database server instance: + +```bash +gcloud sql databases create {{tbDbName}} --instance=$TB_DATABASE_NAME +``` +{: .copy-code} + +where, *{{tbDbName}}* is the name of your database. You may input a different name. We will refer to it later in this guide using **YOUR_DB_NAME**. diff --git a/_includes/templates/mqtt-broker/install/gcp/provision-redis-cluster.md b/_includes/templates/mqtt-broker/install/gcp/provision-redis-cluster.md deleted file mode 100644 index 149e962c66..0000000000 --- a/_includes/templates/mqtt-broker/install/gcp/provision-redis-cluster.md +++ /dev/null @@ -1,128 +0,0 @@ -**WARNING:** If this template is included, we should update GKE prerequisites by adding `networkconnectivity.googleapis.com` - -You need to set up Google Cloud Memorystore for Redis Cluster. TBMQ uses cache to store messages for [DEVICE persistent clients](/docs/mqtt-broker/architecture/#persistent-device-client), -to improve performance and avoid frequent DB reads (see below for more details). - -It is useful when clients connect to TBMQ with the authentication enabled. -For every connection, the request is made to find MQTT client credentials that can authenticate the client. -Thus, there could be an excessive amount of requests to be processed for a large number of connecting clients at once. - -To ensure reliability and durability across Redis restarts or failovers, -we recommend using Redis Cluster with persistence enabled. - -Before creating a Redis Cluster, you must configure a Service Connection Policy (SCP) for your project, network, and region. -This is required because Redis Cluster uses Private Service Connect (PSC) to enable VPC-level access to the managed Redis instances. -Without this step, the cluster creation will fail with an error indicating that no service connection policy is associated with the project/network/region. - -To configure the SCP, follow this [guide](https://cloud.google.com/vpc/docs/configure-service-connection-policies). - -An alternative way to do this is by using `gcloud` tool: - -```bash -gcloud network-connectivity service-connection-policies create redis-cluster-scp \ - --network=projects/$GCP_PROJECT/global/networks/$GCP_NETWORK \ - --region=$GCP_REGION \ - --service-class=gcp-memorystore-redis \ - --subnets=projects/$GCP_PROJECT/regions/$GCP_REGION/subnetworks/$GCP_NETWORK -``` - -In order to set up the Redis cluster, follow this [guide](https://cloud.google.com/memorystore/docs/cluster/create-instances#create_an_instance). - -Another way to do this is by using `gcloud` tool: - -```bash -gcloud redis clusters create $TB_REDIS_NAME \ - --region=$GCP_REGION \ - --shard-count=3 \ - --replica-count=1 \ - --persistence-mode=RDB \ - --rdb-snapshot-period=12h \ - --network=projects/$GCP_PROJECT/global/networks/$GCP_NETWORK -``` -{: .copy-code} - -`gcloud redis instances create` has many options. A few important parameters are: - -* **region** - location of your Redis instance (e.g., us-central1); -* **shard-count** - number of Redis shards (nodes). Minimum is 1, recommended 3+ for large workloads. -* **replica-count** - number of replicas per shard (HA). -* **redis-version** - recommended to use `redis_7_2`; -* **persistence-mode** - enables disk-based snapshotting for durability. -* **rdb-snapshot-period** - configures automatic snapshots every 12 hours. -* **network** - VPC network name (must match the GCP project network). - -To see the full list of parameters, check the CLI [reference](https://cloud.google.com/sdk/gcloud/reference/redis/clusters/create). - -Example of response: - -```text -Create request issued for: [tbmq-redis] -Waiting for operation [projects/$GCP_PROJECT/locations/europe-west6/operations/operation-1744037679309-632316a59a3f8-36d8b3df-07092f17] to complete...done. -Created cluster [tbmq-redis]. -authorizationMode: AUTH_MODE_DISABLED -automatedBackupConfig: - automatedBackupMode: DISABLED -clusterEndpoints: -- connections: - - pscAutoConnection: - address: 10.172.0.6 - connectionType: CONNECTION_TYPE_DISCOVERY - forwardingRule: https://www.googleapis.com/compute/v1/projects/$GCP_PROJECT/regions/europe-west6/forwardingRules/sca-auto-fr-5f22b780-399f-4572-840e-52999ae09e2b - network: projects/$GCP_PROJECT/global/networks/$GCP_NETWORK - projectId: $GCP_PROJECT - pscConnectionId: '19404658127405062' - pscConnectionStatus: PSC_CONNECTION_STATUS_ACTIVE - serviceAttachment: projects/430913155293/regions/europe-west6/serviceAttachments/gcp-memorystore-auto-cb3ac4ed-c840-4e-psc-sa - - pscAutoConnection: - address: 10.172.0.7 - forwardingRule: https://www.googleapis.com/compute/v1/projects/$GCP_PROJECT/regions/europe-west6/forwardingRules/sca-auto-fr-60653003-26b2-44bc-b270-da4246bef8c0 - network: projects/$GCP_PROJECT/global/networks/$GCP_NETWORK - projectId: $GCP_PROJECT - pscConnectionId: '19404658127405063' - pscConnectionStatus: PSC_CONNECTION_STATUS_ACTIVE - serviceAttachment: projects/430913155293/regions/europe-west6/serviceAttachments/gcp-memorystore-auto-cb3ac4ed-c840-4e-psc-sa-2 -createTime: '2025-04-07T14:54:39.351678778Z' -deletionProtectionEnabled: false -discoveryEndpoints: -- address: 10.172.0.6 - port: 6379 - pscConfig: - network: projects/$GCP_PROJECT/global/networks/$GCP_NETWORK -encryptionInfo: - encryptionType: GOOGLE_DEFAULT_ENCRYPTION -name: projects/$GCP_PROJECT/locations/europe-west6/clusters/tbmq-redis -nodeType: REDIS_HIGHMEM_MEDIUM -persistenceConfig: - mode: RDB - rdbConfig: - rdbSnapshotPeriod: TWELVE_HOURS - rdbSnapshotStartTime: '2025-04-07T14:54:39.320409249Z' -preciseSizeGb: 39.0 -pscConnections: -- address: 10.172.0.6 - forwardingRule: https://www.googleapis.com/compute/v1/projects/$GCP_PROJECT/regions/europe-west6/forwardingRules/sca-auto-fr-5f22b780-399f-4572-840e-52999ae09e2b - network: projects/$GCP_PROJECT/global/networks/$GCP_NETWORK - projectId: $GCP_PROJECT - pscConnectionId: '19404658127405062' - serviceAttachment: projects/430913155293/regions/europe-west6/serviceAttachments/gcp-memorystore-auto-cb3ac4ed-c840-4e-psc-sa -- address: 10.172.0.7 - forwardingRule: https://www.googleapis.com/compute/v1/projects/$GCP_PROJECT/regions/europe-west6/forwardingRules/sca-auto-fr-60653003-26b2-44bc-b270-da4246bef8c0 - network: projects/$GCP_PROJECT/global/networks/$GCP_NETWORK - projectId: $GCP_PROJECT - pscConnectionId: '19404658127405063' - serviceAttachment: projects/430913155293/regions/europe-west6/serviceAttachments/gcp-memorystore-auto-cb3ac4ed-c840-4e-psc-sa-2 -pscServiceAttachments: -- connectionType: CONNECTION_TYPE_DISCOVERY - serviceAttachment: projects/430913155293/regions/europe-west6/serviceAttachments/gcp-memorystore-auto-cb3ac4ed-c840-4e-psc-sa -- serviceAttachment: projects/430913155293/regions/europe-west6/serviceAttachments/gcp-memorystore-auto-cb3ac4ed-c840-4e-psc-sa-2 -replicaCount: 1 -shardCount: 3 -sizeGb: 39 -state: ACTIVE -transitEncryptionMode: TRANSIT_ENCRYPTION_MODE_DISABLED -uid: cb3ac4ed-c840-4edd-8eb4-1d2a31f758ba -zoneDistributionConfig: - mode: MULTI_ZONE -``` - -We need to take `discoveryEndpoints.address` parameter value and replace `YOUR_REDIS_ENDPOINT_URL_WITHOUT_PORT` in the file _tb-broker-cache-configmap.yml_. \ No newline at end of file diff --git a/_includes/templates/mqtt-broker/install/gcp/regional-gke-cluster.md b/_includes/templates/mqtt-broker/install/gcp/regional-gke-cluster.md new file mode 100644 index 0000000000..e307894abb --- /dev/null +++ b/_includes/templates/mqtt-broker/install/gcp/regional-gke-cluster.md @@ -0,0 +1,20 @@ +Create a regional cluster distributed across 3 zones with nodes of your preferred machine type. +The example below provisions one **e2-standard-4** node per zone **(three nodes total)**, but you can modify the `--machine-type` and `--num-nodes` to suit your workload requirements. +For a full list of available machine types and their specifications, refer to the [GCP machine types documentation](https://cloud.google.com/compute/docs/machine-resource). + +Execute the following command (recommended): + +```bash +gcloud container clusters create $TB_CLUSTER_NAME \ +--release-channel stable \ +--region $GCP_REGION \ +--network=$GCP_NETWORK \ +--node-locations $GCP_ZONE1,$GCP_ZONE2,$GCP_ZONE3 \ +--enable-ip-alias \ +--num-nodes=1 \ +--node-labels=role=main \ +--machine-type=e2-standard-4 +``` +{: .copy-code} + +Alternatively, you may use [this](https://cloud.google.com/kubernetes-engine/docs/how-to/creating-a-regional-cluster) guide for custom cluster setup. diff --git a/_includes/templates/mqtt-broker/install/gcp/update-kubectl-region.md b/_includes/templates/mqtt-broker/install/gcp/update-kubectl-region.md new file mode 100644 index 0000000000..09faea57a0 --- /dev/null +++ b/_includes/templates/mqtt-broker/install/gcp/update-kubectl-region.md @@ -0,0 +1,7 @@ + +Update the context of kubectl using command: + +``` +gcloud container clusters get-credentials $TB_CLUSTER_NAME --region $GCP_REGION +``` +{: .copy-code} diff --git a/_includes/templates/mqtt-broker/install/helm/aws/configure-deployment.md b/_includes/templates/mqtt-broker/install/helm/aws/configure-deployment.md index 7d304cbaa3..9efea8e73e 100644 --- a/_includes/templates/mqtt-broker/install/helm/aws/configure-deployment.md +++ b/_includes/templates/mqtt-broker/install/helm/aws/configure-deployment.md @@ -95,49 +95,7 @@ eksctl create cluster -f cluster.yml ### Create GP3 storage class and make it default -When provisioning persistent storage in Amazon EKS, the `gp3` volume type is the modern, recommended default. It offers superior performance, cost-efficiency, and flexibility compared to `gp2`. - -Please download the storage class configuration file: - -```bash -curl -o gp3-def-sc.yml https://raw.githubusercontent.com/thingsboard/tbmq/{{ site.release.broker_branch }}/k8s/helm/aws/gp3-def-sc.yml -``` -{: .copy-code} - -Apply the configuration: - -```bash -kubectl apply -f gp3-def-sc.yml -``` -{: .copy-code} - -If a `gp2` StorageClass exists, it may conflict with `gp3`. You can either make `gp2` storage class non-default: - -```bash -kubectl patch storageclass gp2 -p '{"metadata": {"annotations":{"storageclass.kubernetes.io/is-default-class":"false"}}}' -``` -{: .copy-code} - -Or delete the `gp2` StorageClass (if unused): - -```bash -kubectl delete storageclass gp2 -``` -{: .copy-code} - -Check the `gp3` storage class available and marked as default: - -```bash -kubectl get sc -``` -{: .copy-code} - -You should see similar output: - -```text -NAME PROVISIONER RECLAIMPOLICY VOLUMEBINDINGMODE ALLOWVOLUMEEXPANSION AGE -gp3 (default) ebs.csi.aws.com Delete WaitForFirstConsumer true 30s -``` +{% include templates/mqtt-broker/install/aws/gp3-sc.md %} ### Attach Policy diff --git a/_includes/templates/mqtt-broker/install/linux-macos/linux-macos-install.md b/_includes/templates/mqtt-broker/install/linux-macos/linux-macos-install.md new file mode 100644 index 0000000000..dec053564b --- /dev/null +++ b/_includes/templates/mqtt-broker/install/linux-macos/linux-macos-install.md @@ -0,0 +1,17 @@ +{% if docsPrefix == null %} + +```shell +wget https://raw.githubusercontent.com/thingsboard/tbmq/{{ site.release.broker_branch }}/msa/tbmq/configs/tbmq-install-and-run.sh && +sudo chmod +x tbmq-install-and-run.sh && ./tbmq-install-and-run.sh +``` +{: .copy-code} + +{% else %} + +```shell +wget https://raw.githubusercontent.com/thingsboard/tbmq-pe-docker-compose/{{ site.release.broker_branch }}/basic/tbmq-install-and-run.sh && +sudo chmod +x tbmq-install-and-run.sh && ./tbmq-install-and-run.sh +``` +{: .copy-code} + +{% endif %} diff --git a/_includes/templates/mqtt-broker/install/linux-macos/linux-macos.md b/_includes/templates/mqtt-broker/install/linux-macos/linux-macos.md index b23ba3370c..22ea97bcb9 100644 --- a/_includes/templates/mqtt-broker/install/linux-macos/linux-macos.md +++ b/_includes/templates/mqtt-broker/install/linux-macos/linux-macos.md @@ -1,7 +1,3 @@ For Linux or macOS users who have Docker installed, the execution of the following commands is recommended: -```shell -wget https://raw.githubusercontent.com/thingsboard/tbmq/{{ site.release.broker_branch }}/msa/tbmq/configs/tbmq-install-and-run.sh && -sudo chmod +x tbmq-install-and-run.sh && ./tbmq-install-and-run.sh -``` -{: .copy-code} +{% include templates/mqtt-broker/install/linux-macos/linux-macos-install.md %} diff --git a/_includes/templates/mqtt-broker/install/ssl/mqtts.md b/_includes/templates/mqtt-broker/install/ssl/mqtts.md index 88fd6ff2c5..95bf0d0c4a 100644 --- a/_includes/templates/mqtt-broker/install/ssl/mqtts.md +++ b/_includes/templates/mqtt-broker/install/ssl/mqtts.md @@ -2,7 +2,7 @@ To enable **MQTT over SSL/TLS (MQTTS)** in TBMQ, you need to provide valid SSL certificates and configure TBMQ to use them. -For details on supported formats and configuration options, see the [MQTT over SSL](/docs/mqtt-broker/security/mqtts/) guide. +For details on supported formats and configuration options, see the [MQTT over SSL](/docs/{{docsPrefix}}mqtt-broker/security/mqtts/) guide. **Prepare SSL Certificates** diff --git a/_includes/templates/mqtt-broker/install/windows/windows-install.md b/_includes/templates/mqtt-broker/install/windows/windows-install.md index b96ac1bf02..f4de09b32a 100644 --- a/_includes/templates/mqtt-broker/install/windows/windows-install.md +++ b/_includes/templates/mqtt-broker/install/windows/windows-install.md @@ -20,8 +20,20 @@ Set-ExecutionPolicy Unrestricted * **Install TBMQ** +{% if docsPrefix == null %} + ```bash Invoke-WebRequest -Uri "https://raw.githubusercontent.com/thingsboard/tbmq/{{ site.release.broker_branch }}/msa/tbmq/configs/windows/tbmq-install-and-run.ps1" ` -OutFile ".\tbmq-install-and-run.ps1"; .\tbmq-install-and-run.ps1 ``` {: .copy-code} + +{% else %} + +```bash +Invoke-WebRequest -Uri "https://raw.githubusercontent.com/thingsboard/tbmq-pe-docker-compose/{{ site.release.broker_branch }}/basic/windows/tbmq-install-and-run.ps1" ` +-OutFile ".\tbmq-install-and-run.ps1"; .\tbmq-install-and-run.ps1 +``` +{: .copy-code} + +{% endif %} diff --git a/_includes/templates/mqtt-broker/pe-tbmq-explore-banner.md b/_includes/templates/mqtt-broker/pe-tbmq-explore-banner.md new file mode 100644 index 0000000000..827f271500 --- /dev/null +++ b/_includes/templates/mqtt-broker/pe-tbmq-explore-banner.md @@ -0,0 +1,6 @@ +{% if docsPrefix != 'pe/' %} +{% capture difference %} +Interested in the **TBMQ Professional Edition**? Explore the TBMQ PE documentation [here](/docs/pe/mqtt-broker/){:target="_blank"}. +{% endcapture %} +{% include templates/info-banner.md content=difference %} +{% endif %} diff --git a/_includes/templates/mqtt-broker/pe-tbmq-feature-banner.md b/_includes/templates/mqtt-broker/pe-tbmq-feature-banner.md new file mode 100644 index 0000000000..efffcdfd27 --- /dev/null +++ b/_includes/templates/mqtt-broker/pe-tbmq-feature-banner.md @@ -0,0 +1,4 @@ +{% capture peFeatureContent %} +Only **TBMQ Professional Edition** supports **{{ feature }}** feature.
+{% endcapture %} +{% include templates/info-banner.md title="TBMQ PE feature" content=peFeatureContent %} \ No newline at end of file diff --git a/_includes/templates/mqtt-broker/security/user-password.md b/_includes/templates/mqtt-broker/security/user-password.md new file mode 100644 index 0000000000..d91d370fe0 --- /dev/null +++ b/_includes/templates/mqtt-broker/security/user-password.md @@ -0,0 +1,4 @@ +If a user signs in using [OAuth 2.0](/docs/pe/mqtt-broker/security/oauth-2-support/#basic-mapper) while the **Allow user creation** option is enabled, the user account is automatically created in the system. +These users are created without a password set and can continue using Single Sign-On (SSO) to log in. +If the user wants to log in using a regular username/password flow, they should go to **Account → Security** and [set a new password](/docs/pe/mqtt-broker/user-guide/ui/settings/#change-password). +When changing the password, leave the **Current password** field empty. diff --git a/_includes/templates/mqtt-broker/ssl/tbmq-certificates-chain.md b/_includes/templates/mqtt-broker/ssl/tbmq-certificates-chain.md index 133ea31dbf..c06b924147 100644 --- a/_includes/templates/mqtt-broker/ssl/tbmq-certificates-chain.md +++ b/_includes/templates/mqtt-broker/ssl/tbmq-certificates-chain.md @@ -1,7 +1,7 @@ #### Step 1. Prepare your server and client certificate chain -Follow the [MQTT over SSL](/docs/mqtt-broker/security/mqtts/) guide to provision server certificate if you are hosting your own TBMQ instance. +Follow the [MQTT over SSL](/docs/{{docsPrefix}}mqtt-broker/security/mqtts/) guide to provision server certificate if you are hosting your own TBMQ instance. Once provisioned, you should prepare a CA root certificate in pem format. This certificate will be used by MQTT clients to validate the server certificate. Save the CA root certificate to your working directory as "**ca.pem**". @@ -193,7 +193,7 @@ If the certificate is issued by a well-known public CA, it is already trusted by If both TBMQ and the clients use certificates issued by the same CA, no additional configuration is required. If it is another private or internal CA, you must add the CA certificate (`rootCert.pem`) to the Java truststore used by TBMQ. -Run the [following command](/docs/mqtt-broker/security/mqtts/#adding-certificate-into-java-truststore) to import the CA certificate into the truststore. +Run the [following command](/docs/{{docsPrefix}}mqtt-broker/security/mqtts/#adding-certificate-into-java-truststore) to import the CA certificate into the truststore. #### Step 5. Test the connection @@ -205,7 +205,7 @@ mosquitto_pub --cafile ca.pem -d -q 1 -h "YOUR_TBMQ_HOST" -p "8883" \ ``` {: .copy-code} -Similar command for the [self-signed](/docs/mqtt-broker/security/mqtts/#self-signed-certificates-generation) server certificate: +Similar command for the [self-signed](/docs/{{docsPrefix}}mqtt-broker/security/mqtts/#self-signed-certificates-generation) server certificate: ```bash mosquitto_pub --insecure --cafile server.pem -d -q 1 -h "YOUR_TBMQ_HOST" -p "8883" \ diff --git a/_includes/templates/mqtt-broker/ssl/tbmq-certificates-leaf.md b/_includes/templates/mqtt-broker/ssl/tbmq-certificates-leaf.md index 09479846db..c6e8562bcf 100644 --- a/_includes/templates/mqtt-broker/ssl/tbmq-certificates-leaf.md +++ b/_includes/templates/mqtt-broker/ssl/tbmq-certificates-leaf.md @@ -1,7 +1,7 @@ #### Step 1. Prepare your server and client certificate -Follow the [MQTT over SSL](/docs/mqtt-broker/security/mqtts/) guide to provision server certificate if you are hosting your own TBMQ instance. +Follow the [MQTT over SSL](/docs/{{docsPrefix}}mqtt-broker/security/mqtts/) guide to provision server certificate if you are hosting your own TBMQ instance. Once provisioned, you should prepare a CA root certificate in pem format. This certificate will be used by MQTT clients to validate the server certificate. Save the CA root certificate to your working directory as "**ca.pem**". @@ -40,7 +40,7 @@ For the MQTT client to establish a secure TLS connection, its certificate must b If the certificate is signed by a well-known public CA, it is already trusted by default. If it is a self-signed, import the client certificate (`cert.pem`) into the Java truststore used by TBMQ. -Run the [following command](/docs/mqtt-broker/security/mqtts/#adding-certificate-into-java-truststore) to import the certificate into the truststore. +Run the [following command](/docs/{{docsPrefix}}mqtt-broker/security/mqtts/#adding-certificate-into-java-truststore) to import the certificate into the truststore. #### Step 5. Test the connection diff --git a/_includes/templates/mqtt-broker/troubleshooting/logs/view-logs/docker-compose-view-logs.md b/_includes/templates/mqtt-broker/troubleshooting/logs/view-logs/docker-compose-view-logs.md index 878a6370f8..0c6211f318 100644 --- a/_includes/templates/mqtt-broker/troubleshooting/logs/view-logs/docker-compose-view-logs.md +++ b/_includes/templates/mqtt-broker/troubleshooting/logs/view-logs/docker-compose-view-logs.md @@ -1,14 +1,14 @@ View last logs in runtime: ```bash -docker compose logs -f tb-mqtt-broker-1 tb-mqtt-broker-2 +docker compose logs -f tbmq-1 tbmq-2 ``` {: .copy-code} {% capture dockerComposeStandalone %} If you still rely on Docker Compose as docker-compose (with a hyphen) execute next command: -**docker-compose logs -f tb-mqtt-broker-1 tb-mqtt-broker-2** +**docker-compose logs -f tbmq-1 tbmq-2** {% endcapture %} {% include templates/info-banner.md content=dockerComposeStandalone %} @@ -16,32 +16,32 @@ You can use **grep** command to show only the output with desired string in it. For example, you can use the following command in order to check if there are any errors on the backend side: ```bash -docker compose logs tb-mqtt-broker-1 tb-mqtt-broker-2 | grep ERROR +docker compose logs tbmq-1 tbmq-2 | grep ERROR ``` {: .copy-code} {% capture dockerComposeStandalone %} If you still rely on Docker Compose as docker-compose (with a hyphen) execute next command: -**docker-compose logs tb-mqtt-broker-1 tb-mqtt-broker-2 \| grep ERROR** +**docker-compose logs tbmq-1 tbmq-2 \| grep ERROR** {% endcapture %} {% include templates/info-banner.md content=dockerComposeStandalone %} **Tip:** you can redirect logs to file and then analyze with any text editor: ```bash -docker compose logs -f tb-mqtt-broker-1 tb-mqtt-broker-2 > tb-mqtt-broker.log +docker compose logs -f tbmq-1 tbmq-2 > tbmq.log ``` {: .copy-code} {% capture dockerComposeStandalone %} If you still rely on Docker Compose as docker-compose (with a hyphen) execute next command: -**docker-compose logs -f tb-mqtt-broker-1 tb-mqtt-broker-2 > tb-mqtt-broker.log** +**docker-compose logs -f tbmq-1 tbmq-2 > tbmq.log** {% endcapture %} {% include templates/info-banner.md content=dockerComposeStandalone %} -**Note:** you can always log into TBMQ container and view logs there: +**Note:** you can always log into the TBMQ container and view logs there: ```bash docker ps diff --git a/_includes/templates/mqtt-broker/troubleshooting/logs/view-logs/kubernetes-view-logs.md b/_includes/templates/mqtt-broker/troubleshooting/logs/view-logs/kubernetes-view-logs.md index aff806dfc7..2b1ecd3beb 100644 --- a/_includes/templates/mqtt-broker/troubleshooting/logs/view-logs/kubernetes-view-logs.md +++ b/_includes/templates/mqtt-broker/troubleshooting/logs/view-logs/kubernetes-view-logs.md @@ -35,7 +35,7 @@ kubectl logs -f tb-broker-1 > tb-broker-1.log ``` {: .copy-code} -**Note:** you can always log into TBMQ container and view logs there: +**Note:** you can always log into the TBMQ container and view logs there: ```bash kubectl exec -it tb-broker-0 -- bash diff --git a/_includes/templates/mqtt-broker/upgrade/update-to-2.1.0-release-aws-cluster.md b/_includes/templates/mqtt-broker/upgrade/update-to-2.1.0-release-aws-cluster.md index fbdf807c13..8d49d4223c 100644 --- a/_includes/templates/mqtt-broker/upgrade/update-to-2.1.0-release-aws-cluster.md +++ b/_includes/templates/mqtt-broker/upgrade/update-to-2.1.0-release-aws-cluster.md @@ -2,7 +2,7 @@ TBMQ v2.1.0 introduces enhancements, including a new Integration Executor micros #### Add Integration Executor microservice -This release adds support for external integrations via the new [Integration Executor](/docs/mqtt-broker/integrations/) microservice. +This release adds support for external integrations via the new [Integration Executor](/docs/{{docsPrefix}}mqtt-broker/integrations/) microservice. To retrieve the latest configuration files, including those for Integration Executors, pull the updates from the release branch. Follow the steps outlined in the [run upgrade instructions](#run-upgrade) up to the execution of the upgrade script (do not execute **.sh** commands yet). diff --git a/_includes/templates/mqtt-broker/upgrade/update-to-2.1.0-release-cluster.md b/_includes/templates/mqtt-broker/upgrade/update-to-2.1.0-release-cluster.md index 7b93d549fa..9da6618bf2 100644 --- a/_includes/templates/mqtt-broker/upgrade/update-to-2.1.0-release-cluster.md +++ b/_includes/templates/mqtt-broker/upgrade/update-to-2.1.0-release-cluster.md @@ -2,7 +2,7 @@ TBMQ v2.1.0 introduces enhancements, including a new Integration Executor micros #### Add Integration Executor microservice -This release adds support for external integrations via the new [Integration Executor](/docs/mqtt-broker/integrations/) microservice. +This release adds support for external integrations via the new [Integration Executor](/docs/{{docsPrefix}}mqtt-broker/integrations/) microservice. To retrieve the latest configuration files, including those for Integration Executors, pull the updates from the release branch. Follow the steps outlined in the [run upgrade instructions](#run-upgrade) up to the execution of the upgrade script (do not execute **.sh** commands yet). diff --git a/_includes/templates/mqtt-broker/upgrade/update-to-2.1.0-release-docker-cluster.md b/_includes/templates/mqtt-broker/upgrade/update-to-2.1.0-release-docker-cluster.md index 8f878779ed..de6e391bb2 100644 --- a/_includes/templates/mqtt-broker/upgrade/update-to-2.1.0-release-docker-cluster.md +++ b/_includes/templates/mqtt-broker/upgrade/update-to-2.1.0-release-docker-cluster.md @@ -2,7 +2,7 @@ TBMQ v2.1.0 introduces enhancements, including a new Integration Executor micros #### Add Integration Executor microservice -This release adds support for external integrations via the new [Integration Executor](/docs/mqtt-broker/integrations/) microservice. +This release adds support for external integrations via the new [Integration Executor](/docs/{{docsPrefix}}mqtt-broker/integrations/) microservice. For the complete updated `docker-compose.yml`, see the [official example here](https://github.com/thingsboard/tbmq/blob/release-2.1.0/docker/docker-compose.yml). diff --git a/_includes/templates/mqtt-broker/upgrade/update-to-2.1.0-release.md b/_includes/templates/mqtt-broker/upgrade/update-to-2.1.0-release.md index c5ea7eb831..8ce1c1ad4f 100644 --- a/_includes/templates/mqtt-broker/upgrade/update-to-2.1.0-release.md +++ b/_includes/templates/mqtt-broker/upgrade/update-to-2.1.0-release.md @@ -2,7 +2,7 @@ TBMQ v2.1.0 introduces enhancements, including a new Integration Executor micros #### Add Integration Executor microservice -This release adds support for external integrations via the new [Integration Executor](/docs/mqtt-broker/integrations/) microservice. +This release adds support for external integrations via the new [Integration Executor](/docs/{{docsPrefix}}mqtt-broker/integrations/) microservice.
diff --git a/_includes/templates/mqtt-broker/upgrade/upgrading.md b/_includes/templates/mqtt-broker/upgrade/upgrading.md index f72f39c2b8..5a17324ebb 100644 --- a/_includes/templates/mqtt-broker/upgrade/upgrading.md +++ b/_includes/templates/mqtt-broker/upgrade/upgrading.md @@ -1,7 +1,9 @@ -Review the [release notes](/docs/mqtt-broker/releases/) and [upgrade instruction](/docs/mqtt-broker/install/upgrade-instructions/) +Review the [release notes](/docs/{{docsPrefix}}mqtt-broker/releases/) and [upgrade instruction](/docs/{{docsPrefix}}mqtt-broker/install/upgrade-instructions/) for detailed information on the latest changes. +{% if docsPrefix == null %} If there are no **Upgrade to x.x.x** notes for your version, you can proceed directly with the general [upgrade instructions](#run-upgrade). +{% endif %} If the documentation does not cover the specific upgrade instructions for your case, -please [contact us](/docs/mqtt-broker/help/) so we can provide further guidance. +please [contact us](/docs/{{docsPrefix}}mqtt-broker/help/) so we can provide further guidance. diff --git a/_layouts/docwithnav-pe-mqtt-broker.html b/_layouts/docwithnav-pe-mqtt-broker.html new file mode 100644 index 0000000000..2b1fbe11b9 --- /dev/null +++ b/_layouts/docwithnav-pe-mqtt-broker.html @@ -0,0 +1 @@ +{% include docwithnav.html docsTag="mqtt-broker-pe" cssTag="docs" %} \ No newline at end of file diff --git a/_layouts/mqtt-broker.html b/_layouts/mqtt-broker.html index 6c1e2136ac..a62f902f1f 100644 --- a/_layouts/mqtt-broker.html +++ b/_layouts/mqtt-broker.html @@ -6,8 +6,7 @@
-

TBMQ

-

Open-source MQTT Broker

+

TBMQ
Open-source MQTT Broker

Scalable, fault-tolerant, and durable messaging for millions of MQTT clients

Contact us diff --git a/_sass/_docs.sass b/_sass/_docs.sass index 934a780aaf..b3d90e2eec 100644 --- a/_sass/_docs.sass +++ b/_sass/_docs.sass @@ -40,6 +40,10 @@ --tb-main-background: rgba(31, 139, 77, 0.08) --tb-main-color-filter: invert(25%) sepia(43%) saturate(5965%) hue-rotate(143deg) brightness(97%) contrast(76%) &.mqtt-broker + --tb-main-color: #305680 + --tb-main-background: rgba(48, 86, 128, 0.08) + --tb-main-color-filter: invert(29%) sepia(61%) saturate(478%) hue-rotate(171deg) brightness(94%) contrast(93%) + &.mqtt-broker-pe --tb-main-color: #1F8B4D --tb-main-background: rgba(31, 139, 77, 0.08) --tb-main-color-filter: invert(25%) sepia(43%) saturate(5965%) hue-rotate(143deg) brightness(97%) contrast(76%) diff --git a/docs/mqtt-broker/architecture-details/persistent-device-client.md b/docs/mqtt-broker/architecture-details/persistent-device-client.md index 535466b578..4be9c6bb4c 100644 --- a/docs/mqtt-broker/architecture-details/persistent-device-client.md +++ b/docs/mqtt-broker/architecture-details/persistent-device-client.md @@ -23,319 +23,4 @@ jedis-to-lettuce: --- -* TOC -{:toc} - -In TBMQ 1.x, persistent DEVICE clients relied on PostgreSQL for message persistence and retrieval, -ensuring that messages were delivered when a client reconnected. -While PostgreSQL performed well initially, it had a fundamental limitation — it could only scale vertically. -We anticipated that as the number of persistent MQTT sessions grew, PostgreSQL’s architecture would eventually become a bottleneck. -To address this, we explored more scalable alternatives capable of handling the increasing demands of our MQTT broker. -Redis was quickly chosen as the best fit due to its horizontal scalability, native clustering support, and widespread adoption. - -## Postgres Usage and Limitations - -To fully understand the reasoning behind this shift, it’s important to first examine how MQTT clients operated within the PostgreSQL architecture. This architecture was built around two key tables. - -The `device_session_ctx` table was responsible for maintaining the session state of each persistent MQTT client: - -```postgresql - Table "public.device_session_ctx" - Column | Type | Collation | Nullable | Default ---------------------+------------------------+-----------+----------+--------- - client_id | character varying(255) | | not null | - last_updated_time | bigint | | not null | - last_serial_number | bigint | | | - last_packet_id | integer | | | -Indexes: - "device_session_ctx_pkey" PRIMARY KEY, btree (client_id) -``` - -The key columns are `last_packet_id` and `last_serial_number`, which is used to maintain message order for persistent MQTT clients: - - - `last_packet_id` represents the packet ID of the last MQTT message received. - - `last_serial_number` acts as a continuously increasing counter, preventing message order issues when the MQTT packet ID wraps around after reaching its limit of `65535`. - -The `device_publish_msg` table was responsible for storing messages that must be published to persistent MQTT clients (subscribers). - -```postgresql - Table "public.device_publish_msg" - Column | Type | Collation | Nullable | Default ---------------------------+------------------------+-----------+----------+--------- - client_id | character varying(255) | | not null | - serial_number | bigint | | not null | - topic | character varying | | not null | - time | bigint | | not null | - packet_id | integer | | | - packet_type | character varying(255) | | | - qos | integer | | not null | - payload | bytea | | not null | - user_properties | character varying | | | - retain | boolean | | | - msg_expiry_interval | integer | | | - payload_format_indicator | integer | | | - content_type | character varying(255) | | | - response_topic | character varying(255) | | | - correlation_data | bytea | | | -Indexes: - "device_publish_msg_pkey" PRIMARY KEY, btree (client_id, serial_number) - "idx_device_publish_msg_packet_id" btree (client_id, packet_id) -``` - -The key columns to highlight: - - - `time` – captures the system time (timestamp) when the message is stored. This field is used for periodic cleanup of expired messages. - - `msg_expiry_interval` – represents the expiration time (in seconds) for a message. - This is set only for incoming MQTT 5.0 messages that include an expiry property. - If the expiry property is absent, the message does not have a specific expiration time and remains valid until it is removed by time or size-based cleanup. - -Together, these tables managed message persistence and session state. -The `device_session_ctx` table was designed for fast retrieval of the last MQTT packet ID and serial number stored for each persistent MQTT client. -When messages for a client are received from a shared Kafka topic, the broker queries this table to fetch the latest values. -These values are incremented sequentially and assigned to each message before being saved to the `device_publish_msg` table. - -While this design ensured reliable message delivery, it also introduced performance constraints. -Based on the TimescaleDB blog [post](https://www.timescale.com/blog/postgresql-timescaledb-1000x-faster-queries-90-data-compression-and-much-more#ingest-performance) -vanilla PostgreSQL can handle up to 300k inserts per second under ideal conditions. -However, this performance depends on factors such as hardware, workload, and table schema. -While vertical scaling can provide some improvement, PostgreSQL’s per-table insert throughput eventually reaches a hard limit. - -## Redis as a Scalable Alternative - -Our decision to migrate to Redis was driven by its ability to address the core performance bottlenecks encountered with PostgreSQL. -Unlike PostgreSQL, which relies on disk-based storage and vertical scaling, Redis operates primarily in memory, significantly reducing read and write latency. -Additionally, Redis’s distributed architecture allows TBMQ to scale horizontally, keeping the retrieval and delivery of persistent messages efficient even as the number of client sessions and stored messages grows. - -With these benefits in mind, we started our migration process with an evaluation of data structures that could preserve the functionality of the PostgreSQL approach -while aligning with Redis Cluster constraints to enable efficient horizontal scaling. -This also presented an opportunity to improve certain aspects of the original design, such as periodic cleanups, by leveraging Redis features like built-in expiration mechanisms. - -### Redis Cluster Constraints - -When migrating from PostgreSQL to Redis, we recognized that replicating the existing data model would require multiple Redis data structures to efficiently handle message persistence and ordering. -This, in turn, meant using multiple keys for each persistent MQTT Client session. - -{% include images-gallery.html imageCollection="redis-cluster-constraints" %} - -Redis Cluster distributes data across multiple slots to enable horizontal scaling. -However, multi-key operations must access keys within the same slot. -If the keys reside in different slots, the operation triggers a cross-slot error, preventing the command from executing. -We used the persistent MQTT client ID as a [hash tag](https://redis.io/docs/latest/operate/oss_and_stack/reference/cluster-spec/#hash-tags) in our key names to address this. -By enclosing the client ID in curly braces `{}`, Redis ensures that all keys for the same client are hashed to the same slot. -This guarantees that related data for each client stays together, allowing multi-key operations to proceed without errors. - -### Atomic Operations via Lua Scripts - -Consistency is critical in a high-throughput environment like TBMQ, where many messages can arrive simultaneously for the same MQTT client. -Hashtagging helps to avoid cross-slot errors, but without atomic operations, there is a risk of race conditions or partial updates. -This could lead to message loss or incorrect ordering. It is important to make sure that operations updating the keys for the same MQTT client are atomic. - -Redis is designed to execute individual commands atomically. -However, in our case, we need to update multiple data structures as part of a single operation for each MQTT client. -Executing these sequentially without atomicity opens the door to inconsistencies if another process modifies the same data in between commands. -That’s where [Lua scripting](https://redis.io/docs/latest/develop/interact/programmability/eval-intro/) comes in. Lua script executes as a single, isolated unit. -During script execution, no other commands can run concurrently, ensuring that the operations inside the script happen atomically. - -Based on this information, we decided that for any operation, such as saving messages or retrieving undelivered messages upon reconnection, we will execute a separate Lua script. -This ensures that all operations within a single Lua script reside in the same hash slot, maintaining atomicity and consistency. - -### Redis Data Structures - -One of the key requirements of the migration was maintaining message order, a task previously handled by the `serial_number` column in PostgreSQL’s `device_publish_msg` table. -After evaluating various Redis data structures, we determined that [sorted sets](https://redis.io/docs/latest/develop/data-types/sorted-sets/) (ZSETs) were the ideal replacement. - -Redis sorted sets naturally organize data by score, enabling quick retrieval of messages in ascending or descending order. -While sorted sets provided an efficient way to maintain message order, storing full message payloads directly in sorted sets led to excessive memory usage. -Redis does not support per-member TTL within sorted sets. As a result, messages persisted indefinitely unless explicitly removed. -Similar to PostgreSQL, we had to perform periodic cleanups using `ZREMRANGEBYSCORE` to delete expired messages. -This operation carries a complexity of `O(log N + M)`, where `M` is the number of elements removed. -To overcome this limitation, we decided to store message payloads using strings data structure while storing in the sorted set references to these keys. - -{% include images-gallery.html imageCollection="redis-data-structures" %} - -In the image above, you can see that each key follows the pattern `{client_id}_messages`, -where `client_id` is a placeholder for the actual client ID, -while the curly braces `{}` around it are added to create a hashtag. -Also, you may notice that the score continues to grow even when the MQTT packet ID wraps around. - -Let’s take a closer look at the details illustrated in this image. -At first, the reference for the message with the MQTT packet ID equal to `65534` was added to the sorted set: - -```bash -ZADD {client_id}_messages 65534 {client_id}_messages_65534 -``` -{: .copy-code} - -Here, `{client_id}_messages` is the sorted set key name, where `{client_id}` acts as a hashtag derived from the persistent MQTT client’s unique ID. -The suffix `_messages` is a constant added to each sorted set key name for consistency. -Following the sorted set key name, the score value `65534` corresponds to the MQTT packet ID of the message received by the client. -Finally, we see the reference key that points to the actual payload of the MQTT message. -Similar to the sorted set key, the message reference key uses the MQTT client’s ID as a hashtag, followed by the `_messages` suffix and the MQTT packet ID value. - -In the next iteration, we add the message reference for the MQTT message with a packet ID equal to `65535` into the sorted set. This is the maximum packet ID, as the range is limited to `65535`. - -```bash -ZADD {client_id}_messages 65535 {client_id}_messages_65535 -``` -{: .copy-code} - -So at the next iteration MQTT packet ID should be equal to `1`, while the score should continue to grow and be equal to `65536`. - -```bash -ZADD {client_id}_messages 65536 {client_id}_messages_1 -``` -{: .copy-code} - -This approach ensures that the message’s references will be properly ordered in the sorted set regardless of the packet ID’s limited range. - -Message payloads are stored as string values with `SET` commands that support expiration `(EX)`, providing `O(1)` complexity for writes and `TTL` applications: - -```bash -SET {client_id}_messages_1 "{ - \"packetType\":\"PUBLISH\", - \"payload\":\"eyJkYXRhIjoidGJtcWlzYXdlc29tZSJ9\", - \"time\":1736333110026, - \"clientId\":\"client\", - \"retained\":false, - \"packetId\":1, - \"topicName\":\"europe/ua/kyiv/client/0\", - \"qos\":1 -}" EX 600 -``` -{: .copy-code} - -Another benefit aside from efficient updates and `TTL` applications is that the message payloads can be retrieved: - -```bash -GET {client_id}_messages_1 -``` -{: .copy-code} - -or removed: - -```bash -DEL {client_id}_messages_1 -``` -{: .copy-code} - -with constant complexity `O(1)` without affecting the sorted set structure. - -Another very important element of our Redis architecture is the use of a string key to store the last MQTT packet ID processed: - -```bash -GET {client_id}_last_packet_id -"1" -``` -{: .copy-code} - -This approach serves the same purpose as in the PostgreSQL solution. -When a client reconnects, the server must determine the correct packet ID to assign to the next message that will be saved in Redis. -Initially, we considered using the sorted set’s highest score as a reference. -However, since there are scenarios where the sorted set could be empty or completely removed, -we concluded that the most reliable solution is to store the last packet ID separately. - -### Managing Sorted Set Size Dynamically - -This hybrid approach, leveraging sorted sets and string data structures, eliminates the need for periodic cleanups based on time, as per-message TTLs are now applied. -In addition, following the PostgreSQL design we needed to address somehow the cleanup of the sorted set based on the messages limit set in the configuration. - -```yaml -# Maximum number of PUBLISH messages stored for each persisted DEVICE client -limit: "${MQTT_PERSISTENT_SESSION_DEVICE_PERSISTED_MESSAGES_LIMIT:10000}" -``` -{: .copy-code} - -This limit is an important part of our design, allowing us to control and predict the memory allocation required for each persistent MQTT client. -For example, a client might connect, triggering the registration of a persistent session, and then rapidly disconnect. -In such scenarios, it is essential to ensure that the number of messages stored for the client (while waiting for a potential reconnection) remains within the defined limit, preventing unbounded memory usage. - -```java -if (messagesLimit > 0xffff) { - throw new IllegalArgumentException("Persisted messages limit can't be greater than 65535!"); -} -``` -{: .copy-code} - -To reflect the natural constraints of the MQTT protocol, the maximum number of persisted messages for individual clients is set to `65535`. - -To handle this within the Redis solution, we implemented dynamic management of the sorted set’s size. -When new messages are added, the sorted set is trimmed to ensure the total number of messages remains within the desired limit, and the associated strings are also cleaned up to free up memory. - -```lua --- Get the number of elements to be removed -local numElementsToRemove = redis.call('ZCARD', messagesKey) - maxMessagesSize --- Check if trimming is needed -if numElementsToRemove > 0 then - -- Get the elements to be removed (oldest ones) - local trimmedElements = redis.call('ZRANGE', messagesKey, 0, numElementsToRemove - 1) - -- Iterate over the elements and remove them - for _, key in ipairs(trimmedElements) do - -- Remove the message from the string data structure - redis.call('DEL', key) - -- Remove the message reference from the sorted set - redis.call('ZREM', messagesKey, key) - end -end -``` -{: .copy-code} - -### Message Retrieval and Cleanup - -Our design not only ensures dynamic size management during the persistence of new messages but also supports cleanup during message retrieval, -which occurs when a device reconnects to process undelivered messages. -This approach keeps the sorted set clean by removing references to expired messages. - -```lua --- Define the sorted set key -local messagesKey = KEYS[1] --- Define the maximum allowed number of messages -local maxMessagesSize = tonumber(ARGV[1]) --- Get all elements from the sorted set -local elements = redis.call('ZRANGE', messagesKey, 0, -1) --- Initialize a table to store retrieved messages -local messages = {} --- Iterate over each element in the sorted set -for _, key in ipairs(elements) do - -- Check if the message key still exists in Redis - if redis.call('EXISTS', key) == 1 then - -- Retrieve the message value from Redis - local msgJson = redis.call('GET', key) - -- Store the retrieved message in the result table - table.insert(messages, msgJson) - else - -- Remove the reference from the sorted set if the key does not exist - redis.call('ZREM', messagesKey, key) - end -end --- Return the retrieved messages -return messages -``` -{: .copy-code} - -By leveraging Redis’ sorted sets and strings, along with Lua scripting for atomic operations, our new design achieves efficient message persistence and retrieval, as well as dynamic cleanup. -This design addresses the scalability limitations of the PostgreSQL-based solution. - -## Migration from Jedis to Lettuce - -To validate the scalability of the new Redis-based architecture for persistent message storage, we selected a point-to-point (P2P) MQTT communication pattern as a performance testing scenario. -Unlike fan-in (many-to-one) or fan-out (one-to-many) scenarios, the P2P pattern typically involves one-to-one communication and creates a new persistent session for each communicating pair. -This makes it well-suited for evaluating how the system scales as the number of sessions grows. - -Before starting large-scale tests, we conducted a prototype test that revealed the limit of 30k msg/s throughput when using PostgreSQL for persistence message storage. -At the moment of migration to Redis, we used the Jedis library for Redis interactions, primarily for cache management. -As a result, we initially decided to extend Jedis to handle message persistence for persistent MQTT clients. -However, the initial results of the Redis implementation with Jedis were unexpected. -While we anticipated Redis would significantly outperform PostgreSQL, the performance improvement was modest, reaching only 40k msg/s throughput compared to the 30k msg/s limit with PostgreSQL. - -This led us to investigate the bottlenecks, where we discovered that Jedis was a limiting factor. -While reliable, Jedis operate synchronously, processing each Redis command sequentially. -This forces the system to wait for one operation to complete before executing the next. -In high-throughput environments, this approach significantly limited Redis’s potential, preventing the full utilization of system resources. -To overcome this limitation, we migrated to [Lettuce](https://github.com/redis/lettuce), an asynchronous Redis client built on top of [Netty](https://github.com/netty/netty). -With Lettuce, our throughput increased to 60k msg/s, demonstrating the benefits of non-blocking operations and improved parallelism. - -{% include images-gallery.html imageCollection="jedis-to-lettuce" %} - -Lettuce allows multiple commands to be sent and processed in parallel, fully exploiting Redis’s capacity for concurrent workloads. -Ultimately, the migration unlocked the performance gains we expected from Redis, paving the way for successful P2P testing at scale. -For a deep dive into the testing architecture, methodology, and results, check out our detailed performance testing [article](/docs/mqtt-broker/reference/1m-throughput-p2p-performance-test). +{% include docs/mqtt-broker/architecture-details/persistent-device-client.md %} \ No newline at end of file diff --git a/docs/mqtt-broker/architecture.md b/docs/mqtt-broker/architecture.md index 106e834a3b..05e0bb3c00 100644 --- a/docs/mqtt-broker/architecture.md +++ b/docs/mqtt-broker/architecture.md @@ -5,338 +5,4 @@ description: TBMQ architecture --- -* TOC -{:toc} - -## Introduction - -This article explains the architectural structure of TBMQ, breaking down how data moves between different components and outlining the core architectural choices. -TBMQ is designed with great care to implement the following attributes: - -* **Scalability**: it is a horizontally scalable platform constructed using cutting-edge open-source technologies; -* **Fault tolerance**: no single point of failure; each broker (node) within the cluster is identical in terms of functionality; -* **Robustness and efficiency**: can manage millions of clients and process millions of messages per second; -* **Durability**: provides high message durability, ensuring that data is never lost. - -### Architecture diagram - -The following diagram shows the pivotal parts of the broker and the route of message transmission. - -![image](/images/mqtt-broker/architecture/tbmq-architecture.png) - -## Motivation - -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. - -* 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. - -* 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. - -> 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. - -To ensure the fulfillment of the above requirements and prevent message loss in the case of clients or some of the broker instances failures, -TBMQ uses the powerful capabilities of [Kafka](https://kafka.apache.org/) as its underlying infrastructure. - -## How does TBMQ work in a nutshell? - -Kafka plays a crucial role in various stages of the MQTT message processing. -All unprocessed published messages, client sessions, and subscriptions are stored within dedicated Kafka topics. -A comprehensive list of Kafka topics used within TBMQ is available [here](#kafka-topics). -All broker nodes can readily access the most up-to-date state of client sessions and subscriptions by utilizing these topics. -They maintain local copies of sessions and subscriptions for efficient message processing and delivery. -When a client loses connection to a specific broker node, other nodes can seamlessly continue operations based on the latest state. -Additionally, newly added broker nodes to the cluster get this vital information upon their activation. - -Client subscriptions hold significant importance within the MQTT publish/subscribe pattern. -TBMQ employs the [Trie](#subscriptions-trie) data structure to optimize performance, -enabling efficient persistence of client subscriptions in memory and facilitating swift access to relevant topic patterns. - -Upon a publisher client sending a _PUBLISH_ message, it is stored in the initial Kafka topic, **tbmq.msg.all**. -Once Kafka acknowledges the message’s persistence, -the broker promptly responds to the publisher with either a _PUBACK/PUBREC_ message or no response at all, depending on the chosen QoS level. - -Subsequently, separate threads, functioning as Kafka consumers, retrieve messages from the mentioned Kafka topic and -utilize the Subscription Trie data structure to identify the intended recipients. -Depending on the client type (**DEVICE** or **APPLICATION**) and the persistence options described below, -the broker either redirects the message to another specific Kafka topic or directly delivers it to the recipient. - -### Non-persistent client - -![image](/images/mqtt-broker/architecture/tbmq-non-persistent-dev.png) - -A client is classified as a non-persistent one when the following conditions are met in the _CONNECT_ packet: - -For **MQTT v3.x**: -* `clean_session` flag is set to _true_. - -For **MQTT v5**: -* `clean_start` flag is set to _true_ and `sessionExpiryInterval` is set to _0_ or not specified. - -In the case of non-persistent clients, all messages intended for them are published directly without undergoing additional persistence. -It is important to note that non-persistent clients can only be of type **DEVICE**. - -**Non-persistent DEVICE processing in cluster mode** - -![image](/images/mqtt-broker/architecture/tbmq-non-persist-dev-cluster.png) - -In cluster mode, multiple TBMQ nodes can operate together, each running Kafka consumers in the same consumer group for the **tbmq.msg.all** topic. -This approach ensures efficient load balancing and message distribution across nodes. -However, it can result in scenarios where a published message is processed by one TBMQ node while the intended subscriber is connected to another. -To handle this, **downlink.basic** Kafka topic is used for communication between TBMQ nodes. -This ensures that the node processing the message forwards it to the target node, which then delivers it to the subscriber via the established connection. - -### Persistent client - -MQTT clients that do not meet the non-persistent conditions mentioned above are categorized as persistent clients. -Let's delve into the conditions for persistent clients: - -For **MQTT v3.x**: -* `clean_session` flag is set to _false_. - -For **MQTT v5 clients**: -* `sessionExpiryInterval` is greater than _0_ (regardless of the `clean_start` flag). -* `clean_start` flag is set to _false_ and `sessionExpiryInterval` is set to _0_ or not specified. - -Building on our knowledge within the IoT ecosystem and the successful implementation of numerous IoT use cases, we have classified MQTT clients into two distinct categories: - -* The _DEVICE_ clients primarily engaged in publishing a significant volume of messages while subscribing to a limited number of topics with relatively low message rates. - These clients are typically associated with IoT devices or sensors. - -* The _APPLICATION_ clients specialize in subscribing to topics with high message rates. - They often require messages to be persisted when the client is offline with later delivery, ensuring the availability of crucial data. - These clients are commonly used for real-time analytics, data processing, or other application-level functionalities. - -Consequently, we made a strategic decision to optimize performance by separating the processing flow for these two types of clients. - -#### Persistent DEVICE client - -![image](/images/mqtt-broker/architecture/tbmq-persistent-dev.png) - -For DEVICE persistent clients, we use the **tbmq.msg.persisted** Kafka topic as a means of processing published messages that are extracted from the **tbmq.msg.all** topic. -This design separates the handling of persistent messages from other message types, ensuring a clear and efficient workflow. -Dedicated threads, functioning as Kafka consumers, retrieve these messages and store them in a [Redis](#redis) database utilized for persistence storage. -This method is particularly suitable for DEVICE clients, as they typically do not require extensive message reception. -This approach helps us recover stored messages smoothly when a client reconnects. At the same time, it ensures great performance for scenarios involving a moderate incoming message rate. - -A detailed breakdown of how we use Redis as persistent message storage for DEVICE clients is available [here](/docs/mqtt-broker/architecture-details/persistent-device-client/). - -**Persistent DEVICE processing in cluster mode** - -![image](/images/mqtt-broker/architecture/tbmq-persist-dev-cluster.png) - -Similarly to non-persistent clients, TBMQ nodes in cluster mode operate together, running Kafka consumers in the same group for the **tbmq.msg.persisted** topic. -To handle cases where a message is processed by one node but the subscriber is connected to another, **downlink.persisted** Kafka topic is used to forward the message to the appropriate node. -This ensures seamless delivery to the subscriber via its established connection. - -#### Persistent APPLICATION client - -![image](/images/mqtt-broker/architecture/tbmq-app.png) - -The number of APPLICATION clients corresponds to the number of Kafka topics used. -The latest version of Kafka can handle millions of topics, making this design suitable even for the largest enterprise use cases. - -Any message read from the **tbmq.msg.all** topic meant for a specific APPLICATION client is then stored in the corresponding Kafka topic. -A separate thread (Kafka consumer) is assigned to each APPLICATION. -These threads retrieve messages from the corresponding Kafka topics and deliver them to the respective clients. -This approach significantly improves performance by ensuring efficient message delivery. -Additionally, the nature of the Kafka consumer group makes the [MQTT 5 shared subscription](/docs/mqtt-broker/user-guide/shared-subscriptions/#application-client-type) feature extremely efficient for APPLICATION clients. - -APPLICATION clients can handle a large volume of received messages, reaching millions per second. -It is important to note that APPLICATION clients can only be classified as [persistent](#persistent-client). - -> For both types of clients, we provide configurable instruments to control the persistence of messages per client and the duration for which they are stored. -> You can refer to the following environment variables to adjust these settings: ->* TB_KAFKA_APP_PERSISTED_MSG_TOPIC_PROPERTIES; ->* MQTT_PERSISTENT_SESSION_DEVICE_PERSISTED_MESSAGES_LIMIT; ->* MQTT_PERSISTENT_SESSION_DEVICE_PERSISTED_MESSAGES_TTL. -> -> For more detailed information, please refer to the configurations provided in the following [documentation](/docs/mqtt-broker/install/config/). - -**Persistent APPLICATION processing in cluster mode** - -![image](/images/mqtt-broker/architecture/tbmq-app-cluster.png) - -APPLICATION clients function the same way in cluster mode as in standalone setup, eliminating the need for internode communication. -The processing of the message occurs directly on the target node, as a dedicated consumer for the APPLICATION client is created there once the client connects. -This design ensures seamless and rapid message delivery. -By avoiding additional message transmission steps, this approach ensures significantly improved performance, even as the system scales horizontally. - -### Kafka topics - -Below is a comprehensive list of Kafka topics used within TBMQ, along with their respective descriptions. - -* **tbmq.msg.all** - topic to store all published messages to the broker from MQTT clients. -* **tbmq.msg.app. + ${client_id}** - topic to store messages the APPLICATION client should receive based on its subscriptions. -* **tbmq.msg.app.shared. + ${topic_filter}** - topic to store messages the APPLICATION clients should receive based on their common shared subscription. -* **tbmq.msg.persisted** - topic to store messages the DEVICE persistent clients should receive based on their subscriptions. -* **tbmq.msg.retained** - topic to store all retained messages. Related to MQTT Retain messages feature. -* **tbmq.client.session** - topic to store sessions of all clients. -* **tbmq.client.subscriptions** - topic to store subscriptions of all clients. -* **tbmq.client.session.event.request** - topic to store events like _CONNECTION_REQUEST_, _DISCONNECTION_REQUEST_, _CLEAR_SESSION_REQUEST_, etc. for sessions of all clients. -* **tbmq.client.session.event.response. + ${service_id}** - topic to store responses to events of the previous topic sent to specific broker node where target client is connected. -* **tbmq.client.disconnect. + ${service_id}** - topic to store force client disconnection events (by admin request from UI/API or on sessions conflicts). -* **tbmq.msg.downlink.basic. + ${service_id}** - topic used to send messages from one broker node to another to which the DEVICE subscriber is currently connected. -* **tbmq.msg.downlink.persisted. + ${service_id}** - topic used to send messages from one broker node to another to which the DEVICE persistent subscriber is currently connected. -* **tbmq.sys.app.removed** - topic for events to process removal of APPLICATION client topic. Used when the client changes its type from APPLICATION to DEVICE. -* **tbmq.sys.historical.data** - topic for historical data statistics (e.g., number of incoming messages, outgoing messages, etc.) published from each broker node in the cluster to calculate the total values per cluster. -* **tbmq.client.blocked** - topic used to distribute and store the list of blocked clients, preventing them from establishing connections to the broker. -* **tbmq.sys.internode.notifications + ${service_id}** - topic for system-level notifications sent between broker nodes to synchronize authentication provider settings, authentication admin settings, and to trigger local client session cache cleanup. - -### Redis - -[Redis](https://redis.io/) is a powerful, in-memory data store that excels in scenarios requiring low-latency and high-throughput data access, making it an ideal choice for storing real-time data. - -In TBMQ, we utilize Redis to store messages for DEVICE persistent clients, allowing us to achieve high performance when handling the message persistence and delivery for these clients. -Redis's ability to manage large datasets in memory with lightning-fast read and write operations, combined with the scalability of Redis Cluster, -ensures that persistent messages can be retrieved and delivered efficiently, even as the volume of stored messages grows and system demands increase. -This scalability allows Redis to seamlessly handle larger workloads by distributing data across multiple nodes, maintaining high performance and reliability. - -{% capture tbmq-redis-postgresql %} -Before TBMQ v2.0, PostgreSQL was used for saving messages for DEVICE persistent clients. -We migrated to Redis in v2.0 to provide a more scalable and performant solution for message persistence due to PostgreSQL limitations in terms of handling a high volume of write operations. -This migration to Redis enables us to handle much higher throughput while ensuring fast, reliable message storage and delivery for DEVICE persistent clients. -{% endcapture %} -{% include templates/info-banner.md content=tbmq-redis-postgresql %} - -### PostgreSQL database - -TBMQ uses a [PostgreSQL](https://www.postgresql.org/) database to store different entities such as users, user credentials, MQTT client credentials, statistics, -WebSocket connections, WebSocket subscriptions, and others. - -PostgreSQL, known for its reliability, robustness, and flexibility, is a powerful open-source relational database management system that ensures data integrity while supporting high transaction throughput. -In TBMQ, PostgreSQL serves as the primary storage layer for persisting critical metadata about the system. -Given the nature of MQTT applications, which involve high message volumes and frequent read/write operations, -PostgreSQL's transaction management and ACID compliance provide strong consistency guarantees, -ensuring that important data is safely stored and retrievable in any scenarios. - -### Web UI - -TBMQ offers a user-friendly and lightweight graphical user interface (GUI) -that simplifies the administration of the broker in an intuitive and efficient manner. -This GUI provides several key features to facilitate broker management: - -* MQTT Client Credential Management: users can easily manage MQTT client credentials through the GUI, allowing for the creation, modification, and deletion of client credentials as needed. -* Client Session and Subscriptions Control: the GUI enables administrators to monitor and control the state of client sessions, including terminating, and managing active client connections. - It also provides functionality to manage client subscriptions, allowing for the addition, removal, and modification of subscriptions. -* Shared Subscription Management: the GUI includes tools for managing shared subscriptions. - Administrators can create and manage Application shared subscription entities, facilitating efficient message distribution to multiple subscribed clients of type APPLICATION. -* Retained Message Management: the GUI allows administrators to manage retained messages, which are messages that are saved by the broker and delivered to new subscribers. -* WebSocket Client: The GUI provides support for WebSocket client, allowing administrators to establish, monitor, and manage WebSocket connections. - This feature allows users to interact with TBMQ via MQTT over WebSocket, enabling them to efficiently debug and test their connections and message flows in real-time. - -In addition to these administrative features, the GUI provides monitoring dashboards that offer comprehensive statistics and insights into the broker's performance. -These dashboards provide key metrics and visualizations to facilitate real-time monitoring of essential broker statistics, -enabling administrators to gain a better understanding of the system's health and performance. - -The combination of these features makes the GUI an invaluable tool for managing, configuring, and monitoring TBMQ in a user-friendly and efficient manner. - -### Netty - -In our pursuit of leveraging cutting-edge technologies, we selected [Netty](https://netty.io/) for implementing the TCP server that facilitates the MQTT protocol, owing to its proven performance and flexibility. - -Netty is a high-performance, asynchronous event-driven network framework well-suited for building scalable and robust network applications, making it an excellent fit for handling MQTT traffic in TBMQ. -One of the primary reasons for choosing Netty is its efficient handling of large numbers of simultaneous connections. -In IoT environments, where thousands or even millions of devices are constantly connected and exchanging data, Netty's ability to handle concurrent connections with low resource consumption is invaluable. - -Netty uses non-blocking I/O (NIO), allowing it to efficiently manage resources without needing a dedicated thread for each connection, greatly reducing overhead. -This approach ensures high throughput and low-latency communication, even under heavy loads, making it ideal for the high demands of an MQTT broker like TBMQ. - -Netty is highly flexible, allowing developers to customize the networking stack to meet specific protocol requirements. -With its modular design, Netty provides the building blocks to easily implement protocol handling, message parsing, and connection management, while offering TLS encryption options, making it secure and extensible for future needs. - -### Actor system - -TBMQ utilizes an Actor System as the underlying mechanism for implementing actors responsible for handling MQTT clients. -The adoption of the Actor model enables efficient and concurrent processing of messages received from clients, thereby ensuring high-performance operation. - -The broker uses its own custom implementation of an Actor System, specifically designed to meet the requirements of TBMQ. -Within this system, two distinct types of actors are present: - -* **Client Actors**: for every connected MQTT client, a corresponding Client actor is created. - These actors are responsible for processing the main message types, such as _CONNECT_, _SUBSCRIBE_, _UNSUBSCRIBE_, _PUBLISH_, and others. - The Client actors handle the interactions with the MQTT clients and help the execution of the associated message operations. -* **Persisted Device Actors**: in addition to the Client actors, an extra Persisted Device actor is created for all DEVICE clients that are categorized as persistent. - These actors are specifically designated to manage the persistence-related operations and handle the storage and retrieval of messages for persistent DEVICE clients. - -With the Actor System and various actor types, TBMQ efficiently processes messages concurrently, ensuring optimal performance and quick responses when dealing with client interactions. - -For further insights into the Actor model, you can refer to the provided [link](https://en.wikipedia.org/wiki/Actor_model). - -### Message dispatcher service - -The Message dispatcher service is another core component of TBMQ's architecture, responsible for managing the flow of messages between publisher clients and Kafka, -ensuring safe processing, persistence, and efficient delivery to the appropriate subscribers. - -The primary role of the Message dispatcher service begins once the message from the publisher is received via the Actor system. -The service takes this message and publishes it to Kafka, ensuring that it is durably stored for safe processing and persistence. -This step guarantees that messages are not lost, even in the event of node failures or temporary disconnections, making Kafka a reliable backbone for handling high volumes of MQTT traffic. - -Once Kafka confirms the message is stored, the Message dispatcher service retrieves the message and leverages the [Subscription Trie](#subscriptions-trie) to analyze which subscribers are eligible to receive it. -After identifying the appropriate subscribers, the Message dispatcher service determines how to handle the message based on the type of subscriber: - -* [DEVICE Non-Persistent Client](#non-persistent-client): The message can be immediately delivered to the client. -* [DEVICE Persistent Client](#persistent-device-client): The message is published to DEVICE clients Kafka topic and later stored in Redis. -* [APPLICATION Persistent Client](#persistent-application-client): The message is published to dedicated Application Kafka topic. - -Once the appropriate handling route is determined and done for each subscriber, the message is passed to Netty, which manages the actual network transmission, -ensuring the message is delivered to the appropriate online clients. - -### Subscriptions Trie - -The Trie data structure is highly efficient for fast lookups due to its hierarchical organization and prefix-based matching. -It allows for quick identification of matching topics by storing common prefixes only once, which minimizes search space and reduces memory usage. -Its predictable time complexity, which depends on the length of the topic rather than the number of topics, ensures consistent and fast lookups even in large-scale environments with millions of subscriptions. - -Within TBMQ, all client subscriptions are consumed from a Kafka topic and stored in a Trie data structure in the memory. -The Trie organizes the topic filters hierarchically, with each node representing a level in the topic filter. - -When a _PUBLISH_ message is read from Kafka, the broker needs to identify all clients with relevant subscriptions for the topic name of the published message to ensure they receive the message. -The Trie data structure enables efficient retrieval of client subscriptions based on the topic name. -Once the relevant subscriptions are identified, a copy of the message is forwarded to each respective client. - -This approach ensures high-performance message processing as it allows for quick and precise determination of the clients that need to receive a specific message. -However, it is worth noting that this method requires increased memory consumption by the broker due to the storage of the Trie data structure. - -For more detailed information on the Trie data structure, you can refer to the provided [link](https://en.wikipedia.org/wiki/Trie). - -## Standalone vs cluster mode - -TBMQ is designed to be horizontally scalable, allowing for the addition of new broker nodes to the cluster automatically. -All nodes within the cluster are identical and share the overall load, ensuring a balanced distribution of client connections and message processing. - -The design of the broker eliminates the need for "master" or "coordinator" processes, as there is no hierarchy or central node responsible for managing the others. -This decentralized approach removes the presence of a single point of failure, enhancing the system's overall robustness and fault tolerance. - -To handle client connection requests, a load balancer of your choice can be used. -The load balancer distributes incoming client connections across all available TBMQ nodes, -evenly distributing the workload and maximizing resource utilization. - -In the event that a client loses its connection with a specific broker node (e.g., due to node shutdown, removal, or network failure), -it can easily reconnect to any other healthy node within the cluster. -This seamless reconnection capability ensures continuous operation and uninterrupted service for connected clients, -as they can establish connections with any available node in the cluster. - -By leveraging horizontal scalability, load balancing, and automatic discovery of new nodes, -TBMQ provides a highly scalable and resilient architecture for handling MQTT communication in large-scale deployments. - -## Programming languages - -The back end of TBMQ is implemented in Java 17. The front end of TBMQ is developed as a SPA using the Angular 19 framework. +{% include docs/mqtt-broker/architecture.md %} \ No newline at end of file diff --git a/docs/mqtt-broker/faq.md b/docs/mqtt-broker/faq.md index 7cd9422b94..7dce7aebad 100644 --- a/docs/mqtt-broker/faq.md +++ b/docs/mqtt-broker/faq.md @@ -5,4 +5,4 @@ description: TBMQ FAQ --- -{% include docs/mqtt-broker/faq.md %} \ No newline at end of file +{% include docs/mqtt-broker/faq.md %} diff --git a/docs/mqtt-broker/getting-started-guides/what-is-thingsboard-mqtt-broker.md b/docs/mqtt-broker/getting-started-guides/what-is-thingsboard-mqtt-broker.md index db63d2ca46..675adedc1e 100644 --- a/docs/mqtt-broker/getting-started-guides/what-is-thingsboard-mqtt-broker.md +++ b/docs/mqtt-broker/getting-started-guides/what-is-thingsboard-mqtt-broker.md @@ -4,4 +4,6 @@ title: What is TBMQ? description: TBMQ key features, architecture, etc. --- +{% assign tbmqSuffix = "CE" %} +{% assign tbmqDefinition = "open-source" %} {% include docs/mqtt-broker/getting-started-guides/what-is-thingsboard-mqtt-broker.md %} diff --git a/docs/mqtt-broker/index.md b/docs/mqtt-broker/index.md index 277f7ca2f0..e09a56b57c 100644 --- a/docs/mqtt-broker/index.md +++ b/docs/mqtt-broker/index.md @@ -4,4 +4,4 @@ title: TBMQ description: TBMQ - learn about the platform and get your IoT projects running on TBMQ --- -{% include docs/mqtt-broker/index.md %} \ No newline at end of file +{% include docs/mqtt-broker/index.md %} diff --git a/docs/mqtt-broker/install/building-from-source.md b/docs/mqtt-broker/install/building-from-source.md index 16402b8505..0c827df925 100644 --- a/docs/mqtt-broker/install/building-from-source.md +++ b/docs/mqtt-broker/install/building-from-source.md @@ -5,138 +5,4 @@ description: Building TBMQ from sources --- -* TOC -{:toc} - -This guide will help you to download and build TBMQ from sources. Instructions listed below are tested on Ubuntu 20.04 LTS. - -## Required tools - -This section contains installation instructions for build tools. - -### Java - -TBMQ is build using Java 17. Follow these instructions to install OpenJDK 17: - -```bash -sudo apt update -sudo apt install openjdk-17-jdk-headless -``` -{: .copy-code} - -Please don't forget to configure your operating system to use OpenJDK 17 by default. -You can configure which version is the default using the following command: - -```bash -sudo update-alternatives --config java -``` -{: .copy-code} - -You can check the installation using the following command: - -```bash -java -version -``` -{: .copy-code} - -Expected command output is: - -```text -openjdk version "17.0.xx" -OpenJDK Runtime Environment (...) -OpenJDK 64-Bit Server VM (build ...) -``` - -### Maven - -TBMQ build requires Maven 3.6.3+. - -```bash -sudo apt install maven -``` -{: .copy-code} - -**Please note** that maven installation may set Java 7 as a default JVM on certain Linux machines. -Use java installation [instructions](#java) to fix this. - -## Source code - -You can clone source code of the project from the official [GitHub repo](https://github.com/thingsboard/tbmq). - -```bash -git clone -b {{ site.release.broker_branch }} https://github.com/thingsboard/tbmq.git -cd tbmq -``` -{: .copy-code} - -## Build - -Run the following command from the TBMQ folder to build the project: - -```bash -mvn clean install -DskipTests -``` -{: .copy-code} - -## Build local docker images - -Make sure that [Docker](https://docs.docker.com/engine/install/) is installed. - -```bash -mvn clean install -DskipTests -Ddockerfile.skip=false -``` -{: .copy-code} - -## Build artifacts - -You can find debian, rpm and windows packages in the target folder: - -```bash -cd application/target -``` -{: .copy-code} - -## Running tests - -We are using [Docker](https://docs.docker.com/engine/install/) to run all kind of integration and black-box tests. - -Please, manage [Docker as a non-root user](https://docs.docker.com/engine/install/linux-postinstall/#manage-docker-as-a-non-root-user) to run tests properly. - -Main and release branches are already tested, so you can skip tests and avoid installing docker as well. - -Run all unit and integration tests: - -```bash -mvn clean install -``` -{: .copy-code} - -## Tips and tricks - -TBMQ is quite easy to build from sources on a brand-new clear environment. - -Here are some tips and tricks to boost build experience: - -- [clean maven cache](https://www.baeldung.com/maven-clear-cache) - ```bash - rm -rf ~/.m2/repository - ``` - {: .copy-code} - -- clean gradle cache - ```bash - rm -rf ~/.gradle/caches/ - ``` - {: .copy-code} - -- clean node modules - ```bash - rm -rf ui-ngx/node_modules - ``` - {: .copy-code} - -- build in parallel, format headers, build docker images - ```bash - mvn -T 0.8C license:format clean install -DskipTests -Ddockerfile.skip=false - ``` - {: .copy-code} +{% include docs/mqtt-broker/install/building-from-source.md %} diff --git a/docs/mqtt-broker/install/cluster/aws-cluster-setup.md b/docs/mqtt-broker/install/cluster/aws-cluster-setup.md index 142becc704..c433a5b4a1 100644 --- a/docs/mqtt-broker/install/cluster/aws-cluster-setup.md +++ b/docs/mqtt-broker/install/cluster/aws-cluster-setup.md @@ -1,514 +1,65 @@ --- layout: docwithnav-mqtt-broker -title: Cluster setup using AWS infrastructure +title: Deploy TBMQ Cluster on AWS with Kubernetes description: TBMQ microservices setup with Kubernetes in AWS EKS tbmq-rds-set-up: 0: - image: /images/mqtt-broker/install/aws-rds-vpc.png + image: /images/mqtt-broker/install-old/aws-rds-vpc.png title: 'AWS RDS Connectivity - choose VPC with the name of your cluster' 1: - image: /images/mqtt-broker/install/aws-rds-vpc-sg.png + image: /images/mqtt-broker/install-old/aws-rds-vpc-sg.png title: 'AWS RDS SG - choose "eksctl-tbmq-cluster-ClusterSharedNodeSecurityGroup-*" security group' 2: - image: /images/mqtt-broker/install/aws-rds-default-database.png + image: /images/mqtt-broker/install-old/aws-rds-default-database.png title: 'AWS RDS Additional config - type "thingsboard_mqtt_broker" for the initial database name' tbmq-msk-set-up: 0: - image: /images/mqtt-broker/install/aws-msk-creation.png + image: /images/mqtt-broker/install-old/aws-msk-creation.png title: 'AWS MSK - create cluster' tbmq-msk-configuration: 0: - image: /images/mqtt-broker/install/aws-msk-vpc.png + image: /images/mqtt-broker/install-old/aws-msk-vpc.png title: 'AWS MSK - choose TBMQ cluster’s VPC' 1: - image: /images/mqtt-broker/install/aws-msk-vpc-sg.png + image: /images/mqtt-broker/install-old/aws-msk-vpc-sg.png title: 'AWS MSK - choose "eksctl-tbmq-cluster-ClusterSharedNodeSecurityGroup-*" security group' 2: - image: /images/mqtt-broker/install/aws-msk-security.png + image: /images/mqtt-broker/install-old/aws-msk-security.png title: 'AWS MSK - enable Plaintext communication between clients and brokers' tbmq-redis-set-up: 0: - image: /images/mqtt-broker/install/aws-redis-create.png + image: /images/mqtt-broker/install-old/aws-redis-create.png title: 'AWS ElastiCache - create Redis cluster' 1: - image: /images/mqtt-broker/install/aws-redis-cluster-settings.png + image: /images/mqtt-broker/install-old/aws-redis-cluster-settings.png title: 'AWS ElastiCache - choose 7.x engine version and appropriate Node type' 2: - image: /images/mqtt-broker/install/aws-redis-connectivity.png + image: /images/mqtt-broker/install-old/aws-redis-connectivity.png title: 'AWS ElastiCache - choose TBMQ VPC and private subnets' 3: - image: /images/mqtt-broker/install/aws-redis-advanced.png + image: /images/mqtt-broker/install-old/aws-redis-advanced.png title: 'AWS ElastiCache - choose "eksctl-tbmq-cluster-ClusterSharedNodeSecurityGroup-*" security group' tbmq-rds-link-configure: 0: - image: /images/mqtt-broker/install/aws-rds-endpoint.png + image: /images/mqtt-broker/install-old/aws-rds-endpoint.png title: 'AWS RDS Details' tbmq-msk-link-configure: 0: - image: /images/mqtt-broker/install/aws-msk-arn.png + image: /images/mqtt-broker/install-old/aws-msk-arn.png title: 'AWS MSK Details' tbmq-redis-link-configure: 0: - image: /images/mqtt-broker/install/aws-redis-result.png + image: /images/mqtt-broker/install-old/aws-redis-result.png title: 'AWS ElastiCache Details' --- -* TOC -{:toc} - -This guide will help you to set up TBMQ in AWS EKS. - -## Prerequisites - -{% include templates/mqtt-broker/install/aws/eks-prerequisites.md %} - -## Step 1. Open TBMQ K8S scripts repository - -```bash -git clone -b {{ site.release.broker_branch }} https://github.com/thingsboard/tbmq.git -cd tbmq/k8s/aws -``` -{: .copy-code} - -## Step 2. Configure and create EKS cluster - -In the `cluster.yml` file you can find suggested cluster configuration. -Here are the fields you can change depending on your needs: -- `region` - should be the AWS region where you want your cluster to be located (the default value is `us-east-1`) -- `availabilityZones` - should specify the exact IDs of the region's availability zones - (the default value is `[us-east-1a,us-east-1b,us-east-1c]`) -- `instanceType` - the type of the instance with TBMQ node (the default value is `m7a.large`) - -**Note**: If you don't make any changes to `instanceType` and `desiredCapacity` fields, the EKS will deploy 2 nodes of type m7a.large. - -{% capture aws-eks-security %} -In case you want to secure access to the PostgreSQL and MSK, you'll need to configure the existing VPC or create a new one, -set it as the VPC for TBMQ cluster, create security groups for PostgreSQL and MSK, -set them for `managed` node-group in TBMQ cluster and configure the access from TBMQ cluster nodes to PostgreSQL/MSK using another security group. - -You can find more information about configuring VPC for `eksctl` [here](https://eksctl.io/usage/vpc-networking/). -{% endcapture %} -{% include templates/info-banner.md content=aws-eks-security %} - -Command to create AWS cluster: - -```bash -eksctl create cluster -f cluster.yml -``` -{: .copy-code} - -## Step 3. Create AWS load-balancer controller - -Once the cluster is ready you'll need to create AWS load-balancer controller. -You can do it by following [this](https://docs.aws.amazon.com/eks/latest/userguide/aws-load-balancer-controller.html) guide. -The cluster provisioning scripts will create several load balancers: - -* tb-broker-http-loadbalancer - AWS ALB that is responsible for the web UI and REST API; -* tb-broker-mqtt-loadbalancer - AWS NLB that is responsible for the MQTT communication. - -Provisioning of the AWS load-balancer controller is a **very important step** that is required for those load balancers to work properly. - -## Step 4. Amazon PostgreSQL DB Configuration - -You'll need to set up PostgreSQL on Amazon RDS. -One of the ways to do it is by following [this](https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/CHAP_SettingUp.html) guide. - -**Note**: Some recommendations: - -* Make sure your PostgreSQL version is 16.x; -* Use ‘Production’ template for high availability. It enables a lot of useful settings by default; -* Consider creation of custom parameters group for your RDS instance. It will make change of DB parameters easier; -* Consider deployment of the RDS instance into private subnets. This way it will be nearly impossible to accidentally expose it to the internet. -* You may also change `username` field and set or auto-generate `password` field (keep your postgresql password in a safe place). - -**Note**: Make sure your database is accessible from the cluster, one of the way to achieve this is to create -the database in the same VPC and subnets as TBMQ cluster and use -`eksctl-tbmq-cluster-ClusterSharedNodeSecurityGroup-*` security group. See screenshots below. - -{% include images-gallery.html imageCollection="tbmq-rds-set-up" %} - -## Step 5. Amazon MSK Configuration - -You'll need to set up Amazon MSK. -To do so you need to open AWS console, MSK submenu, press `Create cluster` button and choose `Custom create` mode. -You should see the similar image: - -{% include images-gallery.html imageCollection="tbmq-msk-set-up" %} - -**Note**: Some recommendations: - -* Apache Kafka version can be safely set to the 3.7.0 version as TBMQ is fully tested on it; -* Use m5.large or similar instance types; -* Consider creation of custom cluster configuration for your MSK. It will make change of Kafka parameters easier; -* Use default 'Monitoring' settings or enable 'Enhanced topic-level monitoring'. - -**Note**: Make sure your MSK instance is accessible from TBMQ cluster. -The easiest way to achieve this is to deploy the MSK instance in the same VPC. -We also recommend to use private subnets. This way it will be nearly impossible to accidentally expose it to the internet; - -{% include images-gallery.html imageCollection="tbmq-msk-configuration" %} - -At the end, carefully review the whole configuration of the MSK and then finish the cluster creation. - -## Step 6. Amazon ElastiCache (Redis) Configuration - -You need to set up [ElastiCache](https://aws.amazon.com/elasticache/redis/) for Redis. TBMQ uses cache to store messages for [DEVICE persistent clients](/docs/mqtt-broker/architecture/#persistent-device-client), -to improve performance and avoid frequent DB reads (see below for more details). - -It is useful when clients connect to TBMQ with the authentication enabled. -For every connection, the request is made to find MQTT client credentials that can authenticate the client. -Thus, there could be an excessive amount of requests to be processed for a large number of connecting clients at once. - -Please open AWS console and navigate to ElastiCache->Redis clusters->Create Redis cluster. - -**Note**: Some recommendations: - -* Specify Redis Engine version 7.x and node type with at least 1 GB of RAM; -* Make sure your Redis cluster is accessible from the TBMQ cluster. - The easiest way to achieve this is to deploy the Redis cluster in the same VPC. - We also recommend to use private subnets. Use `eksctl-tbmq-cluster-ClusterSharedNodeSecurityGroup-*` security group; -* Disable automatic backups. - -{% include images-gallery.html imageCollection="tbmq-redis-set-up" %} - -## Step 7. Configure links to the Kafka/Postgres/Redis - -### Amazon RDS PostgreSQL - -Once the database switch to the ‘Available’ state, on AWS Console get the `Endpoint` of the RDS PostgreSQL and paste it to -`SPRING_DATASOURCE_URL` in the `tb-broker-db-configmap.yml` instead of `RDS_URL_HERE` part. - -{% include images-gallery.html imageCollection="tbmq-rds-link-configure" %} - -Also, you'll need to set `SPRING_DATASOURCE_USERNAME` and `SPRING_DATASOURCE_PASSWORD` with PostgreSQL `username` and `password` corresponding. - -### Amazon MSK - -Once the MSK cluster switch to the ‘Active’ state, to get the list of brokers execute the next command: -```bash -aws kafka get-bootstrap-brokers --region us-east-1 --cluster-arn $CLUSTER_ARN -``` -{: .copy-code} -Where **$CLUSTER_ARN** is the Amazon Resource Name (ARN) of the MSK cluster: - -{% include images-gallery.html imageCollection="tbmq-msk-link-configure" %} - -You'll need to paste data from the `BootstrapBrokerString` to the `TB_KAFKA_SERVERS` environment variable in the `tb-broker.yml` file. - -Otherwise, click `View client information` seen on the screenshot above. Copy bootstrap server information in plaintext. - -### Amazon ElastiCache - -Once the Redis cluster switch to the ‘Available’ state, open the ‘Cluster details’ and copy `Primary endpoint` without ":6379" port suffix, it`s **YOUR_REDIS_ENDPOINT_URL_WITHOUT_PORT**. - -{% include images-gallery.html imageCollection="tbmq-redis-link-configure" %} - -Edit `tb-broker-cache-configmap.yml` and replace **YOUR_REDIS_ENDPOINT_URL_WITHOUT_PORT**. - -## Step 8. Installation - -Execute the following command to run installation: -```bash -./k8s-install-tbmq.sh -``` -{: .copy-code} - -After this command finish you should see the next line in the console: - -``` -INFO o.t.m.b.i.ThingsboardMqttBrokerInstallService - Installation finished successfully! -``` - -{% capture aws-rds %} - -Otherwise, please check if you set the PostgreSQL URL and PostgreSQL password in the `tb-broker-db-configmap.yml` correctly. - -{% endcapture %} -{% include templates/info-banner.md content=aws-rds %} - -## Step 9. Starting - -{% include templates/mqtt-broker/install/cluster-common/starting.md %} - -## Step 10. Configure Load Balancers - -### 10.1 Configure HTTP(S) Load Balancer - -Configure HTTP(S) Load Balancer to access web interface of your TBMQ instance. Basically you have 2 possible options of configuration: - -* http - Load Balancer without HTTPS support. Recommended for **development**. The only advantage is simple configuration and minimum costs. May be good option for development server but definitely not suitable for production. -* https - Load Balancer with HTTPS support. Recommended for **production**. Acts as an SSL termination point. You may easily configure it to issue and maintain a valid SSL certificate. Automatically redirects all non-secure (HTTP) traffic to secure (HTTPS) port. - -See links/instructions below on how to configure each of the suggested options. - -#### HTTP Load Balancer - -Execute the following command to deploy plain http load balancer: - -```bash -kubectl apply -f receipts/http-load-balancer.yml -``` -{: .copy-code} - -The process of load balancer provisioning may take some time. You may periodically check the status of the load balancer using the following command: - -```bash -kubectl get ingress -``` -{: .copy-code} - -Once provisioned, you should see similar output: - -```text -NAME CLASS HOSTS ADDRESS PORTS AGE -tb-broker-http-loadbalancer * k8s-thingsbo-tbbroker-000aba1305-222186756.eu-west-1.elb.amazonaws.com 80 3d1h -``` - -#### HTTPS Load Balancer - -Use [AWS Certificate Manager](https://aws.amazon.com/certificate-manager/) to create or import SSL certificate. Note your certificate ARN. - -Edit the load balancer configuration and replace YOUR_HTTPS_CERTIFICATE_ARN with your certificate ARN: - -```bash -nano receipts/https-load-balancer.yml -``` -{: .copy-code} - -Execute the following command to deploy plain https load balancer: - -```bash -kubectl apply -f receipts/https-load-balancer.yml -``` -{: .copy-code} - -### 10.2 Configure MQTT Load Balancer - -Configure MQTT load balancer to be able to use MQTT protocol to connect devices. - -Create TCP load balancer using following command: - -```bash -kubectl apply -f receipts/mqtt-load-balancer.yml -``` -{: .copy-code} - -The load balancer will forward all TCP traffic for ports 1883 and 8883. - -#### One-way TLS - -The simplest way to configure MQTTS is to make your MQTT load balancer (AWS NLB) to act as a TLS termination point. -This way we set up the one-way TLS connection, where the traffic between your devices and load balancers is encrypted, and the traffic between your load balancer and TBMQ is not encrypted. -There should be no security issues, since the ALB/NLB is running in your VPC. -The only major disadvantage of this option is that you can’t use “X.509 certificate” MQTT client credentials, -since information about client certificate is not transferred from the load balancer to the TBMQ. - -To enable the one-way TLS: - -Use [AWS Certificate Manager](https://aws.amazon.com/certificate-manager/) to create or import SSL certificate. Note your certificate ARN. - -Edit the load balancer configuration and replace YOUR_MQTTS_CERTIFICATE_ARN with your certificate ARN: - -```bash -nano receipts/mqtts-load-balancer.yml -``` -{: .copy-code} - -Execute the following command to deploy plain MQTTS load balancer: - -```bash -kubectl apply -f receipts/mqtts-load-balancer.yml -``` -{: .copy-code} - -#### Two-way TLS - -The more complex way to enable MQTTS is to obtain valid (signed) TLS certificate and configure it in the TBMQ. -The main advantage of this option is that you may use it in combination with “X.509 certificate” MQTT client credentials. - -To enable the two-way TLS: - -Follow [this guide](https://thingsboard.io/docs/user-guide/mqtt-over-ssl/) to create a .pem file with the SSL certificate. Store the file as _server.pem_ in the working directory. - -You’ll need to create a config-map with your PEM file, you can do it by calling command: - -```bash -kubectl create configmap tbmq-mqtts-config \ - --from-file=server.pem=YOUR_PEM_FILENAME \ - --from-file=mqttserver_key.pem=YOUR_PEM_KEY_FILENAME \ - -o yaml --dry-run=client | kubectl apply -f - -``` -{: .copy-code} - -* where **YOUR_PEM_FILENAME** is the name of your **server certificate file**. -* where **YOUR_PEM_KEY_FILENAME** is the name of your **server certificate private key file**. - -Then, uncomment all sections in the ‘tb-broker.yml’ file that are marked with “Uncomment the following lines to enable two-way MQTTS”. - -Execute command to apply changes: - -```bash -kubectl apply -f tb-broker.yml -``` -{: .copy-code} - -Finally, deploy the "transparent" load balancer: - -```bash -kubectl apply -f receipts/mqtt-load-balancer.yml -``` -{: .copy-code} - -## Step 11. Validate the setup - -Now you can open TBMQ web interface in your browser using DNS name of the load balancer. - -You can get DNS name of the load-balancers using the next command: - -```bash -kubectl get ingress -``` -{: .copy-code} - -You should see the similar picture: - -```text -NAME CLASS HOSTS ADDRESS PORTS AGE -tb-broker-http-loadbalancer * k8s-thingsbo-tbbroker-000aba1305-222186756.eu-west-1.elb.amazonaws.com 80 3d1h -``` - -Use `ADDRESS` field of the `tb-broker-http-loadbalancer` to connect to the cluster. - -{% include templates/mqtt-broker/login.md %} - -### Validate MQTT access - -To connect to the cluster via MQTT you will need to get corresponding service IP. You can do this with the command: - -```bash -kubectl get services -``` -{: .copy-code} - -You should see the similar picture: - -```text -NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE -tb-broker-mqtt-loadbalancer LoadBalancer 10.100.119.170 k8s-thingsbo-tbbroker-b9f99d1ab6-1049a98ba4e28403.elb.eu-west-1.amazonaws.com 1883:30308/TCP,8883:31609/TCP 6m58s -``` - -Use `EXTERNAL-IP` field of the load-balancer to connect to the cluster via MQTT protocol. - -### Troubleshooting - -In case of any issues you can examine service logs for errors. For example to see TBMQ logs execute the following command: - -```bash -kubectl logs -f tb-broker-0 -``` -{: .copy-code} - -Use the next command to see the state of all statefulsets. -```bash -kubectl get statefulsets -``` -{: .copy-code} - -See [kubectl Cheat Sheet](https://kubernetes.io/docs/reference/kubectl/cheatsheet/) command reference for more details. - -## Upgrading - -{% include templates/mqtt-broker/upgrade/upgrading.md %} - -### Backup and restore (Optional) - -While backing up your PostgreSQL database is highly recommended, it is optional before proceeding with the upgrade. -For further guidance, follow the [next instructions](https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/CHAP_CommonTasks.BackupRestore.html). - -### Upgrade to 2.2.0 - -In this release, the MQTT authentication mechanism was migrated from YAML/env configuration into the database. -During upgrade, TBMQ needs to know which authentication providers are enabled in your deployment. -This information is provided through environment variables passed to the **upgrade pod**. - -The upgrade script requires a file named **`database-setup.yml`** that explicitly defines these variables. -Environment variables from your `tb-broker.yml` file are not applied during the upgrade — only the values in `database-setup.yml` will be used. - -> **Tips** -> If you use only Basic authentication, set `SECURITY_MQTT_SSL_ENABLED=false`. -> If you use only X.509 authentication, set `SECURITY_MQTT_BASIC_ENABLED=false` and `SECURITY_MQTT_SSL_ENABLED=true`. - -**Supported variables** - -* `SECURITY_MQTT_BASIC_ENABLED` (`true|false`) -* `SECURITY_MQTT_SSL_ENABLED` (`true|false`) -* `SECURITY_MQTT_SSL_SKIP_VALIDITY_CHECK_FOR_CLIENT_CERT` (`true|false`) — usually `false`. - -Once the file is prepared and the values verified, proceed with the [upgrade process](#run-upgrade). - -### Upgrade to 2.1.0 - -{% include templates/mqtt-broker/upgrade/update-to-2.1.0-release-aws-cluster.md %} - -### Upgrade to 2.0.0 - -For the TBMQ v2.0.0 upgrade, if you haven't installed Redis yet, please follow [step 6](#step-6-amazon-elasticache-redis-configuration) to complete the installation. -Only then you can proceed with the [upgrade](#run-upgrade). - -### Run upgrade - -In case you would like to upgrade, please pull the recent changes from the latest release branch: - -```bash -git pull origin {{ site.release.broker_branch }} -``` -{: .copy-code} - -{% include templates/mqtt-broker/upgrade/upgrade-to-custom-release.md %} - -**Note**: Make sure custom changes of yours if available are not lost during the merge process. - -{% include templates/mqtt-broker/install/upgrade-hint.md %} - -After that, execute the following command: - -{% capture tabspec %}tbmq-upgrade -tbmq-upgrade-without-from-version,Since v2.1.0,shell,resources/upgrade-options/k8s-upgrade-tbmq-without-from-version.sh,/docs/mqtt-broker/install/cluster/resources/upgrade-options/k8s-upgrade-tbmq-without-from-version.sh -tbmq-upgrade-with-from-version,Before v2.1.0,markdown,resources/upgrade-options/k8s-upgrade-tbmq-with-from-version.md,/docs/mqtt-broker/install/cluster/resources/upgrade-options/k8s-upgrade-tbmq-with-from-version.md{% endcapture %} -{% include tabs.html %} - -{% include templates/mqtt-broker/upgrade/stop-tbmq-pods-before-upgrade.md %} - -## Cluster deletion - -Execute the following command to delete TBMQ nodes: - -```bash -./k8s-delete-tbmq.sh -``` -{: .copy-code} - -Execute the following command to delete all TBMQ nodes and configmaps: - -```bash -./k8s-delete-all.sh -``` -{: .copy-code} - -Execute the following command to delete the EKS cluster (you should change the name of the cluster and the region if those differ): -```bash -eksctl delete cluster -r us-east-1 -n tbmq -w -``` -{: .copy-code} - -## Next steps - -{% assign currentGuide = "InstallationGuides" %}{% include templates/mqtt-broker-guides-banner.md %} +{% assign tbmqSuffix = "CE" %} +{% include docs/mqtt-broker/install/cluster/aws-cluster-setup-old.md %} diff --git a/docs/mqtt-broker/install/cluster/azure-cluster-setup.md b/docs/mqtt-broker/install/cluster/azure-cluster-setup.md index 598cf8a5b8..ee3010cbea 100644 --- a/docs/mqtt-broker/install/cluster/azure-cluster-setup.md +++ b/docs/mqtt-broker/install/cluster/azure-cluster-setup.md @@ -1,376 +1,10 @@ --- layout: docwithnav-mqtt-broker -title: Cluster setup using Microsoft Azure infrastructure +title: Deploy TBMQ Cluster on Azure with Kubernetes description: TBMQ microservices setup with Kubernetes in AKS --- -* TOC -{:toc} - -This guide will help you to set up TBMQ in Azure AKS. - -## Prerequisites - -{% include templates/mqtt-broker/install/azure/aks-prerequisites.md %} - -## Step 1. Open TBMQ K8S scripts repository - -```bash -git clone -b {{ site.release.broker_branch }} https://github.com/thingsboard/tbmq.git -cd tbmq/k8s/azure -``` -{: .copy-code} - -## Step 2. Define environment variables - -{% include templates/mqtt-broker/install/azure/aks-define-env-variables.md %} - -## Step 3. Configure and create AKS cluster - -{% include templates/mqtt-broker/install/azure/aks-configure-and-create-cluster.md %} - -## Step 4. Update the context of kubectl - -{% include templates/mqtt-broker/install/azure/aks-update-kubectl-ctx.md %} - -## Step 5. Provision PostgreSQL DB - -You’ll need to set up PostgreSQL on Azure. You may follow [this](https://learn.microsoft.com/en-us/azure/postgresql/flexible-server/quickstart-create-server-portal) guide, -but take into account the following requirements: - -* Keep your postgresql password in a safe place. We will refer to it later in this guide using YOUR_AZURE_POSTGRES_PASSWORD; -* Make sure your Azure Database for PostgreSQL version is 16.x; -* Make sure your Azure Database for PostgreSQL instance is accessible from the TBMQ cluster; -* Make sure you use "thingsboard_mqtt_broker" as the initial database name. - -**Note**: Use "High availability" enabled. It enables a lot of useful settings by default. - -Another way by which you can create Azure Database for PostgreSQL is using az tool (don’t forget to replace ‘POSTGRESS_USER’ and ‘POSTGRESS_PASS’ with your username and password): - -```bash -az postgres flexible-server create --location $AKS_LOCATION --resource-group $AKS_RESOURCE_GROUP \ - --name $TB_DATABASE_NAME --admin-user POSTGRESS_USER --admin-password POSTGRESS_PASS \ - --public-access 0.0.0.0 --storage-size 32 \ - --version 16 -d thingsboard_mqtt_broker -``` -{: .copy-code} - -`az postgres flexible-server create` has a lot of parameters, a few of them are: - -* **location** - Location. Values from: `az account list-locations`; -* **resource-group (or -g)** - Name of resource group; -* **name** - Name of the server. The name can contain only lowercase letters, numbers, and the hyphen (-) character. Minimum 3 characters and maximum 63 characters; -* **admin-user** - Administrator username for the server. Once set, it cannot be changed; -* **admin-password** - The password of the administrator. Minimum 8 characters and maximum 128 characters. Password must contain characters from three of the following categories: English uppercase letters, English lowercase letters, numbers, and non-alphanumeric characters; -* **public-access** - Determines the public access. Enter single or range of IP addresses to be included in the allowed list of IPs. IP address ranges must be dash-separated and not contain any spaces. Specifying 0.0.0.0 allows public access from any resources deployed within Azure to access your server. Setting it to “None” sets the server in public access mode but does not create a firewall rule; -* **storage-size** - The storage capacity of the server. Minimum is 32 GiB and maximum is 16 TiB; -* **version** - Server major version; -* **high-availability** - enable or disable high availability feature. High availability can only be set during flexible server creation (accepted values: Disabled, Enabled. Default value: Disabled); -* **database-name (or -d)** - The name of the database to be created when provisioning the database server. - -You can see full parameters list [here](https://learn.microsoft.com/en-us/cli/azure/postgres/flexible-server?view=azure-cli-latest#az_postgres_flexible_server_create). - -Example of response: - -```text -{ - "connectionString": "postgresql://postgres:postgres@$tbmq-db.postgres.database.azure.com/postgres?sslmode=require", - "databaseName": "thingsboard_mqtt_broker", - "firewallName": "AllowAllAzureServicesAndResourcesWithinAzureIps_2021-11-17_15-45-6", - "host": "tbmq-db.postgres.database.azure.com", - "id": "/subscriptions/daff3288-1d5d-47c7-abf0-bfb7b738a18c/resourceGroups/myResourceGroup/providers/Microsoft.DBforPostgreSQL/flexibleServers/thingsboard_mqtt_broker", - "location": "East US", - "password": "postgres", - "resourceGroup": "TBMQResources", - "skuname": "Standard_D2s_v3", - "username": "postgres", - "version": "16" -} -``` - -Note the value of host from the command output (**tbmq-db.postgres.database.azure.com** in our case). Also note username and password (**postgres**) from the command. - -Edit the database settings file and replace YOUR_AZURE_POSTGRES_ENDPOINT_URL with the host value, YOUR_AZURE_POSTGRES_USER and YOUR_AZURE_POSTGRES_PASSWORD with the correct values: - -```bash -nano tb-broker-db-configmap.yml -``` -{: .copy-code} - -## Step 6. Azure Cache for Redis - -You need to set up Azure Cache for Redis. TBMQ uses cache to store messages for [DEVICE persistent clients](/docs/mqtt-broker/architecture/#persistent-device-client), -to improve performance and avoid frequent DB reads (see below for more details). - -It is useful when clients connect to TBMQ with the authentication enabled. -For every connection, the request is made to find MQTT client credentials that can authenticate the client. -Thus, there could be an excessive amount of requests to be processed for a large number of connecting clients at once. - -{% capture redis-azure-version %} -**Note:** Starting from **TBMQ v2.1.0**, Redis 7.2.5 is the officially supported version for third-party Redis deployments. -Please be aware that, as of now, only the **Enterprise** and **Enterprise Flash** SKUs of Azure Cache for Redis support Redis 7.2.x. -The Basic, Standard, and Premium SKUs continue to support only up to **Redis 6.x**. To ensure full compatibility, we recommend using an -Enterprise-tier SKU to ensure proper alignment with the Redis 7.2.5 features and behavior expected by TBMQ. -{% endcapture %} -{% include templates/info-banner.md content=redis-azure-version %} - -In order to set up the Redis, follow one of the following guides: - - - [Quickstart: Create a Redis Enterprise cache (Recommended)](https://learn.microsoft.com/en-us/azure/azure-cache-for-redis/quickstart-create-redis-enterprise) - - [Quickstart: Create an open-source Redis cache](https://learn.microsoft.com/en-us/azure/azure-cache-for-redis/quickstart-create-redis) - -For the open-source (legacy) Redis cache, we provide alternative instructions using the `az` tools, extracted from the official Azure documentation: - -```bash -az redis create --name $TB_REDIS_NAME --location $AKS_LOCATION --resource-group $AKS_RESOURCE_GROUP --sku basic --vm-size C0 --enable-non-ssl-port -``` -{: .copy-code} - -`az redis create` has a lot of options and a few of them are required: - -* **name** (or -n) - name of the Redis cache; -* **resource-group** (or -g) - name of resource group; -* **sku** - type of Redis cache (accepted values: Basic, Premium, Standard); -* **vm-size** - size of Redis cache to deploy. Basic and Standard Cache sizes start with C. Premium Cache sizes start with P (accepted values: c0, c1, c2, c3, c4, c5, c6, p1, p2, p3, p4, p5); -* **location** (or -l) - location. Values from: `az account list-locations`. - -To see the full list of parameters go to the following [page](https://learn.microsoft.com/en-us/cli/azure/redis?view=azure-cli-latest). - -Example of response: - -```text -{ - "accessKeys": null, - "enableNonSslPort": true, - "hostName": "tbmq-redis.redis.cache.windows.net", - "id": "/subscriptions/daff3288-1d5d-47c7-abf0-bfb7b738a18c/resourceGroups/myResourceGroup/providers/Microsoft.Cache/Redis/tbmq-redis", - "instances": [ - { - "isMaster": false, - "isPrimary": false, - "nonSslPort": 13000, - "shardId": null, - "sslPort": 15000, - "zone": null - } - ], - "linkedServers": [], - "location": "East US", - "minimumTlsVersion": null, - "name": "tbmq-redis", - "port": 6379, - "privateEndpointConnections": null, - "provisioningState": "Creating", - "publicNetworkAccess": "Enabled", - "redisConfiguration": { - "maxclients": "256", - "maxfragmentationmemory-reserved": "12", - "maxmemory-delta": "2", - "maxmemory-reserved": "2" - }, - "redisVersion": "6.0.20", - "replicasPerMaster": null, - "replicasPerPrimary": null, - "resourceGroup": "myResourceGroup", - "shardCount": null, - "sku": { - "capacity": 0, - "family": "C", - "name": "Basic" - }, - "sslPort": 6380, - "staticIp": null, - "subnetId": null, - "tags": {}, - "tenantSettings": {}, - "type": "Microsoft.Cache/Redis", - "zones": null -} -``` - -We need to take `hostName` parameter and replace `YOUR_REDIS_ENDPOINT_URL_WITHOUT_PORT` in the file _tb-broker-cache-configmap.yml_. - -After this we need to get redis keys for connection, for this we need to execute: - -```bash -az redis list-keys --name $TB_REDIS_NAME --resource-group $AKS_RESOURCE_GROUP -``` -{: .copy-code} - -Take "primary" and paste into _tb-broker-cache-configmap.yml_ file replacing `YOUR_REDIS_PASSWORD`. - -For more information, see the following [script](https://learn.microsoft.com/en-us/azure/azure-cache-for-redis/scripts/create-manage-cache#run-the-script). - -## Step 7. Installation - -Execute the following command to run the initial setup of the database. -This command will launch short-living TBMQ pod to provision necessary DB tables, indexes, etc. - -```bash -./k8s-install-tbmq.sh -``` -{: .copy-code} - -After this command finish you should see the next line in the console: - -```text -INFO o.t.m.b.i.ThingsboardMqttBrokerInstallService - Installation finished successfully! -``` - -{% capture aws-rds %} - -Otherwise, please check if you set the PostgreSQL URL and PostgreSQL password in the `tb-broker-db-configmap.yml` correctly. - -{% endcapture %} -{% include templates/info-banner.md content=aws-rds %} - -## Step 8. Provision Kafka - -{% include templates/mqtt-broker/install/cluster-common/provision-kafka.md %} - -## Step 9. Starting - -{% include templates/mqtt-broker/install/cluster-common/starting.md %} - -## Step 10. Configure Load Balancers - -### 10.1 Configure HTTP(S) Load Balancer - -Configure HTTP(S) Load Balancer to access web interface of your TBMQ instance. Basically you have 2 possible options of configuration: - -* http - Load Balancer without HTTPS support. Recommended for **development**. The only advantage is simple configuration and minimum costs. May be good option for development server but definitely not suitable for production. -* https - Load Balancer with HTTPS support. Recommended for **production**. Acts as an SSL termination point. You may easily configure it to issue and maintain a valid SSL certificate. Automatically redirects all non-secure (HTTP) traffic to secure (HTTPS) port. - -See links/instructions below on how to configure each of the suggested options. - -#### HTTP Load Balancer - -{% include templates/mqtt-broker/install/cluster-common/configure-http-load-balancer.md %} - -#### HTTPS Load Balancer - -For using ssl certificates we can add our certificate directly in Azure ApplicationGateway using command: - -```bash -az network application-gateway ssl-cert create \ - --resource-group $(az aks show --name $TB_CLUSTER_NAME --resource-group $AKS_RESOURCE_GROUP --query nodeResourceGroup | tr -d '"') \ - --gateway-name $AKS_GATEWAY\ - --name TBMQHTTPSCert \ - --cert-file YOUR_CERT \ - --cert-password YOUR_CERT_PASS -``` -{: .copy-code} - -Execute the following command to deploy plain https load balancer: - -```bash -kubectl apply -f receipts/https-load-balancer.yml -``` -{: .copy-code} - -### 10.2 Configure MQTT Load Balancer - -{% include templates/mqtt-broker/install/cluster-common/configure-mqtt-load-balancer.md %} - -## Step 11. Validate the setup - -{% include templates/mqtt-broker/install/cluster-common/validate-the-setup.md %} - -### Validate MQTT access - -{% include templates/mqtt-broker/install/cluster-common/validate-mqtt-access.md %} - -### Troubleshooting - -{% include templates/mqtt-broker/install/cluster-common/troubleshooting.md %} - -## Upgrading - -{% include templates/mqtt-broker/upgrade/upgrading.md %} - -### Backup and restore (Optional) - -While backing up your PostgreSQL database is highly recommended, it is optional before proceeding with the upgrade. -For further guidance, follow the [next instructions](https://learn.microsoft.com/en-us/azure/postgresql/flexible-server/concepts-backup-restore). - -### Upgrade to 2.2.0 - -In this release, the MQTT authentication mechanism was migrated from YAML/env configuration into the database. -During upgrade, TBMQ needs to know which authentication providers are enabled in your deployment. -This information is provided through environment variables passed to the **upgrade pod**. - -The upgrade script requires a file named **`database-setup.yml`** that explicitly defines these variables. -Environment variables from your `tb-broker.yml` file are not applied during the upgrade — only the values in `database-setup.yml` will be used. - -> **Tips** -> If you use only Basic authentication, set `SECURITY_MQTT_SSL_ENABLED=false`. -> If you use only X.509 authentication, set `SECURITY_MQTT_BASIC_ENABLED=false` and `SECURITY_MQTT_SSL_ENABLED=true`. - -**Supported variables** - -* `SECURITY_MQTT_BASIC_ENABLED` (`true|false`) -* `SECURITY_MQTT_SSL_ENABLED` (`true|false`) -* `SECURITY_MQTT_SSL_SKIP_VALIDITY_CHECK_FOR_CLIENT_CERT` (`true|false`) — usually `false`. - -Once the file is prepared and the values verified, proceed with the [upgrade process](#run-upgrade). - -### Upgrade to 2.1.0 - -{% include templates/mqtt-broker/upgrade/update-to-2.1.0-release-cluster.md %} - -### Upgrade to 2.0.0 - -For the TBMQ v2.0.0 upgrade, if you haven't installed Redis yet, please follow [step 6](#step-6-azure-cache-for-redis) to complete the installation. -Only then you can proceed with the [upgrade](#run-upgrade). - -### Run upgrade - -In case you would like to upgrade, please pull the recent changes from the latest release branch: - -```bash -git pull origin {{ site.release.broker_branch }} -``` -{: .copy-code} - -{% include templates/mqtt-broker/upgrade/upgrade-to-custom-release.md %} - -**Note**: Make sure custom changes of yours if available are not lost during the merge process. - -{% include templates/mqtt-broker/install/upgrade-hint.md %} - -After that, execute the following command: - -{% capture tabspec %}tbmq-upgrade -tbmq-upgrade-without-from-version,Since v2.1.0,shell,resources/upgrade-options/k8s-upgrade-tbmq-without-from-version.sh,/docs/mqtt-broker/install/cluster/resources/upgrade-options/k8s-upgrade-tbmq-without-from-version.sh -tbmq-upgrade-with-from-version,Before v2.1.0,markdown,resources/upgrade-options/k8s-upgrade-tbmq-with-from-version.md,/docs/mqtt-broker/install/cluster/resources/upgrade-options/k8s-upgrade-tbmq-with-from-version.md{% endcapture %} -{% include tabs.html %} - -{% include templates/mqtt-broker/upgrade/stop-tbmq-pods-before-upgrade.md %} - -## Cluster deletion - -Execute the following command to delete TBMQ nodes: - -```bash -./k8s-delete-tbmq.sh -``` -{: .copy-code} - -Execute the following command to delete all TBMQ nodes and configmaps, load balancers, etc.: - -```bash -./k8s-delete-all.sh -``` -{: .copy-code} - -Execute the following command to delete the AKS cluster: - -```bash -az aks delete --resource-group $AKS_RESOURCE_GROUP --name $TB_CLUSTER_NAME -``` -{: .copy-code} - -## Next steps - -{% assign currentGuide = "InstallationGuides" %}{% include templates/mqtt-broker-guides-banner.md %} +{% assign tbmqSuffix = "CE" %} +{% assign deployment = "azure" %} +{% include docs/mqtt-broker/install/cluster/azure-cluster-setup-old.md %} diff --git a/docs/mqtt-broker/install/cluster/docker-compose-setup.md b/docs/mqtt-broker/install/cluster/docker-compose-setup.md index 47e0810ce0..8cb45c52bc 100644 --- a/docs/mqtt-broker/install/cluster/docker-compose-setup.md +++ b/docs/mqtt-broker/install/cluster/docker-compose-setup.md @@ -1,291 +1,9 @@ --- layout: docwithnav-mqtt-broker -title: Cluster setup using Docker Compose -description: Cluster setup using Docker Compose +title: Deploy TBMQ Cluster using Docker Compose +description: Deploy TBMQ Cluster using Docker Compose --- -* TOC -{:toc} - - -This guide will help you to set up TBMQ in cluster mode using Docker Compose. - -## Prerequisites - -- [Install Docker](https://docs.docker.com/engine/installation/) - -{% include templates/install/docker-install-note.md %} - -## Step 1. Pull TBMQ Image - -Make sure your have [logged in](https://docs.docker.com/engine/reference/commandline/login/) to docker hub using command line. - -```bash -docker pull thingsboard/tbmq-node:{{ site.release.broker_full_ver }} -``` -{: .copy-code} - -## Step 2. Clone TBMQ repository - -```bash -git clone -b {{ site.release.broker_branch }} https://github.com/thingsboard/tbmq.git -cd tbmq/docker -``` -{: .copy-code} - -## Step 3. Installation - -Execute the following command to create necessary volumes for all the services and to update the haproxy config in the created volume. - -```bash -./scripts/docker-create-volumes.sh -``` -{: .copy-code} - -Execute the following command to run installation: - -```bash -./scripts/docker-install-tbmq.sh -``` -{: .copy-code} - -## Step 4. Running - -Execute the following command to start services: - -```bash -./scripts/docker-start-services.sh -``` -{: .copy-code} - -After a while when all services will be successfully started you can make requests to `http://{your-host-ip}` -in you browser (e.g. **http://localhost**) and connect clients using MQTT protocol on 1883 port. - -{% include templates/mqtt-broker/login.md %} - -## Step 5. Logs, stop and start commands - -In case of any issues you can examine service logs for errors. -For example to see TBMQ logs execute the following command: - -```bash -docker compose logs -f tbmq1 -``` -{: .copy-code} - -Or use the following command to see the state of all the containers. -```bash -docker compose ps -``` -{: .copy-code} -Use next command to inspect the logs of all running services. -```bash -docker compose logs -f -``` -{: .copy-code} -See [docker compose logs](https://docs.docker.com/compose/reference/logs/) command reference for more details. - -Execute the following command to stop services: - -```bash -./scripts/docker-stop-services.sh -``` -{: .copy-code} - -Execute the following command to stop and completely remove deployed docker containers: - -```bash -./scripts/docker-remove-services.sh -``` -{: .copy-code} - -In case you want to remove docker volumes for all the containers, execute the following command. -**Note:** it will remove all your data, so be careful before executing it. - -```bash -./scripts/docker-remove-volumes.sh -``` -{: .copy-code} - -It could be useful to update logs (enable DEBUG/TRACE logs) in runtime or change TBMQ or Haproxy configs. In order to do -this you need to make changes, for example, to the -_haproxy.cfg_ or _logback.xml_ file. -Afterward, execute the next command to apply the changes for the container: - -```bash -./scripts/docker-refresh-config.sh -``` -{: .copy-code} - -To reload HAProxy's configuration without restarting the Docker container you can send the HUP signal to this process (PID 1): - -``` -docker exec -it haproxy-certbot sh -c "kill -HUP 1" -``` -{: .copy-code} - -## Upgrading - -{% include templates/mqtt-broker/upgrade/upgrading.md %} - -### Backup and restore (Optional) - -While backing up your PostgreSQL database is highly recommended, it is optional before proceeding with the upgrade. -For further guidance, follow the [next instructions](https://github.com/thingsboard/tbmq/blob/main/docker/backup-restore/README.md). - -### Upgrade to 2.2.0 - -In this release, the MQTT authentication mechanism was migrated from YAML/env configuration into the database. -During upgrade, TBMQ needs to know which authentication providers are enabled in your deployment. -This information is provided through environment variables passed to the **upgrade container**. - -The upgrade script requires a file named **`tb-mqtt-broker.env`** that explicitly defines these variables. -Environment variables from your `docker-compose.yml` file are not applied during the upgrade — only the values in `tb-mqtt-broker.env` will be used. - -> **Tips** -> If you use only Basic authentication, set `SECURITY_MQTT_SSL_ENABLED=false`. -> If you use only X.509 authentication, set `SECURITY_MQTT_BASIC_ENABLED=false` and `SECURITY_MQTT_SSL_ENABLED=true`. - -**Supported variables** - - * `SECURITY_MQTT_BASIC_ENABLED` (`true|false`) - * `SECURITY_MQTT_SSL_ENABLED` (`true|false`) - * `SECURITY_MQTT_SSL_SKIP_VALIDITY_CHECK_FOR_CLIENT_CERT` (`true|false`) — usually `false`. - -Once the file is prepared and the values verified, proceed with the [upgrade process](#run-upgrade). - -### Upgrade to 2.1.0 - -{% include templates/mqtt-broker/upgrade/update-to-2.1.0-release-docker-cluster.md %} - -### Run upgrade - -In case you would like to upgrade, please pull the recent changes from the latest release branch: - -```bash -git pull origin {{ site.release.broker_branch }} -``` -{: .copy-code} - -{% include templates/mqtt-broker/upgrade/upgrade-to-custom-release.md %} - -**Note**: Make sure custom changes of yours if available are not lost during the merge process. -Make sure `TBMQ_VERSION` in .env file is set to the target version (e.g., set it to {{ site.release.broker_full_ver }} if you are upgrading to the latest). - -{% include templates/mqtt-broker/install/upgrade-hint.md %} - -After that, execute the following commands: - -{% capture tabspec %}tbmq-upgrade -tbmq-upgrade-without-from-version,Since v2.1.0,shell,resources/upgrade-options/docker-compose-upgrade-tbmq-without-from-version.md,/docs/mqtt-broker/install/cluster/resources/upgrade-options/docker-compose-upgrade-tbmq-without-from-version.md -tbmq-upgrade-with-from-version,Before v2.1.0,markdown,resources/upgrade-options/docker-compose-upgrade-tbmq-with-from-version.md,/docs/mqtt-broker/install/cluster/resources/upgrade-options/docker-compose-upgrade-tbmq-with-from-version.md{% endcapture %} -{% include tabs.html %} - -## Generate certificate for HTTPS - -We are using HAproxy for proxying traffic to containers and for web UI by default we are using 80 and 443 ports. -For using HTTPS with a valid certificate, execute these commands: - -```bash -docker exec haproxy-certbot certbot-certonly --domain your_domain --email your_email -docker exec haproxy-certbot haproxy-refresh -``` -{: .copy-code} - -**Note**: Valid certificate is used only when you visit web UI by domain in URL. - -## Enable MQTTS (MQTT over SSL/TLS) - -**MQTTS** allows clients to connect to TBMQ over an encrypted TLS/SSL channel, ensuring the confidentiality and integrity of MQTT messages in transit. -There are two common deployment options: - -* **Two-way MQTTS (Mutual TLS)** – TBMQ terminates TLS, and clients must present valid certificates for authentication. -* **One-way MQTTS (TLS termination at Load Balancer)** – HAProxy or another load balancer handles TLS termination, and forwards plain MQTT traffic to TBMQ over a trusted internal network. - -Both approaches protect external connections with encryption, but **two-way MQTTS** adds client certificate verification for higher security, -while **one-way MQTTS** simplifies broker configuration and can reuse existing HTTPS certificates on the load balancer. - -### Two-way MQTTS - -In this configuration, TBMQ itself handles TLS termination and (optionally) client certificate authentication. -This approach is suitable when you want the broker to fully control SSL/TLS and mutual authentication without relying on a load balancer for security. - -To enable **MQTT over SSL (MQTTS)**, you need to provide valid SSL certificates and configure TBMQ to use them. - -For more information on supported certificate formats and options, refer to the [MQTT over SSL](/docs/mqtt-broker/security/mqtts/) documentation. - -**Provide SSL Certificates** - -Obtain a valid SSL certificate and private key. For example: - -* `mqttserver.pem` – your public certificate (may include full chain); -* `mqttserver_key.pem` – your private key. - -> Self-signed certificates are supported for testing, but we recommend using certificates from a trusted Certificate Authority for production environments. - -**Mount Certificates into Containers** - -Open your `docker-compose.yml` file and **uncomment** the volume line that mounts the certificate files: - -```yaml -volumes: - - PATH_TO_CERTS:/config/certificates -``` -{: .copy-code} - -Replace `PATH_TO_CERTS` with the path to the folder containing your certificate files. Make sure TBMQ can access those file. - -**Configure Environment Variables** - -Edit the `tb-mqtt-broker.env` file and **uncomment/configure** the following lines to enable SSL: - -```yaml -LISTENER_SSL_ENABLED=true -LISTENER_SSL_PEM_CERT=/config/certificates/mqttserver.pem -LISTENER_SSL_PEM_KEY=/config/certificates/mqttserver_key.pem -LISTENER_SSL_PEM_KEY_PASSWORD=server_key_password -``` -{: .copy-code} - -> Adjust the file paths and password as needed. If your private key is not password-protected, you can leave `LISTENER_SSL_PEM_KEY_PASSWORD` empty. - -**Restart Services** - -Apply the changes by restarting TBMQ services: - -```bash -./scripts/docker-start-services.sh -``` -{: .copy-code} - -Once started, your MQTT clients will be able to securely connect to port **8883** using TLS/SSL. - -### One-way MQTTS - -In this setup, TLS is terminated at the load balancer (HAProxy). -Clients connect securely to HAProxy over MQTTS (port 8883), and HAProxy forwards plain MQTT (unencrypted) to TBMQ over the internal network (port 1883). -You can reuse the same certificate you already use for HTTPS. - -Point HAProxy to your certificate bundle (PEM with full chain + private key). If you reuse the HTTPS cert, reference the same bundle. -Locate and update the _haproxy.cfg_ file: - -```text - listen mqtts-in - bind *:${MQTTS_PORT} ssl crt /usr/local/etc/haproxy/certs.d/fullchain-and-key.pem - mode tcp - option clitcpka # For TCP keep-alive - timeout client 3h - timeout server 3h - option tcplog - balance leastconn - server tbMqtt1 tbmq1:1883 check inter 5s resolvers docker_resolver resolve-prefer ipv4 - server tbMqtt2 tbmq2:1883 check inter 5s resolvers docker_resolver resolve-prefer ipv4 -``` -{: .copy-code} - -> **Note:** Replace _fullchain-and-key.pem_ with the actual filename of your certificate bundle. - -## Next steps - -{% assign currentGuide = "InstallationGuides" %}{% include templates/mqtt-broker-guides-banner.md %} +{% assign tbmqSuffix = "CE" %} +{% include docs/mqtt-broker/install/cluster/docker-compose-setup-old.md %} diff --git a/docs/mqtt-broker/install/cluster/gcp-cluster-setup.md b/docs/mqtt-broker/install/cluster/gcp-cluster-setup.md index 8bf1f71a81..5c14f80ae7 100644 --- a/docs/mqtt-broker/install/cluster/gcp-cluster-setup.md +++ b/docs/mqtt-broker/install/cluster/gcp-cluster-setup.md @@ -1,213 +1,10 @@ --- layout: docwithnav-mqtt-broker -assignees: -- dshvaika -title: Cluster setup using GCP infrastructure +title: Deploy TBMQ Cluster on GCP with Kubernetes description: TBMQ microservices setup with Kubernetes in GCP GKE --- -* TOC -{:toc} - -This guide will help you to setup TBMQ in microservices mode in GKE. - -## Prerequisites - -{% include templates/install/gcp/gke-prerequisites.md %} - -## Step 1. Clone TBMQ K8S scripts repository - -```bash -git clone -b {{ site.release.broker_branch }} https://github.com/thingsboard/tbmq.git -cd tbmq/k8s/gcp -``` -{: .copy-code} - -## Step 2. Define environment variables - -{% assign tbClusterName = "tbmq-cluster" %} -{% assign tbDbClusterName = "tbmq-db" %} -{% include templates/mqtt-broker/install/gcp/env-variables.md %} - -## Step 3. Configure and create GKE cluster - -{% include templates/install/gcp/regional-gke-cluster.md %} - -## Step 4. Update the context of kubectl - -{% include templates/install/gcp/update-kubectl-region.md %} - -## Step 5. Provision Google Cloud SQL (PostgreSQL) Instance - -{% assign tbDbName = "thingsboard_mqtt_broker" %} -{% include templates/install/gcp/provision-postgresql.md %} - -#### 5.5 Edit database settings - -Replace **YOUR_DB_IP_ADDRESS**, **YOUR_DB_PASSWORD** and **YOUR_DB_NAME** with the correct values: - -```bash -nano tb-broker-db-configmap.yml -``` -{: .copy-code} - -## Step 6. Create Namespace - -Let's create a dedicated namespace for our TBMQ cluster deployment to ensure better resource isolation and management. - -```bash -kubectl apply -f tb-broker-namespace.yml -kubectl config set-context $(kubectl config current-context) --namespace=thingsboard-mqtt-broker -``` -{: .copy-code} - -## Step 7. Provision Redis cluster - -{% include templates/mqtt-broker/install/cluster-common/provision-redis-cluster.md %} - -## Step 8. Installation - -{% include templates/mqtt-broker/install/gcp/install.md %} - -{% capture aws-rds %} - -Otherwise, please check if you set the PostgreSQL URL and PostgreSQL password in the `tb-broker-db-configmap.yml` correctly. - -{% endcapture %} -{% include templates/info-banner.md content=aws-rds %} - -## Step 9. Provision Kafka - -{% include templates/mqtt-broker/install/cluster-common/provision-kafka.md %} - -## Step 10. Starting - -{% include templates/mqtt-broker/install/cluster-common/starting.md %} - -## Step 11. Configure Load Balancers - -### 11.1 Configure HTTP(S) Load Balancer - -Configure HTTP(S) Load Balancer to access web interface of your TBMQ instance. Basically, you have 2 possible configuration options: - -* http - Load Balancer without HTTPS support. Recommended for **development**. The only advantage is simple configuration and minimum costs. May be good option for development server but definitely not suitable for production. -* https - Load Balancer with HTTPS support. Recommended for **production**. Acts as an SSL termination point. You may easily configure it to issue and maintain a valid SSL certificate. Automatically redirects all non-secure (HTTP) traffic to secure (HTTPS) port. - -See links/instructions below on how to configure each of the suggested options. - -#### HTTP Load Balancer - -{% include templates/mqtt-broker/install/cluster-common/configure-http-load-balancer.md %} - -#### HTTPS Load Balancer - -{% assign staticIP = "tbmq-http-lb-address" %} -{% include templates/mqtt-broker/install/gcp/configure-https-load-balancer.md %} -Once provisioned, you may use your domain name to access Web UI (over https). - -### 11.2 Configure MQTT Load Balancer - -{% include templates/mqtt-broker/install/cluster-common/configure-mqtt-load-balancer.md %} - -## Step 12. Validate the setup - -{% include templates/mqtt-broker/install/cluster-common/validate-the-setup.md %} - -### Validate MQTT access - -{% include templates/mqtt-broker/install/cluster-common/validate-mqtt-access.md %} - -### Troubleshooting - -{% include templates/mqtt-broker/install/cluster-common/troubleshooting.md %} - -## Upgrading - -{% include templates/mqtt-broker/upgrade/upgrading.md %} - -### Backup and restore (Optional) - -While backing up your PostgreSQL database is highly recommended, it is optional before proceeding with the upgrade. -For further guidance, follow the [next instructions](https://learn.microsoft.com/en-us/azure/postgresql/flexible-server/concepts-backup-restore). - -### Upgrade to 2.2.0 - -In this release, the MQTT authentication mechanism was migrated from YAML/env configuration into the database. -During upgrade, TBMQ needs to know which authentication providers are enabled in your deployment. -This information is provided through environment variables passed to the **upgrade pod**. - -The upgrade script requires a file named **`database-setup.yml`** that explicitly defines these variables. -Environment variables from your `tb-broker.yml` file are not applied during the upgrade — only the values in `database-setup.yml` will be used. - -> **Tips** -> If you use only Basic authentication, set `SECURITY_MQTT_SSL_ENABLED=false`. -> If you use only X.509 authentication, set `SECURITY_MQTT_BASIC_ENABLED=false` and `SECURITY_MQTT_SSL_ENABLED=true`. - -**Supported variables** - -* `SECURITY_MQTT_BASIC_ENABLED` (`true|false`) -* `SECURITY_MQTT_SSL_ENABLED` (`true|false`) -* `SECURITY_MQTT_SSL_SKIP_VALIDITY_CHECK_FOR_CLIENT_CERT` (`true|false`) — usually `false`. - -Once the file is prepared and the values verified, proceed with the [upgrade process](#run-upgrade). - -### Upgrade to 2.1.0 - -{% include templates/mqtt-broker/upgrade/update-to-2.1.0-release-cluster.md %} - -### Upgrade to 2.0.0 - -For the TBMQ v2.0.0 upgrade, if you haven't installed Redis yet, please follow [step 7](#step-7-provision-redis-cluster) to complete the installation. -Only then you can proceed with the [upgrade](#run-upgrade). - -### Run upgrade - -In case you would like to upgrade, please pull the recent changes from the latest release branch: - -```bash -git pull origin {{ site.release.broker_branch }} -``` -{: .copy-code} - -{% include templates/mqtt-broker/upgrade/upgrade-to-custom-release.md %} - -**Note**: Make sure custom changes of yours if available are not lost during the merge process. - -{% include templates/mqtt-broker/install/upgrade-hint.md %} - -After that, execute the following command: - -{% capture tabspec %}tbmq-upgrade -tbmq-upgrade-without-from-version,Since v2.1.0,shell,resources/upgrade-options/k8s-upgrade-tbmq-without-from-version.sh,/docs/mqtt-broker/install/cluster/resources/upgrade-options/k8s-upgrade-tbmq-without-from-version.sh -tbmq-upgrade-with-from-version,Before v2.1.0,markdown,resources/upgrade-options/k8s-upgrade-tbmq-with-from-version.md,/docs/mqtt-broker/install/cluster/resources/upgrade-options/k8s-upgrade-tbmq-with-from-version.md{% endcapture %} -{% include tabs.html %} - -{% include templates/mqtt-broker/upgrade/stop-tbmq-pods-before-upgrade.md %} - -## Cluster deletion - -Execute the following command to delete TBMQ nodes: - -```bash -./k8s-delete-tbmq.sh -``` -{: .copy-code} - -Execute the following command to delete all TBMQ nodes and configmaps, load balancers, etc.: - -```bash -./k8s-delete-all.sh -``` -{: .copy-code} - -Execute the following command to delete the GKE cluster: - -```bash -gcloud container clusters delete $TB_CLUSTER_NAME --region=$GCP_REGION -``` -{: .copy-code} - -## Next steps - -{% assign currentGuide = "InstallationGuides" %}{% include templates/mqtt-broker-guides-banner.md %} +{% assign tbmqSuffix = "CE" %} +{% assign deployment = "gcp" %} +{% include docs/mqtt-broker/install/cluster/gcp-cluster-setup-old.md %} diff --git a/docs/mqtt-broker/install/cluster/helm-cluster-setup-aws.md b/docs/mqtt-broker/install/cluster/helm-cluster-setup-aws.md index f311d50398..76f285dbbc 100644 --- a/docs/mqtt-broker/install/cluster/helm-cluster-setup-aws.md +++ b/docs/mqtt-broker/install/cluster/helm-cluster-setup-aws.md @@ -1,79 +1,8 @@ --- layout: docwithnav-mqtt-broker -title: Cluster setup using Helm Chart on EKS +title: Deploy TBMQ Cluster on EKS with Helm description: TBMQ microservices setup with Helm on EKS --- -* TOC -{:toc} - -This guide will help you to set up TBMQ Cluster using the official Helm [chart](https://artifacthub.io/packages/helm/tbmq-helm-chart/tbmq-cluster) -on AWS using Elastic Kubernetes Service (EKS). - -## Prerequisites - -{% include templates/mqtt-broker/install/helm/aws/prerequisites.md %} - -## Configure your Kubernetes environment - -{% include templates/mqtt-broker/install/helm/aws/configure-deployment.md %} - -## Add the TBMQ Cluster Helm repository - -{% include templates/mqtt-broker/install/helm/common/add-helm-repo.md %} - -## Modify default chart values - -{% include templates/mqtt-broker/install/helm/common/get-default-chart-values.md %} - -### Update nodeSelector for Pods Scheduling - -{% include templates/mqtt-broker/install/helm/aws/pods-scheduling.md %} - -### External PostgreSQL - -{% include templates/mqtt-broker/install/helm/common/external-postgres.md %} - -If you're deploying on Amazon EKS and plan to use AWS RDS for PostgreSQL, follow this -[guide](/docs/mqtt-broker/install/cluster/aws-cluster-setup/#step-4-amazon-postgresql-db-configuration) to provision and configure your RDS instance. - -### Load Balancer configuration - -{% include templates/mqtt-broker/install/helm/aws/modify-load-balancer.md %} - -## Create namespace - -{% include templates/mqtt-broker/install/helm/common/create-namespace.md %} - -## Install the TBMQ Helm chart - -{% include templates/mqtt-broker/install/helm/common/install-chart.md %} - -## Validate HTTP Access - -{% include templates/mqtt-broker/install/helm/aws/validate-http.md %} - -## Validate MQTT Access - -{% include templates/mqtt-broker/install/helm/aws/validate-mqtt.md %} - -## Troubleshooting - -{% include templates/mqtt-broker/install/helm/common/helm-setup-troubleshooting.md %} - -## Upgrading - -{% include templates/mqtt-broker/install/helm/common/upgrading.md %} - -## Uninstalling TBMQ Helm chart - -{% include templates/mqtt-broker/install/helm/common/uninstall-chart.md %} - -## Delete Kubernetes Cluster - -{% include templates/mqtt-broker/install/helm/aws/delete-cluster.md %} - -## Next steps - -{% assign currentGuide = "InstallationGuides" %}{% include templates/mqtt-broker-guides-banner.md %} +{% include docs/mqtt-broker/install/cluster/helm-cluster-setup-aws.md %} diff --git a/docs/mqtt-broker/install/cluster/helm-cluster-setup-azure.md b/docs/mqtt-broker/install/cluster/helm-cluster-setup-azure.md index ff1b05898c..836ec4a7bb 100644 --- a/docs/mqtt-broker/install/cluster/helm-cluster-setup-azure.md +++ b/docs/mqtt-broker/install/cluster/helm-cluster-setup-azure.md @@ -1,75 +1,8 @@ --- layout: docwithnav-mqtt-broker -title: Cluster setup using Helm Chart on AKS +title: Deploy TBMQ Cluster on AKS with Helm description: TBMQ microservices setup with Helm on AKS --- -* TOC -{:toc} - -This guide will help you to set up TBMQ Cluster using the official Helm [chart](https://artifacthub.io/packages/helm/tbmq-helm-chart/tbmq-cluster) -on Azure using Azure Kubernetes Service (AKS). - -## Prerequisites - -{% include templates/mqtt-broker/install/helm/azure/prerequisites.md %} - -## Configure your Kubernetes environment - -{% include templates/mqtt-broker/install/helm/azure/configure-deployment.md %} - -## Add the TBMQ Cluster Helm repository - -{% include templates/mqtt-broker/install/helm/common/add-helm-repo.md %} - -## Modify default chart values - -{% include templates/mqtt-broker/install/helm/common/get-default-chart-values.md %} - -### External PostgreSQL - -{% include templates/mqtt-broker/install/helm/common/external-postgres.md %} - -If you're deploying on Azure AKS and plan to use Azure Database for PostgreSQL, follow this -[guide](/docs/mqtt-broker/install/cluster/azure-cluster-setup/#step-5-provision-postgresql-db) to provision and configure your PostgreSQL instance. - -### Load Balancer configuration - -{% include templates/mqtt-broker/install/helm/azure/modify-load-balancer.md %} - -## Create namespace - -{% include templates/mqtt-broker/install/helm/common/create-namespace.md %} - -## Install the TBMQ Helm chart - -{% include templates/mqtt-broker/install/helm/common/install-chart.md %} - -## Validate HTTP Access - -{% include templates/mqtt-broker/install/helm/azure/validate-http.md %} - -## Validate MQTT Access - -{% include templates/mqtt-broker/install/helm/azure/validate-mqtt.md %} - -## Troubleshooting - -{% include templates/mqtt-broker/install/helm/common/helm-setup-troubleshooting.md %} - -## Upgrading - -{% include templates/mqtt-broker/install/helm/common/upgrading.md %} - -## Uninstalling TBMQ Helm chart - -{% include templates/mqtt-broker/install/helm/common/uninstall-chart.md %} - -## Delete Kubernetes Cluster - -{% include templates/mqtt-broker/install/helm/azure/delete-cluster.md %} - -## Next steps - -{% assign currentGuide = "InstallationGuides" %}{% include templates/mqtt-broker-guides-banner.md %} +{% include docs/mqtt-broker/install/cluster/helm-cluster-setup-azure.md %} \ No newline at end of file diff --git a/docs/mqtt-broker/install/cluster/helm-cluster-setup-gcp.md b/docs/mqtt-broker/install/cluster/helm-cluster-setup-gcp.md index 8511bb25b1..97e42b5df5 100644 --- a/docs/mqtt-broker/install/cluster/helm-cluster-setup-gcp.md +++ b/docs/mqtt-broker/install/cluster/helm-cluster-setup-gcp.md @@ -1,76 +1,8 @@ --- layout: docwithnav-mqtt-broker -title: Cluster setup using Helm Chart on GKE +title: Deploy TBMQ Cluster on GKE with Helm description: TBMQ microservices setup with Helm on GKE --- -* TOC -{:toc} - -This guide will help you to set up TBMQ Cluster using the official Helm [chart](https://artifacthub.io/packages/helm/tbmq-helm-chart/tbmq-cluster) -on Google Cloud Platform (GCP) using Google Kubernetes Engine (GKE). - -## Prerequisites - -{% include templates/mqtt-broker/install/helm/gcp/prerequisites.md %} - -## Configure your Kubernetes environment - -{% include templates/mqtt-broker/install/helm/gcp/configure-deployment.md %} - -## Add the TBMQ Cluster Helm repository - -{% include templates/mqtt-broker/install/helm/common/add-helm-repo.md %} - -## Modify default chart values - -{% include templates/mqtt-broker/install/helm/common/get-default-chart-values.md %} - -### External PostgreSQL - -{% include templates/mqtt-broker/install/helm/common/external-postgres.md %} - -If you're deploying on GCP GKE and plan to use a Google Cloud SQL (PostgreSQL) instance, -make sure to first [enable the required GCP services](/docs/mqtt-broker/install/cluster/gcp-cluster-setup/#enable-gcp-services), then follow this -[instructions](/docs/mqtt-broker/install/cluster/gcp-cluster-setup/#step-5-provision-google-cloud-sql-postgresql-instance) to provision and configure your PostgreSQL instance. - -### Load Balancer configuration - -{% include templates/mqtt-broker/install/helm/gcp/modify-load-balancer.md %} - -## Create namespace - -{% include templates/mqtt-broker/install/helm/common/create-namespace.md %} - -## Install the TBMQ Helm chart - -{% include templates/mqtt-broker/install/helm/common/install-chart.md %} - -## Validate HTTP Access - -{% include templates/mqtt-broker/install/helm/gcp/validate-http.md %} - -## Validate MQTT Access - -{% include templates/mqtt-broker/install/helm/gcp/validate-mqtt.md %} - -## Troubleshooting - -{% include templates/mqtt-broker/install/helm/common/helm-setup-troubleshooting.md %} - -## Upgrading - -{% include templates/mqtt-broker/install/helm/common/upgrading.md %} - -## Uninstalling TBMQ Helm chart - -{% include templates/mqtt-broker/install/helm/common/uninstall-chart.md %} - -## Delete Kubernetes Cluster - -{% include templates/mqtt-broker/install/helm/gcp/delete-cluster.md %} - -## Next steps - -{% assign currentGuide = "InstallationGuides" %}{% include templates/mqtt-broker-guides-banner.md %} +{% include docs/mqtt-broker/install/cluster/helm-cluster-setup-gcp.md %} \ No newline at end of file diff --git a/docs/mqtt-broker/install/cluster/helm-cluster-setup-minikube.md b/docs/mqtt-broker/install/cluster/helm-cluster-setup-minikube.md index c8b643e8c9..12871de62c 100644 --- a/docs/mqtt-broker/install/cluster/helm-cluster-setup-minikube.md +++ b/docs/mqtt-broker/install/cluster/helm-cluster-setup-minikube.md @@ -1,73 +1,8 @@ --- layout: docwithnav-mqtt-broker -title: Cluster setup using Helm chart with Minikube +title: Deploy TBMQ Cluster on Minikube with Helm description: TBMQ microservices setup using Helm Chart with Minikube --- -* TOC -{:toc} - -This guide will help you to set up TBMQ Cluster using the official Helm [chart](https://artifacthub.io/packages/helm/tbmq-helm-chart/tbmq-cluster). -Minikube used as the reference environment for the self-hosted kubernetes deployment. -If you're deploying TBMQ in a self-managed cluster without cloud-specific load balancer integrations, Minikube provides a simple way to test the setup end-to-end. - -## Prerequisites - -{% include templates/mqtt-broker/install/helm/minikube/prerequisites.md %} - -## Configure your Kubernetes environment - -{% include templates/mqtt-broker/install/helm/minikube/configure-deployment.md %} - -## Add the TBMQ Cluster Helm repository - -{% include templates/mqtt-broker/install/helm/common/add-helm-repo.md %} - -## Modify default chart values - -{% include templates/mqtt-broker/install/helm/common/get-default-chart-values.md %} - -### External PostgreSQL - -{% include templates/mqtt-broker/install/helm/common/external-postgres.md %} - -### Load Balancer configuration - -{% include templates/mqtt-broker/install/helm/minikube/modify-load-balancer.md %} - -## Create namespace - -{% include templates/mqtt-broker/install/helm/common/create-namespace.md %} - -## Install the TBMQ Helm chart - -{% include templates/mqtt-broker/install/helm/common/install-chart.md %} - -## Validate HTTP Access - -{% include templates/mqtt-broker/install/helm/minikube/validate-http.md %} - -## Validate MQTT Access - -{% include templates/mqtt-broker/install/helm/minikube/validate-mqtt.md %} - -## Troubleshooting - -{% include templates/mqtt-broker/install/helm/common/helm-setup-troubleshooting.md %} - -## Upgrading - -{% include templates/mqtt-broker/install/helm/common/upgrading.md %} - -## Uninstalling TBMQ Helm chart - -{% include templates/mqtt-broker/install/helm/common/uninstall-chart.md %} - -## Delete Kubernetes Cluster - -{% include templates/mqtt-broker/install/helm/minikube/delete-cluster.md %} - -## Next steps - -{% assign currentGuide = "InstallationGuides" %}{% include templates/mqtt-broker-guides-banner.md %} +{% include docs/mqtt-broker/install/cluster/helm-cluster-setup-minikube.md %} \ No newline at end of file diff --git a/docs/mqtt-broker/install/cluster/helm-cluster-setup-options.md b/docs/mqtt-broker/install/cluster/helm-cluster-setup-options.md index 3088461573..89062b6a08 100644 --- a/docs/mqtt-broker/install/cluster/helm-cluster-setup-options.md +++ b/docs/mqtt-broker/install/cluster/helm-cluster-setup-options.md @@ -5,22 +5,4 @@ description: K8S environment options for TBMQ cluster setup using Helm notitle: "true" --- -
-
-
-
-
-

Kubernetes environment options for TBMQ cluster setup using Helm

-
-

The core TBMQ installation process using Helm is consistent across Kubernetes environments. However, the full installation guide—including steps for configuring the Kubernetes cluster—varies depending on the platform. To proceed, please select your Kubernetes environment below. You’ll then be guided through the complete TBMQ installation tailored to your chosen platform, including environment-specific Kubernetes setup and other relevant configurations.

-
-
-
-
- {% include installation-options-cards.liquid installationOptions="installation-options-mqtt-broker-helm" active=true %} -
-
-
-
-
-
+{% include docs/mqtt-broker/install/cluster/helm-cluster-setup-options.md %} diff --git a/docs/mqtt-broker/install/cluster/helm-cluster-upgrading-options.md b/docs/mqtt-broker/install/cluster/helm-cluster-upgrading-options.md index 2469da6000..0f08bd0da3 100644 --- a/docs/mqtt-broker/install/cluster/helm-cluster-upgrading-options.md +++ b/docs/mqtt-broker/install/cluster/helm-cluster-upgrading-options.md @@ -5,22 +5,4 @@ description: K8S environment options for TBMQ cluster setup using Helm notitle: "true" --- -
-
-
-
-
-

Upgrade options for TBMQ cluster setup using Helm

-
-

To proceed, please select your Kubernetes environment below. You’ll then be guided through the complete TBMQ upgrade process tailored to your chosen platform.

-
-
-
-
- {% include installation-options-cards.liquid installationOptions="installation-options-mqtt-broker-helm-cluster-upgrading-options" active=true %} -
-
-
-
-
-
+{% include docs/mqtt-broker/install/cluster/helm-cluster-upgrading-options.md %} diff --git a/docs/mqtt-broker/install/cluster/minikube-cluster-setup.md b/docs/mqtt-broker/install/cluster/minikube-cluster-setup.md index 661e18f188..f9a23eac41 100644 --- a/docs/mqtt-broker/install/cluster/minikube-cluster-setup.md +++ b/docs/mqtt-broker/install/cluster/minikube-cluster-setup.md @@ -1,177 +1,9 @@ --- layout: docwithnav-mqtt-broker -title: Cluster setup using Minikube -description: TBMQ cluster setup with Kubernetes and Minikube guide +title: Deploy TBMQ Cluster on Minikube with Kubernetes +description: Deploy TBMQ Cluster on Minikube with Kubernetes --- -* TOC -{:toc} - -This guide will help you to set up TBMQ in cluster mode using Minikube. - -## Prerequisites - -You need to have a Kubernetes cluster, and the `kubectl` command-line tool must be configured to communicate with your cluster. -If you don't have Minikube installed, please follow [these instructions](https://kubernetes.io/docs/setup/learning-environment/minikube/). -Additionally, you will need [helm](https://helm.sh/docs/intro/install/) to be installed. - -## Step 1. Clone TBMQ repository - -```bash -git clone -b {{ site.release.broker_branch }} https://github.com/thingsboard/tbmq.git -cd tbmq/k8s/minikube -``` -{: .copy-code} - -## Step 2. Installation - -To install TBMQ execute the following command: - -```bash -./k8s-install-tbmq.sh -``` -{: .copy-code} - -## Step 3. Running - -Execute the following command to deploy TBMQ: - -```bash -./k8s-deploy-tbmq.sh -``` -{: .copy-code} - -After a while when all resources will be successfully started you can open `http://{your-cluster-ip}:30001` in your browser (e.g. **http://192.168.49.2:30001**). -You can check your cluster IP using command: -```bash -minikube ip -``` -{: .copy-code} - -{% include templates/mqtt-broker/login.md %} - -## Step 4. Logs, delete statefulsets and services - -In case of any issues, you can examine service logs for errors. -For example to see TBMQ node logs execute the following commands: - -1) Get the list of the running tb-broker pods: - -```bash -kubectl get pods -l app=tb-broker -``` -{: .copy-code} - -2) Fetch logs of the tb-broker pod: - -```bash -kubectl logs -f TB_BROKER_POD_NAME -``` -{: .copy-code} - -Where: - -- `TB_BROKER_POD_NAME` - tb-broker pod name obtained from the list of the running tb-broker pods. - -Or use the next command to see the state of all the pods. -```bash -kubectl get pods -``` -{: .copy-code} - -Use the next command to see the state of all the services. -```bash -kubectl get services -``` -{: .copy-code} - -Use the next command to see the state of all the deployments. -```bash -kubectl get deployments -``` -{: .copy-code} - -Use the next command to see the state of all the statefulsets. -```bash -kubectl get statefulsets -``` -{: .copy-code} - -See [kubectl Cheat Sheet](https://kubernetes.io/docs/reference/kubectl/cheatsheet/) command reference for more details. - -Execute the following command to delete TBMQ nodes: - -```bash -./k8s-delete-tbmq.sh -``` -{: .copy-code} - -Execute the following command to delete all resources (including database): - -```bash -./k8s-delete-all.sh -``` -{: .copy-code} - -## Upgrading - -{% include templates/mqtt-broker/upgrade/upgrading.md %} - -### Backup and restore (Optional) - -While backing up your PostgreSQL database is highly recommended, it is optional before proceeding with the upgrade. -For further guidance, follow the [next instructions](https://github.com/thingsboard/tbmq/blob/main/k8s/minikube/backup-restore/README.md). - -### Upgrade to 2.2.0 - -In this release, the MQTT authentication mechanism was migrated from YAML/env configuration into the database. -During upgrade, TBMQ needs to know which authentication providers are enabled in your deployment. -This information is provided through environment variables passed to the **upgrade pod**. - -The upgrade script requires a file named **`database-setup.yml`** that explicitly defines these variables. -Environment variables from your `tb-broker.yml` file are not applied during the upgrade — only the values in `database-setup.yml` will be used. - -> **Tips** -> If you use only Basic authentication, set `SECURITY_MQTT_SSL_ENABLED=false`. -> If you use only X.509 authentication, set `SECURITY_MQTT_BASIC_ENABLED=false` and `SECURITY_MQTT_SSL_ENABLED=true`. - -**Supported variables** - -* `SECURITY_MQTT_BASIC_ENABLED` (`true|false`) -* `SECURITY_MQTT_SSL_ENABLED` (`true|false`) -* `SECURITY_MQTT_SSL_SKIP_VALIDITY_CHECK_FOR_CLIENT_CERT` (`true|false`) — usually `false`. - -Once the file is prepared and the values verified, proceed with the [upgrade process](#run-upgrade). - -### Upgrade to 2.1.0 - -{% include templates/mqtt-broker/upgrade/update-to-2.1.0-release-cluster.md %} - -### Run upgrade - -In case you would like to upgrade, please pull the recent changes from the latest release branch: - -```bash -git pull origin {{ site.release.broker_branch }} -``` -{: .copy-code} - -{% include templates/mqtt-broker/upgrade/upgrade-to-custom-release.md %} - -**Note**: Make sure custom changes of yours if available are not lost during the merge process. - -{% include templates/mqtt-broker/install/upgrade-hint.md %} - -After that, execute the following command: - -{% capture tabspec %}tbmq-upgrade -tbmq-upgrade-without-from-version,Since v2.1.0,shell,resources/upgrade-options/k8s-upgrade-tbmq-without-from-version.sh,/docs/mqtt-broker/install/cluster/resources/upgrade-options/k8s-upgrade-tbmq-without-from-version.sh -tbmq-upgrade-with-from-version,Before v2.1.0,markdown,resources/upgrade-options/k8s-upgrade-tbmq-with-from-version.md,/docs/mqtt-broker/install/cluster/resources/upgrade-options/k8s-upgrade-tbmq-with-from-version.md{% endcapture %} -{% include tabs.html %} - -{% include templates/mqtt-broker/upgrade/stop-tbmq-pods-before-upgrade.md %} - -## Next steps - -{% assign currentGuide = "InstallationGuides" %}{% include templates/mqtt-broker-guides-banner.md %} +{% assign tbmqSuffix = "CE" %} +{% include docs/mqtt-broker/install/cluster/minikube-cluster-setup-old.md %} diff --git a/docs/mqtt-broker/install/config.md b/docs/mqtt-broker/install/config.md index 8e19040598..91e2e739c6 100644 --- a/docs/mqtt-broker/install/config.md +++ b/docs/mqtt-broker/install/config.md @@ -1,51 +1,9 @@ --- layout: docwithnav-mqtt-broker title: Configuration properties -description: TBMQ configuration properties and environment variables +description: TBMQ CE configuration properties and environment variables --- -* TOC -{:toc} - -This guide will help you become familiar with TBMQ configuration files and parameters. -We **strongly recommend** configuring TBMQ using environment variables. -This way, you won't need to merge the configuration files when a new platform release arrives. - -The list of available configuration parameters and corresponding environment variables can be found [here](#configuration-parameters). - -## How to change configuration parameters? - -### Docker-Based deployment - -If TBMQ is installed in a Docker Compose environment, you can edit the scripts and add environment variables for -the corresponding containers. For more details, refer to the [Docker documentation](https://docs.docker.com/compose/environment-variables/#/the-envfile-configuration-option). - -### K8S-Based deployment - -If TBMQ is installed in a K8S environment, you can edit the scripts and add environment variables for the -corresponding deployments/stateful sets. For more details, refer to the [K8S documentation](https://kubernetes.io/docs/tasks/inject-data-application/define-environment-variable-container/). - -## Configuration parameters - -The configuration file is written in YAML format. All configuration parameters have corresponding environment variable names and default values. -To change a configuration parameter, simply modify its default value. For example: - -```bash -server: - address: "${HTTP_BIND_ADDRESS:0.0.0.0}" -``` - -In this case, *'HTTP_BIND_ADDRESS'* is the environment variable name and *'0.0.0.0'* is the default value. - -You can use the simple example below to add a new environment variable 'HTTP_BIND_PORT' with value '8084'. - -```bash -... -export HTTP_BIND_PORT=8084 -``` - -The parameters are grouped by system components. The list contains the name (address in **thingsboard-mqtt-broker.yml** file), -environment variable, default value, and description. - -{% include docs/mqtt-broker/install/config.md %} +{% assign tbmqSuffix = "CE" %} +{% include docs/mqtt-broker/install/configuration.md %} diff --git a/docs/mqtt-broker/install/docker-windows.md b/docs/mqtt-broker/install/docker-windows.md index 605cf54d13..b5deb77f70 100644 --- a/docs/mqtt-broker/install/docker-windows.md +++ b/docs/mqtt-broker/install/docker-windows.md @@ -1,283 +1,9 @@ --- layout: docwithnav-mqtt-broker -title: Installing TBMQ using Docker (Windows) -description: Installing TBMQ using Docker (Windows) +title: Install TBMQ with Docker (Windows) +description: Install TBMQ with Docker (Windows) --- -* TOC -{:toc} - -This guide will help you to install and start standalone TBMQ using Docker on Windows. -If you are looking for a cluster installation instruction, please visit [cluster setup page](/docs/mqtt-broker/install/cluster/docker-compose-setup/). - -## Prerequisites - -To run TBMQ on a single machine you will need at least 2Gb of RAM. - -- [Install Docker](https://docs.docker.com/engine/installation/) - -## Installation - -Execute the following commands to download the script that will install and start TBMQ: - -{% include templates/mqtt-broker/install/windows/windows-install.md %} - -The script downloads the _docker-compose.yml_ file, creates necessary docker volumes, installs the database for TBMQ, and starts TBMQ. -Key configuration points for TBMQ in docker-compose file: - -- `8083:8083` - connect local port 8083 to exposed internal HTTP port 8083; -- `1883:1883` - connect local port 1883 to exposed internal MQTT port 1883; -- `8084:8084` - connect local port 8084 to exposed internal MQTT over WebSockets port 8084; -- `tbmq-redis-data:/bitnami/redis/data` - maps the `tbmq-redis-data` volume to TBMQ Redis database data directory; -- `tbmq-postgres-data:/var/lib/postgresql/data` - maps the `tbmq-postgres-data` volume to TBMQ Postgres database data directory; -- `tbmq-kafka-data:/bitnami/kafka` - maps the `tbmq-kafka-data` volume to Kafka data directory; -- `tbmq-logs:/var/log/thingsboard-mqtt-broker` - maps the `tbmq-logs` volume to TBMQ logs directory; -- `tbmq-data:/data` - maps the `tbmq-data` volume to TBMQ data directory that contains _.firstlaunch_ file after the DB is installed; -- `tbmq` - friendly local name of this machine; -- `restart: always` - automatically start TBMQ in case of system reboot and restart in case of failure; - -**Note**: In case the TBMQ is being installed on the same host where ThingsBoard is already running, the following issue can be seen: - -``` -Error response from daemon: ... Bind for 0.0.0.0:1883 failed: port is already allocated -``` - -In order to fix this, you need to expose another host's port for the TBMQ container, -i.e. change the `1883:1883` line in the downloaded docker-compose.yml file with, for example, `1889:1883`. After that re-run the script. - -```shell -.\tbmq-install-and-run.ps1 -``` -{: .copy-code} - -Once the installation process is complete you can access TBMQ UI by visiting the following URL `http://{your-host-ip}:8083` in your browser (e.g. **http://localhost:8083**). - -{% include templates/mqtt-broker/login.md %} - -## Logs, stop and start commands - -In case of any issues you can examine service logs for errors. -For example to see TBMQ logs execute the following command: - -``` -docker compose logs -f tbmq -``` -{: .copy-code} - -To stop the containers: - -``` -docker compose stop -``` -{: .copy-code} - -To start the containers: - -``` -docker compose start -``` -{: .copy-code} - -## Upgrading - -{% include templates/mqtt-broker/upgrade/upgrading.md %} - -### Backup and restore (Optional) - -While backing up your PostgreSQL database is highly recommended, it is optional before proceeding with the upgrade. -For further guidance, follow the [next instructions](https://github.com/thingsboard/tbmq/blob/main/msa/tbmq/configs/README.md). - -### Upgrade to 2.2.0 - -In this release, the MQTT authentication mechanism was migrated from YAML/env configuration into the database. -During upgrade, TBMQ needs to know which authentication providers are enabled in your deployment. -This is done using environment variables passed to the **upgrade container**. - -The upgrade script therefore requires a file named **`.tbmq-upgrade.env`** in the same directory as `docker-compose.yml`. -This file is **used only during upgrade** to create the default auth providers. -Make sure the values match what you already run in your `tbmq` service (`docker-compose.yml → environment:`). - -**Create the env file (Windows PowerShell)** - -From the directory containing `docker-compose.yml`: - -```bash -@' -SECURITY_MQTT_BASIC_ENABLED=true -SECURITY_MQTT_SSL_ENABLED=true -SECURITY_MQTT_SSL_SKIP_VALIDITY_CHECK_FOR_CLIENT_CERT=false -'@ | Set-Content -Path .tbmq-upgrade.env -Encoding UTF8 -``` -{: .copy-code} - -> **Tips** -> If you use only Basic authentication, set `SECURITY_MQTT_SSL_ENABLED=false`. -> If you use only X.509 authentication, set `SECURITY_MQTT_BASIC_ENABLED=false` and `SECURITY_MQTT_SSL_ENABLED=true`. - -**Notes** - -* **Required**: If `.tbmq-upgrade.env` is missing, the upgrade script will fail. -* Supported variables: - - * `SECURITY_MQTT_BASIC_ENABLED` (`true|false`) - * `SECURITY_MQTT_SSL_ENABLED` (`true|false`) - * `SECURITY_MQTT_SSL_SKIP_VALIDITY_CHECK_FOR_CLIENT_CERT` (`true|false`) — usually `false`. - -Once the file is created, continue with the [upgrade process](#run-upgrade). - -### Upgrade to 2.1.0 - -{% include templates/mqtt-broker/upgrade/update-to-2.1.0-release.md %} - -### Upgrade to 2.0.0 - -For the TBMQ 2.0.0 release, the installation scripts have been updated to include Redis configuration. - -Please update your `docker-compose.yml` file to incorporate the Redis settings. -You can review the necessary changes by visiting the following [link](https://github.com/thingsboard/tbmq/pull/142/files#diff-18a10097b03fb393429353a8f84ba29498e9b72a21326deb9809865d384e2800). - -
-
- -Here is the complete docker compose file with the Redis configuration prior to the upgrade - - -```yaml -# -# Copyright © 2016-2024 The Thingsboard Authors -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# - -services: - postgres: - restart: always - image: "postgres:15" - ports: - - "5432" - environment: - POSTGRES_DB: thingsboard_mqtt_broker - POSTGRES_PASSWORD: postgres - volumes: - - tbmq-postgres-data:/var/lib/postgresql/data - kafka: - restart: always - image: "bitnamilegacy/kafka:3.5.1" - ports: - - "9092" - environment: - KAFKA_CFG_NODE_ID: 0 - KAFKA_CFG_PROCESS_ROLES: controller,broker - KAFKA_CFG_CONTROLLER_QUORUM_VOTERS: 0@kafka:9093 - KAFKA_CFG_LISTENERS: PLAINTEXT://:9092,CONTROLLER://:9093 - KAFKA_CFG_ADVERTISED_LISTENERS: PLAINTEXT://:9092 - KAFKA_CFG_LISTENER_SECURITY_PROTOCOL_MAP: CONTROLLER:PLAINTEXT,PLAINTEXT:PLAINTEXT - KAFKA_CFG_CONTROLLER_LISTENER_NAMES: CONTROLLER - KAFKA_CFG_INTER_BROKER_LISTENER_NAME: PLAINTEXT - volumes: - - tbmq-kafka-data:/bitnami/kafka - redis: - restart: always - image: "bitnamilegacy/redis:7.0" - environment: - # ALLOW_EMPTY_PASSWORD is recommended only for development. - ALLOW_EMPTY_PASSWORD: "yes" - ports: - - "6379" - volumes: - - tbmq-redis-data:/bitnami/redis/data - tbmq: - restart: always - image: "thingsboard/tbmq:1.4.0" - depends_on: - - postgres - - kafka - - redis - ports: - - "8083:8083" - - "1883:1883" - - "8084:8084" - environment: - TB_SERVICE_ID: tbmq - SPRING_DATASOURCE_URL: jdbc:postgresql://postgres:5432/thingsboard_mqtt_broker - SPRING_DATASOURCE_USERNAME: postgres - SPRING_DATASOURCE_PASSWORD: postgres - TB_KAFKA_SERVERS: kafka:9092 - REDIS_HOST: redis - SECURITY_MQTT_BASIC_ENABLED: "true" - #JAVA_OPTS: "-Xmx2048M -Xms2048M -Xss384k -XX:+AlwaysPreTouch" - volumes: - - tbmq-logs:/var/log/thingsboard-mqtt-broker - - tbmq-data:/data - -volumes: - tbmq-postgres-data: - external: true - tbmq-kafka-data: - external: true - tbmq-redis-data: - external: true - tbmq-logs: - external: true - tbmq-data: - external: true -``` -{: .copy-code} - -
-
- -Additionally, add the following line to your `tbmq-install-and-run.ps1` script (locate `create_volume_if_not_exists` lines) to create a volume for Redis data: - -```bash -create_volume_if_not_exists "tbmq-redis-data" -``` -{: .copy-code} - -Or simply create it with the following command: - -```bash -docker volume create tbmq-redis-data -``` -{: .copy-code} - -Once this is done, run the script to apply the changes: - -```bash -.\tbmq-install-and-run.ps1 -``` -{: .copy-code} - -This will restart TBMQ with Redis enabled. Afterward, you can proceed with the [upgrade process](#run-upgrade). -Please [contact us](https://github.com/thingsboard/tbmq/issues), so we can answer any questions and provide our help if needed. - -### Run upgrade - -In order to update to the latest version, execute the following commands: - -```shell -Invoke-WebRequest -Uri "https://raw.githubusercontent.com/thingsboard/tbmq/{{ site.release.broker_branch }}/msa/tbmq/configs/windows/tbmq-upgrade.ps1" ` --OutFile ".\tbmq-upgrade.ps1"; .\tbmq-upgrade.ps1 -``` -{: .copy-code} - -**NOTE**: replace `redis_url`, `db_url`, `db_username`, and `db_password` variables in the script with the corresponding values used during DB initialization. - -{% include templates/mqtt-broker/upgrade/upgrade-to-custom-release.md %} - -{% include templates/mqtt-broker/install/ssl/mqtts.md %} - -## Next steps - -{% assign currentGuide = "InstallationGuides" %}{% include templates/mqtt-broker-guides-banner.md %} +{% assign tbmqSuffix = "CE" %} +{% include docs/mqtt-broker/install/docker-windows.md %} diff --git a/docs/mqtt-broker/install/docker.md b/docs/mqtt-broker/install/docker.md index 2aff35f87f..21467eff7e 100644 --- a/docs/mqtt-broker/install/docker.md +++ b/docs/mqtt-broker/install/docker.md @@ -1,289 +1,9 @@ --- layout: docwithnav-mqtt-broker -title: Installing TBMQ using Docker (Linux or Mac OS) -description: Installing TBMQ using Docker (Linux or Mac OS) +title: Install TBMQ with Docker (Linux or Mac OS) +description: Install TBMQ with Docker (Linux or Mac OS) --- -* TOC -{:toc} - -This guide will help you to install and start standalone TBMQ using Docker on Linux or macOS. -If you are looking for a cluster installation instruction, please visit [cluster setup page](/docs/mqtt-broker/install/cluster/docker-compose-setup/). - -## Prerequisites - -To run TBMQ on a single machine you will need at least 2Gb of RAM. - -- [Install Docker](https://docs.docker.com/engine/installation/) - -{% include templates/install/docker-install-note.md %} - -## Installation - -Execute the following commands to download the script that will install and start TBMQ: - -```shell -wget https://raw.githubusercontent.com/thingsboard/tbmq/{{ site.release.broker_branch }}/msa/tbmq/configs/tbmq-install-and-run.sh && -sudo chmod +x tbmq-install-and-run.sh && ./tbmq-install-and-run.sh -``` -{: .copy-code} - -The script downloads the _docker-compose.yml_ file, creates necessary docker volumes, installs the database for TBMQ, and starts TBMQ. -Key configuration points for TBMQ in docker-compose file: - -- `8083:8083` - connect local port 8083 to exposed internal HTTP port 8083; -- `1883:1883` - connect local port 1883 to exposed internal MQTT port 1883; -- `8084:8084` - connect local port 8084 to exposed internal MQTT over WebSockets port 8084; -- `tbmq-redis-data:/bitnami/redis/data` - maps the `tbmq-redis-data` volume to TBMQ Redis database data directory; -- `tbmq-postgres-data:/var/lib/postgresql/data` - maps the `tbmq-postgres-data` volume to TBMQ Postgres database data directory; -- `tbmq-kafka-data:/bitnami/kafka` - maps the `tbmq-kafka-data` volume to Kafka data directory; -- `tbmq-logs:/var/log/thingsboard-mqtt-broker` - maps the `tbmq-logs` volume to TBMQ logs directory; -- `tbmq-data:/data` - maps the `tbmq-data` volume to TBMQ data directory that contains _.firstlaunch_ file after the DB is installed; -- `tbmq` - friendly local name of this machine; -- `restart: always` - automatically start TBMQ in case of system reboot and restart in case of failure; - -**Note**: In case the TBMQ is being installed on the same host where ThingsBoard is already running, the following issue can be seen: - -``` -Error response from daemon: ... Bind for 0.0.0.0:1883 failed: port is already allocated -``` - -In order to fix this, you need to expose another host's port for the TBMQ container, -i.e. change the `1883:1883` line in the downloaded docker-compose.yml file with, for example, `1889:1883`. After that re-run the script. - -```shell -./tbmq-install-and-run.sh -``` -{: .copy-code} - -Once the installation process is complete you can access TBMQ UI by visiting the following URL `http://{your-host-ip}:8083` in your browser (e.g. **http://localhost:8083**). - -{% include templates/mqtt-broker/login.md %} - -## Logs, stop and start commands - -In case of any issues you can examine service logs for errors. -For example to see TBMQ logs execute the following command: - -``` -docker compose logs -f tbmq -``` -{: .copy-code} - -To stop the containers: - -``` -docker compose stop -``` -{: .copy-code} - -To start the containers: - -``` -docker compose start -``` -{: .copy-code} - -## Upgrading - -{% include templates/mqtt-broker/upgrade/upgrading.md %} - -### Backup and restore (Optional) - -While backing up your PostgreSQL database is highly recommended, it is optional before proceeding with the upgrade. -For further guidance, follow the [next instructions](https://github.com/thingsboard/tbmq/blob/main/msa/tbmq/configs/README.md). - -### Upgrade to 2.2.0 - -In this release, the MQTT authentication mechanism was migrated from YAML/env configuration into the database. -During upgrade, TBMQ needs to know which authentication providers are enabled in your deployment. -This is done using environment variables passed to the **upgrade container**. - -The upgrade script therefore requires a file named **`.tbmq-upgrade.env`** in the same directory as `docker-compose.yml`. -This file is **used only during upgrade** to create the default auth providers. -Make sure the values match what you already run in your `tbmq` service (`docker-compose.yml → environment:`). - -**Create the env file** - -From the directory containing `docker-compose.yml`: - -```bash -cat > .tbmq-upgrade.env <<'EOF' -SECURITY_MQTT_BASIC_ENABLED=true -SECURITY_MQTT_SSL_ENABLED=true -SECURITY_MQTT_SSL_SKIP_VALIDITY_CHECK_FOR_CLIENT_CERT=false -EOF -``` -{: .copy-code} - -> **Tips** -> If you use only Basic authentication, set `SECURITY_MQTT_SSL_ENABLED=false`. -> If you use only X.509 authentication, set `SECURITY_MQTT_BASIC_ENABLED=false` and `SECURITY_MQTT_SSL_ENABLED=true`. - -**Notes** - -* **Required**: If `.tbmq-upgrade.env` is missing, the upgrade script will fail. -* Supported variables: - - * `SECURITY_MQTT_BASIC_ENABLED` (`true|false`) - * `SECURITY_MQTT_SSL_ENABLED` (`true|false`) - * `SECURITY_MQTT_SSL_SKIP_VALIDITY_CHECK_FOR_CLIENT_CERT` (`true|false`) — usually `false`. - -Once the file is created, continue with the [upgrade process](#run-upgrade). - -### Upgrade to 2.1.0 - -{% include templates/mqtt-broker/upgrade/update-to-2.1.0-release.md %} - -### Upgrade to 2.0.0 - -For the TBMQ 2.0.0 release, the installation scripts have been updated to include Redis configuration. - -Please update your `docker-compose.yml` file to incorporate the Redis settings. -You can review the necessary changes by visiting the following [link](https://github.com/thingsboard/tbmq/pull/142/files#diff-18a10097b03fb393429353a8f84ba29498e9b72a21326deb9809865d384e2800). - -
-
- -Here is the complete docker compose file with the Redis configuration prior to the upgrade - - -```yaml -# -# Copyright © 2016-2024 The Thingsboard Authors -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# - -services: - postgres: - restart: always - image: "postgres:15" - ports: - - "5432" - environment: - POSTGRES_DB: thingsboard_mqtt_broker - POSTGRES_PASSWORD: postgres - volumes: - - tbmq-postgres-data:/var/lib/postgresql/data - kafka: - restart: always - image: "bitnamilegacy/kafka:3.5.1" - ports: - - "9092" - environment: - KAFKA_CFG_NODE_ID: 0 - KAFKA_CFG_PROCESS_ROLES: controller,broker - KAFKA_CFG_CONTROLLER_QUORUM_VOTERS: 0@kafka:9093 - KAFKA_CFG_LISTENERS: PLAINTEXT://:9092,CONTROLLER://:9093 - KAFKA_CFG_ADVERTISED_LISTENERS: PLAINTEXT://:9092 - KAFKA_CFG_LISTENER_SECURITY_PROTOCOL_MAP: CONTROLLER:PLAINTEXT,PLAINTEXT:PLAINTEXT - KAFKA_CFG_CONTROLLER_LISTENER_NAMES: CONTROLLER - KAFKA_CFG_INTER_BROKER_LISTENER_NAME: PLAINTEXT - volumes: - - tbmq-kafka-data:/bitnami/kafka - redis: - restart: always - image: "bitnamilegacy/redis:7.0" - environment: - # ALLOW_EMPTY_PASSWORD is recommended only for development. - ALLOW_EMPTY_PASSWORD: "yes" - ports: - - "6379" - volumes: - - tbmq-redis-data:/bitnami/redis/data - tbmq: - restart: always - image: "thingsboard/tbmq:1.4.0" - depends_on: - - postgres - - kafka - - redis - ports: - - "8083:8083" - - "1883:1883" - - "8084:8084" - environment: - TB_SERVICE_ID: tbmq - SPRING_DATASOURCE_URL: jdbc:postgresql://postgres:5432/thingsboard_mqtt_broker - SPRING_DATASOURCE_USERNAME: postgres - SPRING_DATASOURCE_PASSWORD: postgres - TB_KAFKA_SERVERS: kafka:9092 - REDIS_HOST: redis - SECURITY_MQTT_BASIC_ENABLED: "true" - #JAVA_OPTS: "-Xmx2048M -Xms2048M -Xss384k -XX:+AlwaysPreTouch" - volumes: - - tbmq-logs:/var/log/thingsboard-mqtt-broker - - tbmq-data:/data - -volumes: - tbmq-postgres-data: - external: true - tbmq-kafka-data: - external: true - tbmq-redis-data: - external: true - tbmq-logs: - external: true - tbmq-data: - external: true -``` -{: .copy-code} - -
-
- -Additionally, add the following line to your `tbmq-install-and-run.sh` script (locate `create_volume_if_not_exists` lines) to create a volume for Redis data: - -```bash -create_volume_if_not_exists tbmq-redis-data -``` -{: .copy-code} - -Or simply create it with the following command: - -```bash -docker volume create tbmq-redis-data -``` -{: .copy-code} - -Once this is done, run the script to apply the changes: - -```bash -./tbmq-install-and-run.sh -``` -{: .copy-code} - -This will restart TBMQ with Redis enabled. Afterward, you can proceed with the [upgrade process](#run-upgrade). -Please [contact us](https://github.com/thingsboard/tbmq/issues), so we can answer any questions and provide our help if needed. - -### Run upgrade - -In order to update to the latest version, execute the following commands: - -```shell -wget -O tbmq-upgrade.sh https://raw.githubusercontent.com/thingsboard/tbmq/{{ site.release.broker_branch }}/msa/tbmq/configs/tbmq-upgrade.sh && -sudo chmod +x tbmq-upgrade.sh && ./tbmq-upgrade.sh -``` -{: .copy-code} - -**NOTE**: replace `redis_url`, `db_url`, `db_username`, and `db_password` variables in the script with the corresponding values used during DB initialization. - -{% include templates/mqtt-broker/upgrade/upgrade-to-custom-release.md %} - -{% include templates/mqtt-broker/install/ssl/mqtts.md %} - -## Next steps - -{% assign currentGuide = "InstallationGuides" %}{% include templates/mqtt-broker-guides-banner.md %} +{% assign tbmqSuffix = "CE" %} +{% include docs/mqtt-broker/install/docker.md %} diff --git a/docs/mqtt-broker/install/ie-config.md b/docs/mqtt-broker/install/ie-config.md index 8a361432ad..9a0f5eb356 100644 --- a/docs/mqtt-broker/install/ie-config.md +++ b/docs/mqtt-broker/install/ie-config.md @@ -1,51 +1,9 @@ --- layout: docwithnav-mqtt-broker title: Integration Executor configuration properties -description: TBMQ IE configuration properties and environment variables +description: TBMQ CE IE configuration properties and environment variables --- -* TOC -{:toc} - -This guide will help you become familiar with TBMQ Integration Executor (IE) configuration files and parameters. -We **strongly recommend** configuring TBMQ IE using environment variables. -This way, you won't need to merge the configuration files when a new platform release arrives. - -The list of available configuration parameters and corresponding environment variables can be found [here](#configuration-parameters). - -## How to change configuration parameters? - -### Docker-Based deployment - -If TBMQ IE is installed in a Docker Compose environment, you can edit the scripts and add environment variables for -the corresponding containers. For more details, refer to the [Docker documentation](https://docs.docker.com/compose/environment-variables/#/the-envfile-configuration-option). - -### K8S-Based deployment - -If TBMQ IE is installed in a K8S environment, you can edit the scripts and add environment variables for the -corresponding deployments/stateful sets. For more details, refer to the [K8S documentation](https://kubernetes.io/docs/tasks/inject-data-application/define-environment-variable-container/). - -## Configuration parameters - -The configuration file is written in YAML format. All configuration parameters have corresponding environment variable names and default values. -To change a configuration parameter, simply modify its default value. For example: - -```bash -server: - address: "${HTTP_BIND_ADDRESS:0.0.0.0}" -``` - -In this case, *'HTTP_BIND_ADDRESS'* is the environment variable name and *'0.0.0.0'* is the default value. - -You can use the simple example below to add a new environment variable 'HTTP_BIND_PORT' with value '8084'. - -```bash -... -export HTTP_BIND_PORT=8084 -``` - -The parameters are grouped by system components. The list contains the name (address in **tbmq-integration-executor.yml** file), -environment variable, default value, and description. - -{% include docs/mqtt-broker/install/ie-config.md %} +{% assign tbmqSuffix = "CE" %} +{% include docs/mqtt-broker/install/ie-configuration.md %} diff --git a/docs/mqtt-broker/install/upgrade-instructions.md b/docs/mqtt-broker/install/upgrade-instructions.md index fd93852384..c851c56584 100644 --- a/docs/mqtt-broker/install/upgrade-instructions.md +++ b/docs/mqtt-broker/install/upgrade-instructions.md @@ -5,266 +5,4 @@ description: TBMQ upgrade instructions notitle: "true" --- -* TOC -{:toc} - -
-
-
-
-
-

TBMQ upgrade options

-
-
-
- {% include installation-options-cards.liquid installationOptions="installation-options-mqtt-broker-upgrade-instructions" active=true %} -
-
-
-
-
-
- -### Upgrading to 2.2.0 - -{% capture difference %} -**NOTE**: -
-These steps are applicable for 2.1.0 TBMQ version. In order to upgrade to 2.2.0 you need to [upgrade to 2.1.0 first](#upgrading-to-210). -{% endcapture %} -{% include templates/info-banner.md content=difference %} - -#### Notice About Bitnami Images in TBMQ Deployments - -In our TBMQ deployments, we use **Bitnami images** for third-party components such as PostgreSQL, Redis, and Kafka. -The Bitnami team [**has announced important upcoming changes**](https://github.com/bitnami/charts/issues/35164) to their catalog that affect these images. - -**What’s happening:** - -* Starting **August 28, 2025**, the public `docker.io/bitnami` registry will only provide a small set of “latest” hardened images for development use. -* All versioned images will be moved to a temporary legacy registry: `docker.io/bitnamilegacy`. These images will remain available but will not receive updates or security patches. -* The long-term, supported solution is Bitnami’s new Secure Images (subscription-based). - -**Temporary solution:** -To avoid disruption in your TBMQ deployments, please update your image references from `docker.io/bitnami/...` to `docker.io/bitnamilegacy/...`. -This ensures that your clusters continue to work after August 28, 2025. - -**Next steps:** -We are currently evaluating a **long-term strategy** for TBMQ third-party images. We’ll share the details once the new approach is finalized. - ---- - -Navigate to the appropriate documentation to proceed with the next upgrade steps by [choosing one of the cards](/docs/mqtt-broker/install/upgrade-instructions/) -on top of the page. - -### Upgrading to 2.1.0 - -{% capture difference %} -**NOTE**: -
-These steps are applicable for 2.0.0 and 2.0.1 TBMQ versions. -In order to upgrade to 2.1.0, your current version should be greater or equal to 2.0.0 version. -{% endcapture %} -{% include templates/info-banner.md content=difference %} - -#### Pull TBMQ image (Optional) - -Pull 2.1.0 version TBMQ image depending on your current installation. - -{% capture tabspec %}tbmq-pull-2-1-0 -tbmq-pull-2-1-0-single,Single node,shell,resources/2.1.0/tbmq-single-node-pull.sh,/docs/mqtt-broker/install/resources/2.1.0/tbmq-single-node-pull.sh -tbmq-pull-2-1-0-cluster,Cluster mode,shell,resources/2.1.0/tbmq-cluster-mode-pull.sh,/docs/mqtt-broker/install/resources/2.1.0/tbmq-cluster-mode-pull.sh{% endcapture %} -{% include tabs.html %} - -#### From version (automatically detected since 2.1.0) - -Starting from version 2.1.0, the _fromVersion_ parameter has been removed from the upgrade script and is no longer supported. -As of 2.1.0, the upgrade script automatically detects the currently installed version and determines whether the upgrade can proceed based on a predefined list of supported versions. - -Navigate to the appropriate documentation to proceed with the next upgrade steps by [choosing one of the cards](/docs/mqtt-broker/install/upgrade-instructions/) -on top of the page. - -### Upgrading to 2.0.1 - -{% capture difference %} -**NOTE**: -
-These steps are applicable for 2.0.0 TBMQ version. In order to upgrade to 2.0.1 you need to [upgrade to 2.0.0 first](#upgrading-to-200). -{% endcapture %} -{% include templates/info-banner.md content=difference %} - -#### Pull TBMQ image (Optional) - -Pull 2.0.1 version TBMQ image depending on your current installation. - -{% capture tabspec %}tbmq-pull-2-0-1 -tbmq-pull-2-0-1-single,Single node,shell,resources/2.0.1/tbmq-single-node-pull.sh,/docs/mqtt-broker/install/resources/2.0.1/tbmq-single-node-pull.sh -tbmq-pull-2-0-1-cluster,Cluster mode,shell,resources/2.0.1/tbmq-cluster-mode-pull.sh,/docs/mqtt-broker/install/resources/2.0.1/tbmq-cluster-mode-pull.sh{% endcapture %} -{% include tabs.html %} - -#### From version - -The _fromVersion_ should be set to **2.0.0**. - -Navigate to the appropriate documentation to proceed with the next upgrade steps by [choosing one of the cards](/docs/mqtt-broker/install/upgrade-instructions/) -on top of the page. - -### Upgrading to 2.0.0 - -{% capture difference %} -**NOTE**: -
-These steps are applicable for 1.4.0 TBMQ version. In order to upgrade to 2.0.0 you need to [upgrade to 1.4.0 first](#upgrading-to-140). -{% endcapture %} -{% include templates/info-banner.md content=difference %} - -This release of TBMQ introduces significant improvements, including key new features and a migration from PostgreSQL to Redis for storing messages for persistent DEVICE clients. -For more details, refer to the [architecture documentation](/docs/mqtt-broker/architecture/). - -Before upgrading, it is strongly recommended to back up your PostgreSQL database to ensure data safety. -Follow the steps by selecting an appropriate guide from [one of the cards](/docs/mqtt-broker/install/upgrade-instructions/) on top of the page. - -#### Pull TBMQ image (Optional) - -Pull 2.0.0 version TBMQ image depending on your current installation. - -{% capture tabspec %}tbmq-pull-2-0-0 -tbmq-pull-2-0-0-single,Single node,shell,resources/2.0.0/tbmq-single-node-pull.sh,/docs/mqtt-broker/install/resources/2.0.0/tbmq-single-node-pull.sh -tbmq-pull-2-0-0-cluster,Cluster mode,shell,resources/2.0.0/tbmq-cluster-mode-pull.sh,/docs/mqtt-broker/install/resources/2.0.0/tbmq-cluster-mode-pull.sh{% endcapture %} -{% include tabs.html %} - -#### From version - -The _fromVersion_ should be set to **1.4.0**. - -Navigate to the appropriate documentation to proceed with the next upgrade steps by [choosing one of the cards](/docs/mqtt-broker/install/upgrade-instructions/) -on top of the page. - -### Upgrading to 1.4.0 - -{% capture difference %} -**NOTE**: -
-These steps are applicable for 1.3.0 TBMQ version. In order to upgrade to 1.4.0 you need to [upgrade to 1.3.0 first](#upgrading-to-130). -{% endcapture %} -{% include templates/info-banner.md content=difference %} - -#### Pull TBMQ image (Optional) - -Pull 1.4.0 version TBMQ image depending on your current installation. - -{% capture tabspec %}tbmq-pull-1-4-0 -tbmq-pull-1-4-0-single,Single node,shell,resources/1.4.0/tbmq-single-node-pull.sh,/docs/mqtt-broker/install/resources/1.4.0/tbmq-single-node-pull.sh -tbmq-pull-1-4-0-cluster,Cluster mode,shell,resources/1.4.0/tbmq-cluster-mode-pull.sh,/docs/mqtt-broker/install/resources/1.4.0/tbmq-cluster-mode-pull.sh{% endcapture %} -{% include tabs.html %} - -#### From version - -The _fromVersion_ should be set to **1.3.0**. - -Navigate to the appropriate documentation to proceed with the next upgrade steps by [choosing one of the cards](/docs/mqtt-broker/install/upgrade-instructions/) -on top of the page. - -### Upgrading to 1.3.0 - -{% capture difference %} -**NOTE**: -
-These steps are applicable for 1.2.1 TBMQ version. In order to upgrade to 1.3.0 you need to [upgrade to 1.2.1 first](#upgrading-to-121). -{% endcapture %} -{% include templates/info-banner.md content=difference %} - -#### Pull TBMQ image (Optional) - -Pull 1.3.0 version TBMQ image depending on your current installation. - -{% capture tabspec %}tbmq-pull-1-3-0 -tbmq-pull-1-3-0-single,Single node,shell,resources/1.3.0/tbmq-single-node-pull.sh,/docs/mqtt-broker/install/resources/1.3.0/tbmq-single-node-pull.sh -tbmq-pull-1-3-0-cluster,Cluster mode,shell,resources/1.3.0/tbmq-cluster-mode-pull.sh,/docs/mqtt-broker/install/resources/1.3.0/tbmq-cluster-mode-pull.sh{% endcapture %} -{% include tabs.html %} - -#### From version - -The _fromVersion_ should be set to **1.2.1**. - -Navigate to the appropriate documentation to proceed with the next upgrade steps by [choosing one of the cards](/docs/mqtt-broker/install/upgrade-instructions/) -on top of the page. - -### Upgrading to 1.2.1 - -{% capture difference %} -**NOTE**: -
-These steps are applicable for 1.2.0 TBMQ version. In order to upgrade to 1.2.1 you need to [upgrade to 1.2.0 first](#upgrading-to-120). -{% endcapture %} -{% include templates/info-banner.md content=difference %} - -#### Pull TBMQ image (Optional) - -Pull 1.2.1 version TBMQ image depending on your current installation. - -{% capture tabspec %}tbmq-pull-1-2-1 -tbmq-pull-1-2-1-single,Single node,shell,resources/1.2.1/tbmq-single-node-pull.sh,/docs/mqtt-broker/install/resources/1.2.1/tbmq-single-node-pull.sh -tbmq-pull-1-2-1-cluster,Cluster mode,shell,resources/1.2.1/tbmq-cluster-mode-pull.sh,/docs/mqtt-broker/install/resources/1.2.1/tbmq-cluster-mode-pull.sh{% endcapture %} -{% include tabs.html %} - -#### From version - -The _fromVersion_ should be set to **1.2.0**. - -Navigate to the appropriate documentation to proceed with the next upgrade steps by [choosing one of the cards](/docs/mqtt-broker/install/upgrade-instructions/) -on top of the page. - -### Upgrading to 1.2.0 - -{% capture difference %} -**NOTE**: -
-These steps are applicable for 1.1.0 TBMQ version. In order to upgrade to 1.2.0 you need to [upgrade to 1.1.0 first](#upgrading-to-110). -{% endcapture %} -{% include templates/info-banner.md content=difference %} - -#### Pull TBMQ image (Optional) - -Pull 1.2.0 version TBMQ image depending on your current installation. - -{% capture tabspec %}tbmq-pull-1-2-0 -tbmq-pull-1-2-0-single,Single node,shell,resources/1.2.0/tbmq-single-node-pull.sh,/docs/mqtt-broker/install/resources/1.2.0/tbmq-single-node-pull.sh -tbmq-pull-1-2-0-cluster,Cluster mode,shell,resources/1.2.0/tbmq-cluster-mode-pull.sh,/docs/mqtt-broker/install/resources/1.2.0/tbmq-cluster-mode-pull.sh{% endcapture %} -{% include tabs.html %} - -#### From version - -The _fromVersion_ should be set to **1.1.0**. - -Navigate to the appropriate documentation to proceed with the next upgrade steps by [choosing one of the cards](/docs/mqtt-broker/install/upgrade-instructions/) -on top of the page. - -### Upgrading to 1.1.0 - -{% capture difference %} -**NOTE**: -
-These steps are applicable for 1.0.0, and 1.0.1 TBMQ versions. -{% endcapture %} -{% include templates/info-banner.md content=difference %} - -#### Pull TBMQ image (Optional) - -Pull 1.1.0 version TBMQ image depending on your current installation. - -{% capture tabspec %}tbmq-pull-1-1-0 -tbmq-pull-1-1-0-single,Single node,shell,resources/1.1.0/tbmq-single-node-pull.sh,/docs/mqtt-broker/install/resources/1.1.0/tbmq-single-node-pull.sh -tbmq-pull-1-1-0-cluster,Cluster mode,shell,resources/1.1.0/tbmq-cluster-mode-pull.sh,/docs/mqtt-broker/install/resources/1.1.0/tbmq-cluster-mode-pull.sh{% endcapture %} -{% include tabs.html %} - -#### From version - -The _fromVersion_ can be set to either **1.0.0** or **1.0.1** values. - -Navigate to the appropriate documentation to proceed with the next upgrade steps by [choosing one of the cards](/docs/mqtt-broker/install/upgrade-instructions/) -on top of the page. - -### Next steps - -{% assign currentGuide = "InstallationGuides" %}{% include templates/mqtt-broker-guides-banner.md %} +{% include docs/mqtt-broker/install/upgrade-instructions.md %} \ No newline at end of file diff --git a/docs/mqtt-broker/mqtt-client-credentials-management.md b/docs/mqtt-broker/mqtt-client-credentials-management.md index db27df39dd..0f644464bb 100644 --- a/docs/mqtt-broker/mqtt-client-credentials-management.md +++ b/docs/mqtt-broker/mqtt-client-credentials-management.md @@ -5,94 +5,4 @@ description: Create/Update/Delete MQTT Client Credentials --- -* TOC -{:toc} - -MQTT Client Credentials provide the means to configure security measures for connecting clients within the system. - -To create new client credentials within the system, it is imperative to first authenticate as an Admin user. -This authorization process grants you the necessary privileges and access rights to perform administrative tasks. - -By authenticating as an Admin user, you will have the authority to create and manage client credentials, -enabling you to enforce robust security measures for the clients connecting to the system. -This approach ensures that the system remains secure and that only authorized clients can establish connections and interact with TBMQ. - -{% include templates/mqtt-broker/authentication.md %} - -## Create/update MQTT Client Credentials - -**MQTT_BASIC** credentials example: - -```bash -curl --location --request POST 'http://localhost:8083/api/mqtt/client/credentials' \ ---header "X-Authorization: Bearer $ACCESS_TOKEN" \ ---header 'Content-Type: application/json' \ ---data-raw '{ - "name": "testCreds", - "credentialsType":"MQTT_BASIC", - "credentialsValue":"{ \"clientId\": null, \"userName\": \"test_user\", \"password\": \"test_pass\", \"authRules\": { \"pubAuthRulePatterns\": [\"test\/.*\"], \"subAuthRulePatterns\": [\"my\/.*\"] } }" -}' -``` -{: .copy-code} - -By implementing the above configuration, clients with the username **test_user** and password **test_pass** will be able to successfully log in to the system. -However, it's important to note that these clients will have restricted privileges based on the specified topic access permissions. - -Clients authenticated with these credentials will be limited to publishing messages solely to topics that start with _test/_. -Additionally, they will be allowed to subscribe exclusively to topics that start with _my/_. -This configuration ensures that the clients' access is constrained to specific topic patterns, thereby maintaining a controlled and secure environment. - -**SSL** credentials examples: - -```bash -curl --location --request POST 'http://localhost:8083/api/mqtt/client/credentials' \ ---header "X-Authorization: Bearer $ACCESS_TOKEN" \ ---header 'Content-Type: application/json' \ ---data-raw '{ - "name": "testSSLCreds", - "credentialsType":"SSL", - "credentialsValue":"{ \"certCnPattern\": \"Root Common Name\", \"certCnIsRegex\": false, \"authRulesMapping\": { \"test\": { \"pubAuthRulePatterns\": [\"test_ssl\/.*\"], \"subAuthRulePatterns\": [\"test_ssl\/.*\"] } } }" -}' -``` -{: .copy-code} - -```bash -curl --location --request POST 'http://localhost:8083/api/mqtt/client/credentials' \ ---header "X-Authorization: Bearer $ACCESS_TOKEN" \ ---header 'Content-Type: application/json' \ ---data-raw '{ - "name": "testSSLCredsWithPattern", - "credentialsType":"SSL", - "credentialsValue":"{ \"certCnPattern\": \".* Pattern Common Name .*\", \"certCnIsRegex\": true, \"authRulesMapping\": { \"test\": { \"pubAuthRulePatterns\": [\"test_ssl\/.*\"], \"subAuthRulePatterns\": [\"test_ssl\/.*\"] } } }" -}' -``` -{: .copy-code} - -Where: -- **certCnPattern** - the pattern for the common name that should be present in the certificate chain. -- **certCnIsRegex** - option to control whether the common name (CN) pattern is treated as a regular expression (regex) for matching. -- **authRulesMapping** - mapping rules to map extracted from the client's CN keyword to the authorization rules (to allow clients to publish and subscribe only to certain topics). - -By employing the above configurations, clients connecting with an X.509 Certificate chain will be permitted to log in based on specific criteria. -The X.509 Certificate chain should have the certificate CN that matches exactly with the _Root Common Name_ string in the first case, -matches with _.* Pattern Common Name .*_ in the second case, and the certificate's CN should contain the string _test_. -Once authenticated using these credentials, clients will gain access to publishing and subscribing privileges limited to topics that start with _test_ssl/_. - -## Get all MQTT Client Credentials - -```bash -curl --location --request GET 'http://localhost:8083/api/mqtt/client/credentials?pageSize=100&page=0' \ ---header "X-Authorization: Bearer $ACCESS_TOKEN" -``` -{: .copy-code} -**Note**, _pageSize_ parameter equal to 100 and _page_ parameter equal to 0, so the above request will fetch first 100 MQTT client credentials. - -## Delete MQTT Client Credentials - -```bash -curl --location --request DELETE 'http://localhost:8083/api/mqtt/client/credentials/$CREDENTIALS_ID' \ ---header "X-Authorization: Bearer $ACCESS_TOKEN" -``` -{: .copy-code} - -Paste actual ID of the MQTT client credentials you want to delete instead of _$CREDENTIALS_ID_. +{% include docs/mqtt-broker/mqtt-client-credentials-management.md %} \ No newline at end of file diff --git a/docs/mqtt-broker/other/blocked-client.md b/docs/mqtt-broker/other/blocked-client.md index 044fd1487e..242fdcaacf 100644 --- a/docs/mqtt-broker/other/blocked-client.md +++ b/docs/mqtt-broker/other/blocked-client.md @@ -5,105 +5,4 @@ description: TBMQ Blocked Clients description --- -* TOC -{:toc} - -The **Blocked Clients** feature in TBMQ allows administrators to restrict access to the broker based on specific client identifiers or pattern-based rules. -It strengthens security, helps conserve system resources, and provides fine-grained control over who can initiate and maintain connections with the MQTT broker. - -Blocked Clients are stored in memory for fast and efficient matching and are synchronized across all broker nodes in the cluster using Kafka. -This ensures consistent enforcement of block rules in distributed deployments. - -Each Blocked Client entry can include an optional expiration timestamp. Once expired, the entry is treated as inactive and automatically cleaned up during the periodic cleanup process. - -Importantly, Blocked Client checks are performed **before** the authentication phase. -This ensures that unauthorized or potentially malicious connection attempts are rejected early—before any credentials are evaluated—resulting in reduced system load and faster rejection of disallowed clients. - -> **Scenario**: You’ve detected a client (clientId: attack-bot-23) trying to flood the broker with connection attempts or malformed packets. -> **Action**: Create a CLIENT_ID block entry to immediately prevent further connections from this client. -> **Benefit**: Immediate mitigation of malicious behavior without requiring changes to authentication logic or certificates. - -## Supported Block Types - -![image](/images/mqtt-broker/other/blocked-clients.png) - -You can block a client using any of the following identifiers: - -| Block by | Label on UI | Description | -| ------------ |-------------| -------------------------------------- | -| `CLIENT_ID` | Client ID | Block clients with specific client IDs | -| `USERNAME` | Username | Block based on MQTT usernames | -| `IP_ADDRESS` | IP address | Block by the client’s IP address | -| `REGEX` | Regex | Pattern-based blocking using regex | - -The `REGEX` type supports matching based on one of: - -* `BY_CLIENT_ID` (UI label is "Client ID"). -* `BY_USERNAME` (UI label is "Username"). -* `BY_IP_ADDRESS` (UI label is "IP address"). - -To block all clients whose IDs start with `test-` followed by digits, you can use the following regex rule: - -```text -Block by: REGEX -Regex Pattern Value: ^test-\d+$ -Match by: BY_CLIENT_ID -``` - -This will block clients such as: - -* `test-001` -* `test-42` -* `test-9999` - -But **not**: - -* `demo-test-1` -* `test-user` -* `test-` - -Each entry can be in one of the following **three statuses**: - -* ✅ **Active** – The entry is valid and fully operational. -* ⏳ **Expired** – The entry is no longer valid but hasn't been cleaned up yet. -* ⚠️ **Deleting soon** – A transitional state for expired entries. This status appears **when more than half of the cleanup grace period has passed**, signaling that the entry is about to be removed by the system. - -## How It Works - -During the connection phase, each client is evaluated in the following order: - -1. Exact match on `CLIENT_ID`. -2. Exact match on `USERNAME`. -3. Exact match on `IP_ADDRESS`. -4. Regex-based match (if any exist). - -If a match is found and the corresponding entry is not expired, the connection is rejected. -Blocked Client events are also tracked and visible via the [Unauthorized Clients](/docs/mqtt-broker/user-guide/ui/unauthorized-clients/) feature. - -## Automatic Cleanup - -Expired Blocked Clients are automatically cleaned up in the background. - -```yaml -blocked-client: - cleanup: - # The parameter to specify the period of execution cleanup task for expired blocked clients. Value set in minutes. Default value corresponds to five minutes - period: "${BLOCKED_CLIENT_CLEANUP_PERIOD_MINUTES:5}" - # Time to Live for expired blocked clients. After this time, the expired blocked client is removed completely. Value set in minutes. Default value corresponds to one week - ttl: "${BLOCKED_CLIENT_CLEANUP_TTL_MINUTES:10080}" -``` - -Cleanup is performed only when the Blocked Client is expired and the TTL period has passed. - -## Recommendations - -To ensure optimal performance and maintainability when using the **Blocked Clients** feature, consider the following best practices: - -* **Avoid using regex rules unless truly needed**: Pattern matching with regular expressions can slow down the system, -as all regex rules must be checked for every client connection. Use this only when exact matches by client ID, username, or IP address are not enough. - -* **Use authentication to reject the majority of clients**: It’s better to block clients using standard authentication methods. -Blocking should be used as an additional method, not the main one. - -* **Keep the number of Blocked Clients low**: A large number of blocked entries, especially regex-based ones, can use more memory and slow down lookups. -Keeping the list small ensures faster performance and better scalability. +{% include docs/mqtt-broker/other/blocked-client.md %} diff --git a/docs/mqtt-broker/other/health.md b/docs/mqtt-broker/other/health.md index fd73b5b4a3..aa8cead8f0 100644 --- a/docs/mqtt-broker/other/health.md +++ b/docs/mqtt-broker/other/health.md @@ -5,249 +5,4 @@ description: TBMQ Health API description --- -* TOC -{:toc} - -TBMQ supports **health checks** through the Spring Boot Actuator framework. -Health checks allow monitoring systems to assess the state of TBMQ and its dependencies. -TBMQ health checks are available through the `/actuator/health` endpoint on **8083** port, -which can be customized to include specific details about the connection health to critical services such as **PostgreSQL**, **Kafka**, and **Redis**. - -## Health Endpoint Response Status Codes - -* **200 OK**: The system is healthy, and all components are functioning properly. -* **503 Service Unavailable**: One or more components have failed, and the system is deemed unhealthy. - -## Key Configuration Parameters - -The following parameters are used to configure health checks and expose them through the actuator endpoint. - -```yaml -management: - health: - diskspace: - # Enable/disable disk space health check - enabled: "${HEALTH_DISKSPACE_ENABLED:false}" - endpoint: - health: - # Controls whether health endpoint shows full component details (e.g., Redis, DB, TBMQ). - # Options: - # - 'never': always hide details (default if security is enabled). - # - 'when-authorized': show details only to authenticated users. - # - 'always': always include full health details in the response - show-details: "${HEALTH_SHOW_DETAILS:never}" - endpoints: - web: - exposure: - # Specify which Actuator endpoints should be exposed via HTTP. - # Use 'health,info' to expose only basic health and information endpoints. - # For exposing Prometheus metrics, update this to include 'prometheus' in the list (e.g., 'health,info,prometheus') - include: "${METRICS_ENDPOINTS_EXPOSE:health,info,prometheus}" -``` - -### Explanation of Parameters - -1. **`health.diskspace.enabled`**: - - * **Description**: Enables or disables the disk space health check. - * **Default**: Disabled (`false`). - * **Use case**: If enabled, it checks the disk usage of the container and reports if disk space is running low. - -2. **`endpoint.health.show-details`**: - - * **Description**: Controls the visibility of detailed health information for the `/actuator/health` endpoint. - * **Options**: - * `never`: Always hides detailed component information (default when security is enabled). - * `when-authorized`: Shows details only to authenticated users. - * `always`: Always includes full health details in the response. - * **Default**: `never`. - * **Use case**: This is used to manage the exposure of health details based on security and access controls. - -3. **`endpoints.web.exposure.include`**: - - * **Description**: Specifies which Actuator endpoints should be exposed via HTTP. - * **Example**: `health,info,prometheus`. - * **Use case**: This controls which endpoints are publicly accessible, e.g., `health`, `info`, or even `prometheus` metrics. - -### Example Health Check Endpoint Output - -The `/actuator/health` endpoint provides JSON data that reflects both the overall system status and the status of individual components, -including custom checks such as **TBMQ** and **Kafka**. -This detailed information is included when the `show-details` setting is not configured to `never`. -If `show-details` is set to `never`, the endpoint will only return the overall status without component details. - -**Healthy Response**: - -```json -{ - "status":"UP", - "components":{ - "db":{ - "status":"UP", - "details":{ - "database":"PostgreSQL", - "validationQuery":"isValid()" - } - }, - "kafka":{ - "status":"UP", - "details":{ - "brokerCount":3 - } - }, - "ping":{ - "status":"UP" - }, - "redis":{ - "status":"UP", - "details":{ - "version":"7.0.15" - } - }, - "tbmq":{ - "status":"UP" - } - } -} -``` - -**Unhealthy Response**: - -```json -{ - "status":"DOWN", - "components":{ - "db":{ - "status":"UP", - "details":{ - "database":"PostgreSQL", - "validationQuery":"isValid()" - } - }, - "kafka":{ - "status":"UP", - "details":{ - "brokerCount":1 - } - }, - "ping":{ - "status":"UP" - }, - "redis":{ - "status":"DOWN", - "details":{ - "error":"org.springframework.dao.QueryTimeoutException: Redis command timed out" - } - }, - "tbmq":{ - "status":"UP" - } - } -} -``` - -In the example above: - -* If the system is **UP**, the health check will return a status of `UP` for individual components (e.g., `db`, `redis`, `tbmq`, `kafka`). -This means the TBMQ is running smoothly and all dependencies are healthy. -* If any individual component fails (e.g., `redis`, `kafka`), the health check will return `DOWN` for that specific service -and provide an error message explaining why the service is unavailable (e.g., "Redis connection failed" or "Kafka broker not reachable"). -* If **any** of the services (e.g., `db`, `redis`, `tbmq`, `kafka`) is down, the **overall status** of the health check will be `DOWN`. -This means that even if one of the components is unavailable, the entire system is considered unhealthy. - -### Timeouts Configuration - -The health checks verify the connectivity to essential dependencies, such as Kafka, Redis, and PostgreSQL, -by executing specific commands designed to test the connection. -Each command is subject to a timeout, which determines how long the health check will wait before considering the -connectivity test to have failed. -The timeout for each third-party service can be customized to suit your application's requirements. - -```yaml -# Kafka Admin client command timeout (in seconds). Applies to operations like describeCluster, listTopics, etc -queue.command-timeout: "${TB_KAFKA_ADMIN_COMMAND_TIMEOUT_SEC:30}" - -# Maximum time (in seconds) to wait for a lettuce command to complete. -# This affects health checks and any command execution (e.g. GET, SET, PING). -# Reduce this to fail fast if Redis is unresponsive -lettuce.command-timeout: "${REDIS_LETTUCE_COMMAND_TIMEOUT_SEC:30}" - -# Maximum time (in milliseconds) HikariCP will wait to acquire a connection from the pool. -# If exceeded, an exception is thrown. Default is 30 seconds -spring.connectionTimeout: "${SPRING_DATASOURCE_CONNECTION_TIMEOUT_MS:30000}" -``` - -## Integration Executor Microservice - -The **TBMQ Integration Executor (IE)** also has a health check exposed through Spring Boot Actuator. -This health check monitors the health of the Integration Executor, ensuring it can connect to Kafka. - -* **Endpoint**: The health check is available at `/actuator/health`. -* **Health Check URL**: The health check verifies the status of the service by sending an HTTP request to the `/actuator/health` endpoint on port **8082**. - -**Healthy Response**: - -```json -{ - "status":"UP", - "components":{ - "kafka":{ - "status":"UP", - "details":{ - "brokerCount":3 - } - }, - "ping":{ - "status":"UP" - } - } -} -``` - -## Conclusion - -* **Health Checks**: TBMQ uses Spring Boot Actuator’s health check mechanism to monitor its own state and dependencies like **PostgreSQL**, **Kafka**, and **Redis**. -* **Configurable Health Details**: You can customize the level of detail shown in health check responses, whether always, based on authorization, or hidden. - -By configuring health checks and exposing detailed health information, -you can ensure that TBMQ's operational state is properly monitored and alerting systems can be set up based on this data. - -**Docker Compose Configuration Example**: - -```yaml -healthcheck: - test: ["CMD", "curl", "-f", "http://localhost:8083/actuator/health"] - interval: 30s - retries: 3 - start_period: 30s - timeout: 10s -``` -{: .copy-code} - -**In Kubernetes**, you can configure liveness and readiness probes in your pod/statefulset/deployment configuration: - -```yaml -livenessProbe: - httpGet: - path: /actuator/health - port: 8083 - initialDelaySeconds: 30 - periodSeconds: 30 - timeoutSeconds: 10 - failureThreshold: 3 - -readinessProbe: - httpGet: - path: /actuator/health - port: 8083 - initialDelaySeconds: 30 - periodSeconds: 30 - timeoutSeconds: 10 - failureThreshold: 3 -``` -{: .copy-code} - -These resources provide detailed information on configuring and utilizing health checks in **Docker** and **Kubernetes** environments. - -* **Docker Health Checks Documentation**: [Docker Health Checks](https://docs.docker.com/reference/dockerfile/#healthcheck). -* **Kubernetes Probes**: [Kubernetes Probes](https://kubernetes.io/docs/tasks/configure-pod-container/configure-liveness-readiness-startup-probes/). +{% include docs/mqtt-broker/other/health.md %} diff --git a/docs/mqtt-broker/other/msg-delivery-strategy.md b/docs/mqtt-broker/other/msg-delivery-strategy.md index 9b994ae882..89e7128f79 100644 --- a/docs/mqtt-broker/other/msg-delivery-strategy.md +++ b/docs/mqtt-broker/other/msg-delivery-strategy.md @@ -5,183 +5,4 @@ description: TBMQ Message Delivery Strategies documentation --- -* TOC -{:toc} - -This feature addresses how messages are delivered to MQTT subscribers in TBMQ. When a client subscribes to a topic and a new matching message is published, -TBMQ delivers the message to the subscriber using its underlying networking layer—**Netty**. - -Netty provides two main ways to send messages over a network channel: -- `writeAndFlush()`: Sends the message and immediately flushes the channel, pushing data to the network right away. -- `write()` (without `flush()`): Writes the message to the channel's buffer but does not send it immediately. It remains in the buffer until a separate `flush()` call is made. - -TBMQ leverages this capability to offer two **delivery strategies**: -- **Write and flush for each message**; -- **Buffer messages and flush periodically or based on count**. - -These strategies are configurable for [two types of clients](/docs/mqtt-broker/user-guide/mqtt-client-type/): -- **Device clients** (non-persistent and persistent clients); -- **Application clients** (persistent clients). - - -## Write and Flush for Each Message - -- **Behavior**: TBMQ calls `writeAndFlush()` for every message sent to a subscriber. -- **Pros**: - - Ensures low latency — messages are delivered as soon as they are available. - - Simple and reliable, ideal for low-throughput environments. -- **Cons**: - - High CPU and I/O overhead under heavy load. - - Can cause performance bottlenecks due to excessive flushing. - -## Buffered Delivery (Write without Flush) - -- **Behavior**: TBMQ calls `write()` to queue the message in the Netty channel buffer. A `flush()` is triggered: - - After a configured number of messages (`buffered-msg-count`) are buffered. - - If a session becomes idle for the duration specified by `idle-session-flush-timeout-ms` (i.e., no new messages are sent to the subscriber during this time), the buffer is automatically flushed. This behavior applies only to Device clients. -- **Pros**: - - Greatly reduces the number of flush operations, improving throughput. - - More efficient under high-load or bursty message traffic. -- **Cons**: - - May introduce delivery delays, particularly in low-throughput scenarios where messages are published infrequently. - -## Configuration - -You can configure the strategy separately for **Device clients** and **Application clients** via application properties. - -### Device Clients - -```yaml -# If enabled, each message is published to non-persistent subscribers with flush. When disabled, the messages are buffered in the channel and are flushed once in a while -write-and-flush: "${MQTT_MSG_WRITE_AND_FLUSH:true}" -# Number of messages buffered in the channel before the flush is made. Used when `MQTT_MSG_WRITE_AND_FLUSH` = false -buffered-msg-count: "${MQTT_BUFFERED_MSG_COUNT:5}" - -# If enabled, each message is published to persistent DEVICE client subscribers with flush. When disabled, the messages are buffered in the channel and are flushed once in a while -persistent-session.device.write-and-flush: "${MQTT_PERSISTENT_MSG_WRITE_AND_FLUSH:true}" -# Number of messages buffered in the channel before the flush is made. Used when `MQTT_PERSISTENT_MSG_WRITE_AND_FLUSH` = false -persistent-session.device.buffered-msg-count: "${MQTT_PERSISTENT_BUFFERED_MSG_COUNT:5}" -``` - -### Additional Buffered Delivery Settings (Device Clients) - -When message buffering is enabled, TBMQ maintains a cache of active client sessions to track buffered messages and determine when to flush them. -The parameters below define the cache size, expiration policies, and scheduler behavior responsible for flushing message buffers based on activity or thresholds. - -```yaml -# When either `MQTT_MSG_WRITE_AND_FLUSH` or `MQTT_PERSISTENT_MSG_WRITE_AND_FLUSH` is set to false, -# the broker buffers outgoing messages in the outbound channel to improve throughput. -# The respective buffer sizes are controlled by `MQTT_BUFFERED_MSG_COUNT` (for non-persistent clients) -# and `MQTT_PERSISTENT_BUFFERED_MSG_COUNT` (for persistent clients). -# This property defines the maximum number of session entries that can be stored in the flush state cache. -# When the cache exceeds this size, the least recently used sessions are evicted -# and their pending message buffers are flushed automatically -session-cache-max-size: "${MQTT_BUFFERED_CACHE_MAX_SIZE:10000}" -# Time in milliseconds after which an inactive session entry in the flush cache expires. -# A session is considered inactive if it receives no new messages during this period. -# Upon expiration, the session is evicted from the cache and its buffer is flushed. -# Default is 5 minutes -session-cache-expiration-ms: "${MQTT_BUFFERED_CACHE_EXPIRY_MS:300000}" -# Interval in milliseconds at which the scheduler checks all sessions in the cache -# for potential flushing. A smaller value results in more frequent flush checks -scheduler-execution-interval-ms: "${MQTT_BUFFERED_SCHEDULER_INTERVAL_MS:100}" -# Maximum duration in milliseconds that a session can remain idle (i.e., without being flushed) -# before its message buffer is automatically flushed to the client. -# In essence, a flush occurs either when the buffer limit is reached or when this timeout elapses -idle-session-flush-timeout-ms: "${MQTT_BUFFERED_IDLE_FLUSH_MS:200}" -``` - -### Application Clients - -```yaml -# If enabled, each message is published to persistent APPLICATION client subscribers with flush. When disabled, the messages are buffered in the channel and are flushed once in a while -write-and-flush: "${MQTT_APP_MSG_WRITE_AND_FLUSH:false}" -# Number of messages buffered in the channel before the flush is made. Used when `MQTT_APP_MSG_WRITE_AND_FLUSH` = false -buffered-msg-count: "${MQTT_APP_BUFFERED_MSG_COUNT:10}" -``` - -## How It Works - -When a **Device client** session is active and buffering is enabled: - -1. **Session Buffer Creation** - TBMQ stores the session state in a cache with a `SessionFlushState` object that holds: - - The count of buffered messages. - - The timestamp of the last flush. - - The client’s Netty channel context. - -2. **Message Write without Flush** - When a message is delivered: - - It's written using `channel.write()`, without an immediate flush. - - The buffer count is incremented. - -3. **Flush Trigger** - A flush is triggered in any of the following cases: - - **Buffered count** reaches the configured threshold (e.g., 5). - - **Session is idle** for more than the configured timeout. - - **Session is evicted** from cache (due to expiration or max size), and pending messages are flushed to avoid data loss. - -4. **Scheduled Background Flusher** - A background thread periodically scans the cache and flushes idle session buffers. - -5. **Shutdown Handling** - On service shutdown, all buffered sessions are flushed to ensure message delivery consistency. - -For **Application clients**, buffered delivery is applied during message processing in batches. - -- Messages are written to the Netty channel using `write()` without an immediate flush. -- A flush is triggered **after a configured number of messages** (`buffered-msg-count`, default: 10) have been written. -- Once the entire batch is processed, **any remaining unflushed messages are flushed explicitly**. -- This approach avoids idle-time-based flushing and is optimized for high-throughput, batched delivery scenarios. - -This strategy is made possible because each Application client is processed in a dedicated thread (consumer) that polls messages from dedicated Kafka topic, allowing TBMQ to control flushing independently per client. -This design provides precise batching and flushing without requiring shared caches or background schedulers, leading to both scalability and consistency in message delivery. - -## Recommendations - -Choosing the right message delivery strategy depends on your workload characteristics, performance goals, and client behavior. Below are some practical recommendations to guide your configuration. - -**Use `write-and-flush = true` (No Buffering) When:** - -- You prioritize **low latency** over throughput. -- Your system experiences **low to moderate message rates**. -- Clients expect **immediate delivery** (e.g., real-time dashboards, alerts). -- Simplicity and predictability are more important than raw performance. - -**Use `write-and-flush = false` (Buffered Delivery) When:** - -- You expect **high-throughput** workloads with **frequent publications**. -- Minimizing **system call overhead and I/O pressure** is important. -- Clients can tolerate slight delivery delays in exchange for improved efficiency. -- You want to **scale to thousands of clients** without saturating the CPU or network. - -### Tuning Tips - -- Start with `buffered-msg-count` values between **5–10** and adjust based on profiling. -- For Device clients, tune `idle-session-flush-timeout-ms` to balance between delay and timely delivery. -- Monitor logs for cache evictions and flush timings to identify performance bottlenecks. -- If messages are frequently delayed in low-throughput setups, consider enabling immediate flushing. - -### Recommendation Summary - -| Scenario | Recommended Setting | -|------------------------------------|------------------------------------------| -| Low-latency, real-time delivery | `write-and-flush = true` | -| High message volume | `write-and-flush = false`, with tuning | -| Batch-based Application processing | Application buffering with custom count | -| Low-frequency messages | Avoid buffering to prevent delays | - -> In our 3 million messages per second (3M msg/sec) performance test on a single TBMQ node, buffered delivery was enabled to maximize throughput and overall system performance. -> This configuration significantly reduced CPU overhead and improved latency, resulting in more efficient message processing under high load. -> See the [performance test results](/docs/mqtt-broker/reference/3m-throughput-single-node-performance-test/) and -> [configuration details](https://github.com/thingsboard/tbmq/blob/3M-single-node-perf-test/k8s/aws/tb-broker-configmap.yml) for more information. - -## Conclusion - -The Buffered Message Delivery mechanism provides a smart and flexible way to manage how messages are sent to MQTT subscribers in TBMQ. By leveraging Netty’s ability to defer flushing, TBMQ can significantly reduce I/O overhead and increase throughput in demanding environments. - -**Choose the delivery strategy that best matches your deployment needs:** -- Use **write-and-flush** for low-latency, low-throughput scenarios. -- Enable **buffering** for high-throughput workloads where performance optimization is crucial. - -This feature ensures that your MQTT message delivery pipeline remains efficient, reliable, and adaptable to varying client behaviors and system loads. +{% include docs/mqtt-broker/other/msg-delivery-strategy.md %} diff --git a/docs/mqtt-broker/other/proxy-protocol.md b/docs/mqtt-broker/other/proxy-protocol.md index 303d5cb5b8..0022da6702 100644 --- a/docs/mqtt-broker/other/proxy-protocol.md +++ b/docs/mqtt-broker/other/proxy-protocol.md @@ -5,140 +5,4 @@ description: TBMQ PROXY Protocol description --- -* TOC -{:toc} - - -The [PROXY Protocol](https://www.haproxy.org/download/1.8/doc/proxy-protocol.txt) is a simple protocol used to safely transport connection information such as the client's IP address across multiple layers of proxies or load balancers. - -TBMQ supports both **PROXY Protocol v1** and **v2**, enabling it to receive and process the real client IP and port, -which is critical for accurate auditing, rate limiting, access control, and understanding the actual source of client connections. - -- **PROXY Protocol v1**: A human-readable ASCII-based format that prepends connection metadata (e.g., IP addresses and ports) to the TCP stream. -- **PROXY Protocol v2**: A more efficient binary format that provides the same information as v1 but with enhanced protocol support and better performance in high-throughput environments. - -By using PROXY Protocol, TBMQ can log, filter, and apply policies based on the real IP address of clients, which is otherwise masked by the proxy or load balancer. - -## How does the PROXY protocol work? - -The PROXY Protocol appends **meta-information** about the original client connection at the very start of the TCP stream. -This metadata is sent by the proxy or load balancer **before** any protocol-specific data, such as the MQTT CONNECT packet. - -![image](/images/mqtt-broker/other/proxy-protocol.png) - -When a client connects to TBMQ through a proxy that supports PROXY Protocol, the connection flow is as follows: - -1. The proxy accepts the TCP connection from the client. -2. The proxy immediately sends a **PROXY Protocol header** containing: - - The client's **source IP** and **port**. - - The proxy's **destination IP** and **port**. - - The **protocol type** (TCP over IPv4 or IPv6). -3. TBMQ, with PROXY Protocol enabled, reads this header first, extracts the real client information, and then continues processing the MQTT data (starting with the CONNECT message). - -- In **PROXY Protocol v1**, this header is sent in **ASCII** format, e.g.: - ``` - PROXY TCP4 192.0.2.1 198.51.100.1 12345 1883\r\n - ``` -- In **PROXY Protocol v2**, the header is in a **binary** format, more compact and efficient for high-performance systems. - -This means TBMQ treats the very first bytes of every incoming connection as PROXY Protocol data, before interpreting it as an MQTT connection. - -## When to use the protocol? - -You should enable the PROXY Protocol in TBMQ when: - -- TBMQ is deployed **behind a load balancer** or **reverse proxy** (e.g., HAProxy, AWS NLB, NGINX) that supports the PROXY Protocol. -- You need to capture the **real IP address** of clients for: - - Accurate **logging** of client connection details. - - Applying **IP-based security policies** and **rate limiting**. - - Detailed **auditing** and **analytics** based on the true client origin. - -TBMQ stores the client IP address as part of the **client session information**. -This IP address is also used in the **Unauthorized Clients** feature, where TBMQ tracks connection attempts from clients that fail authentication. -Having the correct IP address helps in identifying the source of unauthorized access attempts and improving security monitoring. - -Without PROXY Protocol, TBMQ will only see the IP of the proxy or load balancer, making it impossible to distinguish between individual clients behind the proxy. -Enabling PROXY Protocol ensures TBMQ receives the actual client IP and port at connection time. - -> **Important**: Do **not** enable PROXY Protocol unless your proxy is properly configured to send PROXY Protocol headers. When enabled, TBMQ expects the PROXY Protocol header at the beginning of each TCP connection. - -## How to enable the protocol? - -To enable PROXY Protocol support in TBMQ, you need to update the configuration settings for MQTT listeners. -The PROXY Protocol setting applies **globally** to all MQTT listeners in TBMQ and **cannot** be configured per listener. -However, future releases may introduce the ability to configure PROXY Protocol on a per-listener basis. - -```yaml -# MQTT listeners parameters -listener: - # Enable proxy protocol support. Disabled by default. If enabled, supports both v1 and v2. - # Useful to get the real IP address of the client in the logs, for session details info and unauthorized clients feature - proxy_enabled: "${MQTT_PROXY_PROTOCOL_ENABLED:false}" -``` - -Set the environment variable `MQTT_PROXY_PROTOCOL_ENABLED` to "**true**". - -**Important Notes:** - -- When `proxy_enabled` is set to `true`, TBMQ automatically supports both **PROXY Protocol v1 and v2**. -- This setting ensures that TBMQ correctly interprets the PROXY Protocol headers sent at the start of each TCP connection, **before** any MQTT-specific data. - -### HAPROXY - -To forward the real client IP to TBMQ using PROXY Protocol, configure **HAProxy** as follows: - -```text -server tbmq1 192.168.1.100:1883 send-proxy -``` - -- `send-proxy`: Instructs HAProxy to send PROXY Protocol v1 headers to TBMQ. -- Replace `192.168.1.100:1883` with your TBMQ broker’s IP and port. - -To use PROXY Protocol v2, change to: - -```text -server tbmq1 192.168.1.100:1883 send-proxy-v2 -``` - -- `send-proxy-v2`: Sends PROXY Protocol v2 headers to TBMQ. - -You can find the full HAProxy configuration guide for enabling PROXY Protocol [here](https://www.haproxy.com/documentation/haproxy-configuration-tutorials/proxying-essentials/client-ip-preservation/enable-proxy-protocol/). - -### AWS Network Load Balancer (NLB) - -To use PROXY Protocol with **AWS NLB**, enable **PROXY Protocol v2**: - -1. Ensure your NLB is **TCP** or **TLS** type. -2. Enable PROXY Protocol v2 using the AWS CLI: - -```bash -aws elbv2 modify-target-group-attributes \ - --target-group-arn \ - --attributes Key=proxy_protocol_v2.enabled,Value=true -``` -{: .copy-code} - -> **Note**: AWS NLB only supports **PROXY Protocol v2**. - -Alternatively, to enable **PROXY Protocol v2** with AWS NLB in a Kubernetes environment, add the following annotation to your Service definition: - -```yaml -service.beta.kubernetes.io/aws-load-balancer-proxy-protocol: "*" -``` -{: .copy-code} - -- The `*` enables **PROXY Protocol v2** for all source IPs. - -See official [AWS documentation](https://kubernetes-sigs.github.io/aws-load-balancer-controller/latest/guide/service/nlb/#protocols) for more details. - -## Considerations - -* If PROXY Protocol is enabled in TBMQ but not used by your proxy/load balancer, TBMQ will fail to interpret the initial bytes, potentially rejecting the connection. -* If PROXY Protocol is disabled in TBMQ but enabled on your proxy/load balancer, TBMQ will misinterpret the PROXY Protocol header as part of the MQTT data, leading to connection errors or protocol parsing failures. -* Ensure all connections to TBMQ are routed through a properly configured proxy when PROXY Protocol support is enabled. -* PROXY Protocol should only be enabled if TBMQ is deployed behind a trusted proxy, as it allows the proxy to define client IPs. - -> **Note:** TBMQ is not protocol-agnostic regarding PROXY Protocol support. -> When PROXY Protocol is enabled, all connections must include the PROXY header. -> Mixing connections with and without the PROXY header on the same listener is not supported. -> Future releases may introduce more flexible handling to support mixed connection types. +{% include docs/mqtt-broker/other/proxy-protocol.md %} diff --git a/docs/mqtt-broker/search.md b/docs/mqtt-broker/search.md index 2cdc268033..8ca864f59f 100644 --- a/docs/mqtt-broker/search.md +++ b/docs/mqtt-broker/search.md @@ -3,4 +3,5 @@ layout: docwithnav-mqtt-broker title: Search Results hidetoc: "true" --- + {% include search.html %} diff --git a/docs/mqtt-broker/security/https.md b/docs/mqtt-broker/security/https.md index 37168ba574..a5ce5f2ad7 100644 --- a/docs/mqtt-broker/security/https.md +++ b/docs/mqtt-broker/security/https.md @@ -1,78 +1,8 @@ --- layout: docwithnav-mqtt-broker title: HTTP over SSL -description: Launching TBMQ with secure HTTP web interface and REST API. +description: Launching TBMQ CE with secure HTTP web interface and REST API. --- -* TOC -{:toc} - -TBMQ provides the ability to run HTTP server that hosts Web UI and serves REST API calls over SSL. - -Most of the TBMQ environments use the load balancer as a termination point for the SSL connection between the client and the broker. -In other words, internet traffic is encrypted between the user browser and the load balancer, but is decrypted between the load balancer and broker services. -The advantage of such options is a simple configuration. -Most of the cloud load balancers (AWS, Google cloud, etc.) have built-in certificate generation tools and rich documentation how to configure SSL. - -Nevertheless, it is possible to configure TBMQ to enable SSL and avoid SSL termination on the Load Balancer. -We recommend to use valid SSL certificates generated using trusted CA authorities and avoid spending time on resolving issues with [self-signed certificates](#self-signed-certificates-generation). -See instructions below on how to configure SSL for certificates stored in PEM file format or Java Keystore. - -## SSL configuration using PEM certificates file - -Configure the following environment variables via [configuration](/docs/mqtt-broker/install/config/#http-server-parameters) file, docker-compose or kubernetes scripts. - -```bash -... -export SSL_ENABLED=true -export SSL_CREDENTIALS_TYPE=PEM -export SSL_PEM_CERT=server.pem -export SSL_PEM_KEY=server_key.pem -export SSL_PEM_KEY_PASSWORD=secret -... -``` - -where: - -* SSL_ENABLED - Enable/disable SSL support; -* SSL_CREDENTIALS_TYPE - Server credentials type. PEM - pem certificate file; KEYSTORE - java keystore; -* SSL_PEM_CERT - Path to the server certificate file. Holds server certificate or certificate chain, may also include server private key; -* SSL_PEM_KEY - Path to the server certificate private key file. Optional by default. Required if the private key is not present in server certificate file; -* SSL_PEM_KEY_PASSWORD - Optional server certificate private key password. - -After completing the setup, start or restart the TBMQ server. - -{% include templates/mqtt-broker/ssl/pem_files_location.md %} - -## SSL configuration using Java Keystore - -Configure the following environment variables via [configuration](/docs/mqtt-broker/install/config/#http-server-parameters) file, docker-compose or kubernetes scripts. - -```bash -... -export SSL_ENABLED=true -export SSL_CREDENTIALS_TYPE=KEYSTORE -export SSL_KEY_STORE_TYPE=PKCS12 -export SSL_KEY_STORE=keystore.p12 -export SSL_KEY_STORE_PASSWORD=tbmq -export SSL_KEY_PASSWORD=tbmq -... -``` - -where: - -* SSL_ENABLED - Enable/disable SSL support; -* SSL_CREDENTIALS_TYPE - Server credentials type. PEM - pem certificate file; KEYSTORE - java keystore; -* SSL_KEY_STORE_TYPE - Type of the key store (JKS or PKCS12); -* SSL_KEY_STORE - Path to the key store that holds the SSL certificate or certificate chain, also include server private key; -* SSL_KEY_STORE_PASSWORD - Password used to access the key store; -* SSL_KEY_PASSWORD - Password used to access the server private key. - -After completing the setup, start or restart the TBMQ server. - -{% include templates/mqtt-broker/ssl/keystore_files_location.md %} - -{% include docs/user-guide/ssl/self-signed-ecc.md %} - -{% include templates/mqtt-broker/ssl/pem-to-keystore.md %} +{% include docs/mqtt-broker/security/https.md %} diff --git a/docs/mqtt-broker/security/mqtts.md b/docs/mqtt-broker/security/mqtts.md index 4193f204cc..18b60eb950 100644 --- a/docs/mqtt-broker/security/mqtts.md +++ b/docs/mqtt-broker/security/mqtts.md @@ -5,112 +5,4 @@ description: Launching TBMQ with secure MQTT protocol to connect your IoT device --- -* TOC -{:toc} - -TBMQ provides the ability to run MQTT server and MQTT over WebSocket over SSL. Both one-way and two-way SSL are supported. - -Most of the TBMQ environments use the load balancer as a termination point for the SSL connection between the devices and the broker. -In other words, MQTT traffic is encrypted between the device and the load balancer, but is decrypted between the load balancer and broker services. -The advantage of such an option is the simplicity of configuration. -Most of the cloud load balancers (AWS, Google cloud, etc.) have built-in certificate generation tools and rich documentation how to configure SSL over TCP. -The disadvantage of such an option is that two-way SSL is not possible. The information about client certificate is not passed from the load balancer to the broker services. - -Nevertheless, it is possible to configure TBMQ to two-way SSL for MQTT and avoid SSL termination on the Load Balancer. -We recommend to use valid SSL certificates generated using trusted CA authorities and avoid spending time on resolving issues with [self-signed certificates](#self-signed-certificates-generation). -See instructions below on how to configure SSL for certificates stored in PEM file format or Java Keystore. - -## SSL configuration using PEM certificates file - -Configure the following environment variables via [configuration](/docs/mqtt-broker/install/config/#mqtt-listeners-parameters) file, docker-compose or kubernetes scripts. - -```bash -... -export LISTENER_SSL_ENABLED=true -export LISTENER_SSL_CREDENTIALS_TYPE=PEM -export LISTENER_SSL_PEM_CERT=server.pem -export LISTENER_SSL_PEM_KEY=server_key.pem -export LISTENER_SSL_PEM_KEY_PASSWORD=secret -... -``` - -where: - -* LISTENER_SSL_ENABLED - Enable/disable SSL support; -* LISTENER_SSL_CREDENTIALS_TYPE - Server credentials type. PEM - pem certificate file; KEYSTORE - java keystore; -* LISTENER_SSL_PEM_CERT - Path to the server certificate file. Holds server certificate or certificate chain, may also include server private key; -* LISTENER_SSL_PEM_KEY - Path to the server certificate private key file. Optional by default. Required if the private key is not present in server certificate file; -* LISTENER_SSL_PEM_KEY_PASSWORD - Optional server certificate private key password. - -After completing the setup, start or restart the TBMQ server. - -{% include templates/mqtt-broker/ssl/pem_files_location.md %} - -## SSL configuration using Java Keystore - -Configure the following environment variables via [configuration](/docs/mqtt-broker/install/config/#mqtt-listeners-parameters) file, docker-compose or kubernetes scripts. - -```bash -... -export LISTENER_SSL_ENABLED=true -export LISTENER_SSL_CREDENTIALS_TYPE=KEYSTORE -export LISTENER_SSL_KEY_STORE_TYPE=PKCS12 -export LISTENER_SSL_KEY_STORE=keystore.p12 -export LISTENER_SSL_KEY_STORE_PASSWORD=tbmq -export LISTENER_SSL_KEY_PASSWORD=tbmq -... -``` - -where: - -* LISTENER_SSL_ENABLED - Enable/disable SSL support; -* LISTENER_SSL_CREDENTIALS_TYPE - Server credentials type. PEM - pem certificate file; KEYSTORE - java keystore; -* LISTENER_SSL_KEY_STORE_TYPE - Type of the key store (JKS or PKCS12); -* LISTENER_SSL_KEY_STORE - Path to the key store that holds the SSL certificate or certificate chain, also include server private key; -* LISTENER_SSL_KEY_STORE_PASSWORD - Password used to access the key store; -* LISTENER_SSL_KEY_PASSWORD - Password used to access the server private key. - -After completing the setup, start or restart the TBMQ server. - -{% include templates/mqtt-broker/ssl/keystore_files_location.md %} - -## Additional configuration properties - -You may configure following additional environment variables via [configuration](/docs/mqtt-broker/install/config/#mqtt-listeners-parameters) file, docker-compose or kubernetes scripts. - -* LISTENER_SSL_BIND_ADDRESS - the bind address for the MQTT server. Default value *0.0.0.0* indicates all interfaces; -* LISTENER_SSL_BIND_PORT - the bind port for the MQTT server. Default value is *8883*; -* LISTENER_SSL_PROTOCOL - ssl protocol name. Default value is *TLSv1.2*. See [java doc](https://docs.oracle.com/en/java/javase/17/docs/specs/security/standard-names.html#sslcontext-algorithms) for more details. - -{% include docs/user-guide/ssl/self-signed-ecc.md %} - -{% include templates/mqtt-broker/ssl/pem-to-keystore.md %} - -## Adding certificate into Java Truststore - -In Java-based applications, a **truststore** is a special keystore that contains certificates of entities (Certificate Authorities or servers) that the application trusts. -Adding a certificate to the truststore ensures that Java applications running with that truststore will accept SSL/TLS connections signed by that certificate or its issuing CA. - -```bash -keytool -importcert -file CERT.pem -alias ALIAS -keystore keystore.p12 -storepass KEYSTOREPASS -``` -{: .copy-code} - -**Explanation of parameters:** - -* `-importcert` — tells `keytool` to import a certificate into the specified keystore/truststore. -* `-file CERT.pem` — the path to the certificate file you want to import. -* `-alias ALIAS` — a unique name to reference this certificate within the keystore. -* `-keystore keystore.p12` — the Java keystore/truststore file (.jks or .p12) to which the certificate will be added. If it doesn’t exist, it will be created. -* `-storepass KEYSTOREPASS` — the password protecting the keystore. - -> Ensure you configure TBMQ to enable MQTTS using the appropriate [Keystore parameters](#ssl-configuration-using-java-keystore). - -To use the *keytool* command, a Java Development Kit (JDK) must be installed on your system. - -## MQTT over WebSocket Secure - -To enable secure MQTT over WebSockets (WSS), you can follow the same SSL configuration steps described above. -Just make sure to use the corresponding WebSocket-specific environment variables (e.g., `LISTENER_WSS_ENABLED`, `LISTENER_WSS_CREDENTIALS_TYPE`, etc.) in your configuration file, Docker Compose, or Kubernetes manifests. - -The SSL setup using PEM or Keystore works identically for both raw MQTT over TLS and WebSocket over TLS endpoints. +{% include docs/mqtt-broker/security/mqtts.md %} \ No newline at end of file diff --git a/docs/mqtt-broker/subscription.md b/docs/mqtt-broker/subscription.md index 903a1a139c..b381fc75f9 100644 --- a/docs/mqtt-broker/subscription.md +++ b/docs/mqtt-broker/subscription.md @@ -5,183 +5,4 @@ description: Features and advantages of TBMQ Private Cloud payment model --- -TBMQ provides dedicated Private Cloud plans based on the **pay-as-you-go** model. - -### Limits - -Please see table below to compare the limits of the Private Cloud plans. The values are monthly limits, unless stated otherwise. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Parameter nameLaunchGrowthScaleEnterpriseDescription
Sessions2K4K20KUnlimitedMaximum number of client sessions managed by the broker, including both active connections and persistent sessions that are temporarily disconnected but still maintained by the broker for quick reconnection. -Once a session is expired or explicitly removed, it no longer counts toward the session limit and the slot becomes available for a new session
Total msg/sec1K2K10KUnlimitedTotal throughput of messages processed per second, including both incoming and outgoing `MQTT_PUBLISH` packets. -It does not include acknowledgment packets used in QoS 1 and 2 flows (such as `PUBACK`, `PUBREC`, etc.), nor other MQTT control packets like `CONNECT`, `SUBSCRIBE`, `UNSUBSCRIBE`, etc.
Monthly traffic100GB200GB1TBUnlimitedMonthly traffic refers to the total amount of data transmitted through the TBMQ broker, including both incoming and outgoing MQTT messages. -Traffic is measured as the sum of all MQTT packet payloads sent and received by clients. If the monthly allowance is exceeded, additional usage is billed at $0.15 per GB
Applications / Integrations51050UnlimitedMaximum number of persistent Application clients and -Integrations managed by the broker, including both connected and temporarily disconnected ones
Application topic size1 GB1 GB1 GBUnlimitedMaximum size of the Kafka topic used to store persisted messages for a disconnected Application client. Each client has a dedicated topic, and messages are retained until delivered or the size limit is reached
Application topic TTL1 day1 day1 dayUnlimitedTime-to-live for messages stored in Kafka topics for Application clients. If a client remains disconnected beyond this period, undelivered messages will be discarded automatically
Integration topic size1 GB1 GB1 GBUnlimitedMaximum size of the Kafka topic used to store persisted messages for a disconnected Integration. Each Integration has a dedicated topic, and messages are retained until delivered or the size limit is reached
Integration topic TTL1 day1 day1 dayUnlimitedTime-to-live for messages stored in dedicated Kafka topics for each Integration. If the Integration remains disconnected beyond this period, undelivered messages will be automatically discarded
Message rate limits for default ('Device') persistent sessions50 per second100 per second500 per secondUnlimitedTotal number of messages processed per second for all Device clients with persistent sessions. -These clients are subscribers, and if they are offline, the messages are stored in Redis to be delivered when they reconnect
Messages storage for default ('Device') persistent sessions100 per session200 per session1K per sessionUnlimitedMaximum number of messages that can be stored for each Device client with a persistent session while it is offline. Once the limit is reached, older messages are dropped to make room for new ones
Device persisted messages TTL1 day1 day1 dayUnlimited"Time to live" parameter for messages stored for Device persisted clients while they are offline
Stats TTL1 month1 month1 monthUnlimited"Time to live" parameter for statistics persistence. This includes metrics visible on the UI: sessions, subscriptions, incoming messages, outgoing messages, etc.
Session TTL1 day1 day1 dayUnlimited"Time to live" parameter for persistent session that is disconnected. If a client remains disconnected beyond this duration, its session data will be automatically removed from the broker
Client incoming messages rate limitUp to 10 per second, not exceeding 300 per minuteUp to 10 per second, not exceeding 300 per minuteUp to 10 per second, not exceeding 300 per minuteUnlimitedTotal number of incoming messages per publisher client with any Quality of Service (QoS) level
Client outgoing messages rate limitUp to 10 per second, not exceeding 300 per minuteUp to 10 per second, not exceeding 300 per minuteUp to 10 per second, not exceeding 300 per minuteUnlimitedTotal number of outgoing messages per non-persistent subscriber client with Quality of Service (QoS) level equal to 0 ("AT_MOST_ONCE")
In-flight messages per publisher100100100UnlimitedMaximum number of incoming QoS 1 and QoS 2 messages from a publisher that can be awaiting acknowledgment. Acknowledgment is sent after the message is successfully persisted by the broker. -If this limit is exceeded, the client is disconnected to prevent overload
Client pre-connect messages100100100UnlimitedMaximum number of messages the broker will queue per client during the connection handshake phase. If this limit is exceeded before the client completes the connection, the client will be disconnected
Message size1 MB1 MB1 MBUnlimitedMaximum size of the payload in an MQTT_PUBLISH packet that the broker will accept. Larger messages will be rejected unless using the Enterprise plan with custom limits
Uptime SLA99.9%99.9%99.95%CustomRepresents the percentage of time a broker is expected to be fully operational and accessible
- -where "**K**" means 1 thousand, "**M**" means 1 million, "**B**" means 1 billion. +{% include docs/mqtt-broker/subscription.md %} \ No newline at end of file diff --git a/docs/mqtt-broker/troubleshooting.md b/docs/mqtt-broker/troubleshooting.md index 0d749ecf94..f8f9032017 100644 --- a/docs/mqtt-broker/troubleshooting.md +++ b/docs/mqtt-broker/troubleshooting.md @@ -5,4 +5,4 @@ description: TBMQ troubleshooting guide --- -{% include docs/mqtt-broker/troubleshooting.md %} \ No newline at end of file +{% include docs/mqtt-broker/troubleshooting.md %} diff --git a/docs/mqtt-broker/user-guide/backpressure.md b/docs/mqtt-broker/user-guide/backpressure.md index 454887080f..497be69724 100644 --- a/docs/mqtt-broker/user-guide/backpressure.md +++ b/docs/mqtt-broker/user-guide/backpressure.md @@ -5,191 +5,4 @@ description: TBMQ Backpressure guide --- -* TOC -{:toc} - -In high-throughput messaging systems like TBMQ, [backpressure](https://medium.com/@jayphelps/backpressure-explained-the-flow-of-data-through-software-2350b3e77ce7) -handling is essential to ensure stability, maintain performance, and prevent out-of-memory (OOM) errors under heavy load. -Backpressure can occur in two directions: **inbound**, when data is flowing into the broker from publishers, and **outbound**, when the broker delivers data to subscribers. -TBMQ is designed to effectively handle both. - -TBMQ uses Netty as the backbone for its MQTT communication, handling all low-level networking and I/O operations. -While Netty provides high performance and scalability, it also requires careful control of inbound and outbound message flow. - -## Inbound Backpressure - -TBMQ is architected to handle virtually unlimited load from publishers. -Incoming messages are not stored in memory indefinitely — instead, they are immediately persisted to **Kafka**, which acts as the backbone for further processing and routing. -This design ensures that even under extreme publisher throughput, memory usage remains stable and predictable. - -To support growing workloads, TBMQ can be **horizontally scaled** by deploying multiple broker instances, distributing the load and increasing throughput capacity. -However, in cases where users prefer not to scale horizontally or avoid investing heavily in infrastructure or advanced configuration tuning, -TBMQ offers additional mechanisms to manage incoming traffic effectively. - -These include TCP-level backpressure, controlled via Netty's socket receive buffer, and application-level rate limiting, which allows enforcing both per-client and cluster-wide message rate policies. -Together, these options provide flexible, cost-efficient ways to protect the broker from overload and ensure stable performance under varying traffic conditions. - -### TCP-Level Backpressure - -One of the key mechanisms is TCP-level backpressure, enabled through the Netty socket receive buffer. This buffer can be configured using the `so_receive_buffer` parameter: - -```yaml -# Socket receive buffer size for Netty in KB. -# If the buffer limit is reached, TCP will trigger backpressure and notify the sender to slow down. -# If set to 0 (default), the system's default buffer size will be used. -so_receive_buffer: "${NETTY_SO_RECEIVE_BUFFER:0}" -``` - -When the receive buffer is filled and not being drained fast enough (e.g., due to high load or slow downstream processing), TCP will signal the remote sender to apply backpressure. -This allows the broker to slow down inbound traffic naturally without immediately dropping connections or overloading memory. - -> In most cases, it is recommended to leave this value at 0, which lets the operating system apply an optimized default. -> Only consider tuning this parameter in low-latency or high-throughput scenarios after profiling, or when you want tighter control over memory usage and backpressure behavior. - -### Rate limiting - -While not a reactive backpressure mechanism, rate limiting in TBMQ serves as an additional layer of protection by proactively controlling the volume of incoming messages. -It complements true backpressure mechanisms by enforcing traffic constraints before the system becomes overloaded. -TBMQ supports both cluster-wide rate limits (to control total incoming traffic) and per-client rate limits (to prevent individual publishers from overwhelming the broker). -These settings allow operators to define message rate policies that help maintain system stability, fairness across clients, and protect against spikes in traffic. - -```yaml -rate-limits: - total: - # Enable/disable total incoming and outgoing messages rate limits for the broker (per whole cluster) - enabled: "${MQTT_TOTAL_RATE_LIMITS_ENABLED:false}" - # Limit the total message rate across the cluster (e.g., 1000 messages per second, 50000 per minute) - config: "${MQTT_TOTAL_RATE_LIMITS_CONFIG:1000:1,50000:60}" - - incoming-publish: - # Enable/disable per-client publish rate limits - enabled: "${MQTT_INCOMING_RATE_LIMITS_ENABLED:false}" - # Limit how many messages each client can send over time (e.g., 10 messages per second, 300 per minute) - client-config: "${MQTT_INCOMING_RATE_LIMITS_CLIENT_CONFIG:10:1,300:60}" -``` - -Together, TCP backpressure and configurable rate limits make TBMQ highly resilient and capable of self-regulating traffic before any internal processing bottlenecks or memory pressure occur. - -## Outbound Backpressure - -If a subscriber cannot keep up, the broker’s outbound channel buffer may become overwhelmed. -Without backpressure control, this can lead to uncontrolled memory growth and eventually cause the broker to run out of memory. -To address this, TBMQ introduces a backpressure-aware delivery mechanism that detects when a Netty channel becomes non-writable and temporarily pauses message delivery. -Delivery resumes automatically once the channel becomes writable again. -This ensures efficient memory usage and stable operation even under heavy load. - -### Netty Channel Writability Monitoring - -TBMQ uses Netty as the underlying network framework, which provides built-in support for monitoring the **writability** (`channelWritabilityChanged` event) of each channel. -This allows TBMQ to detect when a subscriber’s connection becomes overwhelmed with outbound data and apply backpressure by pausing further writes to that channel. - -Netty determines writability based on **write buffer watermarks** — a pair of thresholds: - -- **High Watermark**: If the outbound buffer size exceeds this threshold, the channel is marked as **non-writable**. TBMQ will stop sending messages to that client until the buffer drains. -- **Low Watermark**: When the buffer size drops below this value, the channel becomes **writable** again, and TBMQ resumes message delivery. - -These thresholds are configurable via environment variables: - -- `NETTY_WRITE_BUFFER_LOW_WATER_MARK` – defines the low watermark in bytes (default: `32768`, i.e. 32 KB) -- `NETTY_WRITE_BUFFER_HIGH_WATER_MARK` – defines the high watermark in bytes (default: `65536`, i.e. 64 KB) - -These values are applied during Netty server bootstrap using the `WRITE_BUFFER_WATER_MARK` channel option. - -By leveraging this mechanism, TBMQ ensures that no client connection can consume excessive memory due to unchecked message delivery. -Instead, delivery is paused and resumed dynamically based on channel health, preserving broker stability under load. - -### Handling Non-Persistent and Persistent Clients - -TBMQ differentiates backpressure behavior based on whether the subscriber client is **persistent** or **non-persistent**, ensuring efficient use of memory and storage resources. - -#### Non-Persistent Clients - -For non-persistent clients, TBMQ does **not store messages** if the channel becomes non-writable. Instead, when backpressure is detected: - -- The broker **skips** delivery of messages to that client. -- These dropped messages are not retained or retried, which aligns with MQTT expectations for non-persistent sessions. -- A global dropped message counter is maintained to track how many messages were skipped due to backpressure. This metric provides visibility into system behavior under load and helps identify bottlenecks. - -This approach avoids memory buildup for short-lived or unreliable clients that are not expected to maintain state. - -#### Persistent Clients - -Persistent clients have guaranteed message delivery, so skipping messages is not acceptable. -TBMQ ensures durability even under backpressure by using persistent storage for message queuing and controlling delivery based on channel writability. - -For **Device clients**, messages are stored in **Redis** before delivery. If the channel becomes non-writable, message sending is paused. -Once the channel becomes writable again, TBMQ resumes delivery by reading pending messages from Redis. - -- Redis has a **per-client message queue limit** (e.g., 10,000 messages). If this limit is exceeded before the client becomes writable, older messages may be dropped. -- This limit is configurable via an environment variable `MQTT_PERSISTENT_SESSION_DEVICE_PERSISTED_MESSAGES_LIMIT`. -- Additionally, each message stored in Redis has a **time-to-live (TTL)** to ensure stale messages are eventually cleaned up. -The TTL is configurable via the environment variable `MQTT_PERSISTENT_SESSION_DEVICE_PERSISTED_MESSAGES_TTL`. -For MQTT 5.0 clients that specify a `message expiry interval`, TBMQ respects the client-defined value and uses it in place of the configured default. - -For **Application clients**, messages are stored in **Kafka**. If the channel to the client becomes non-writable, -TBMQ temporarily **pauses the Kafka consumer** for that client to avoid polling and buffering unnecessary messages. -Once the channel becomes writable, the consumer is resumed and message delivery continues. - -- Kafka's **retention policy** ensures that even when consumers are paused, messages remain available for a defined period: -``` -retention.ms=604800000 (7 days) -retention.bytes=1048576000 (1 GB) -``` -- These settings can be customized via the following environment variable `TB_KAFKA_APP_PERSISTED_MSG_TOPIC_PROPERTIES`. - -This mechanism ensures that persistent clients can reliably receive messages even under backpressure, without overloading the broker or losing data. - -### Shared Subscriptions and Backpressure Handling - -TBMQ also applies backpressure handling logic in the context of [shared subscriptions](/docs/mqtt-broker/user-guide/shared-subscriptions/), ensuring reliable and efficient message delivery across all subscription types. -A shared subscription group may contain one or more subscribers, and messages are distributed among them according to MQTT 5.0 rules. -When backpressure is detected, the broker adjusts delivery based on the type and persistence level of the shared group. - -#### Non-Persistent Shared Subscription Group - -If a subscriber in the group becomes non-writable, TBMQ skips it and attempts to deliver the message to another writable subscriber in the group. -If all subscribers in the group are non-writable, the message is dropped entirely and not queued or retained. -This behavior matches the expectation for non-persistent clients, where message loss is acceptable under overload conditions. - -#### Persistent Device Shared Subscription Group - -If a subscriber is non-writable, it is skipped, and the message is routed to another writable subscriber in the same group. -If none of the subscribers are writable, the message is saved to Redis, using a per-group queue associated with the shared subscription key. -Redis ensures that once any subscriber in the group becomes writable again, delivery resumes from the stored messages. -Queue size and TTL are controlled via the same configuration as for individual persistent device clients. - -#### Persistent Application Shared Subscription Group - -When a subscriber in the group becomes non-writable, TBMQ removes it from the Kafka consumer group associated with the shared subscription. -Other writable subscribers continue polling messages from Kafka as usual. -If all subscribers in the group become non-writable, the consumer group becomes temporarily empty, and no messages are polled. -Kafka retains undelivered messages according to the topic’s configured retention policy (environment variable `TB_KAFKA_APP_PERSISTED_MSG_SHARED_TOPIC_PROPERTIES`), -ensuring that once any subscriber becomes writable and rejoins the group, message delivery resumes. - -This approach ensures that TBMQ maintains performance, reliability, and resource efficiency even when handling shared subscriptions under pressure. Each strategy is tailored to the persistence level of the clients in the group. - -## Recommendations - -To maximize the effectiveness of TBMQ’s backpressure handling and ensure system resilience under variable load, we recommend the following: - -- **Monitor the number of non-writable clients**: Track the number of clients currently under outbound backpressure using the `nonWritableClients` counter. -This metric is available both in logs and through the monitoring system (e.g., Prometheus). -For production environments, it's recommended to set up alerts when the value increases unexpectedly or stays elevated over time. - -- **Start with Default Backpressure Settings**: For most deployments, the default Netty buffer thresholds — 32 KB low watermark and 64 KB high watermark — provide robust performance. -These settings have been tested to support **around 10,000 messages per second per subscriber** under typical conditions. - -- **Ensure Sufficient Redis and Kafka Capacity**: Persistent client buffering relies on Redis and Kafka. Monitor their memory, disk, and throughput to avoid secondary bottlenecks. - -- **Use Horizontal Scaling**: For sustained high throughput, scale broker nodes horizontally. Backpressure is not a substitute for adequate compute and I/O resources. - -- **Test Under Load**: Perform load testing with simulated slow and fast consumers to validate how your configuration handles backpressure in real scenarios. - -By following these practices, you can take full advantage of TBMQ’s backpressure handling mechanisms, ensuring reliable operation, efficient resource usage, and high performance even in demanding MQTT workloads. - -## Conclusion - -The backpressure handling mechanisms in TBMQ significantly enhance the broker’s resilience and efficiency when dealing with varying client consumption rates. -By dynamically monitoring channel writability, intelligently controlling message delivery, and integrating with both transport-level and application-level flow control, -TBMQ ensures reliable performance and optimal resource utilization—even under sustained or bursty high-load conditions. -This makes TBMQ well-suited for demanding MQTT workloads at scale. +{% include docs/mqtt-broker/user-guide/backpressure.md %} diff --git a/docs/mqtt-broker/user-guide/mqtt-broker.md b/docs/mqtt-broker/user-guide/mqtt-broker.md index 5a3c129fc0..f0ae6c9ccf 100644 --- a/docs/mqtt-broker/user-guide/mqtt-broker.md +++ b/docs/mqtt-broker/user-guide/mqtt-broker.md @@ -5,217 +5,4 @@ description: What is MQTT broker? Learn how the MQTT protocol works, what MQTT s --- -* TOC -{:toc} - - -[MQTT](/docs/mqtt-broker/user-guide/mqtt-protocol/) is a lightweight, publish/subscribe messaging protocol widely used in the Internet of Things (IoT) and other distributed systems. -It is specifically designed to work efficiently in environments with limited resources, low bandwidth, high latency, or unreliable network connections. - -At the heart of every MQTT architecture lies the MQTT broker — -the central server that manages all communication between clients. -The broker is responsible for receiving messages from publishers, determining which subscribers are interested in those messages, and reliably delivering them according to the protocol’s rules. -In this way, the broker acts as the backbone of the MQTT system, ensuring seamless, secure, and efficient message exchange. - -![image](/images/mqtt-broker/user-guide/mqtt/mqtt_broker.svg) - -### MQTT Clients - -An MQTT client is any device, application, or service that connects to the broker to send or receive messages. -Clients can range from small, resource-constrained IoT sensors to complex enterprise applications. -Common examples include: - -* **IoT devices** that publish sensor data, such as temperature, humidity, or GPS location. -* **Mobile or web applications** that subscribe to updates from connected devices. -* **Back-end services** that collect, process, or visualize incoming data streams. - -Each client can take on one or more roles: - -* **Publisher**: Sends (publishes) messages to a defined topic. -* **Subscriber**: Receives (subscribes to) messages from one or more topics. -* **Hybrid**: Acts as both a publisher and a subscriber, depending on the use case. - -By separating publishers and subscribers through the broker, MQTT clients remain loosely coupled, making systems more flexible, scalable, and easier to maintain. - -### MQTT Topics - -An MQTT topic is a structured string used by the broker to **route messages** between publishers and subscribers. -Topics define the subject or channel of communication and are the backbone of the publish/subscribe model. - -Key characteristics: - -* **Hierarchical structure**: Topics are organized in levels separated by slashes (`/`). - Example: `home/livingroom/temperature` -* **Message flow**: - - * **Publishers** send messages to a specific topic. - * **Subscribers** register their interest in one or more topics and receive all messages published to them. - -#### Wildcards in Topics - -MQTT supports special characters called MQTT wildcards to simplify subscription patterns: - -* `+` (single-level wildcard) — matches exactly one level in the topic hierarchy. - Example: `home/+/temperature` → matches `home/livingroom/temperature` and `home/kitchen/temperature`. -* `#` (multi-level wildcard) — matches all remaining levels in the topic hierarchy. - Example: `home/#` → matches `home/livingroom/temperature`, `home/kitchen/humidity`, and anything else under `home/`. - -This flexible topic system allows clients to filter messages with precision, making MQTT highly efficient for large-scale, event-driven communication. - -### Role of the MQTT Broker - -The **MQTT broker** is the central component that enables communication in an MQTT system. -Clients never communicate directly with each other — all messages flow through the broker. -By acting as the trusted intermediary, the broker guarantees that messages are delivered securely, reliably, and according to the rules of the protocol. - -Key responsibilities of the broker include: - -* **Managing client connections**: Establishing, monitoring, and maintaining sessions with MQTT clients. -* **Authentication and authorization**: Validating client identities and enforcing access control policies to ensure only authorized clients can publish or subscribe. -* **Message routing**: Receiving published messages and efficiently distributing them to all clients subscribed to the relevant topics. -* **Session and state management**: Tracking client subscriptions and, if configured, storing undelivered messages for clients that are offline. -* **Quality of Service (QoS)**: Guaranteeing message delivery according to the selected MQTT QoS level — *At most once (QoS 0)*, *At least once (QoS 1)*, or *Exactly once (QoS 2)*. - -In short, the broker serves as the **backbone of the MQTT network**, ensuring that communication between clients is scalable, secure, and dependable. - -### How It Works - -The operation of an MQTT system can be broken down into distinct stages — from the moment a client connects to the broker, through authentication and authorization, to message publishing and distribution. - -#### Client Connection - -* A client (device, app, or service) initiates a connection to the broker using the **CONNECT** packet. -* This packet typically includes: - - * Client identifier (`clientId`) - * Protocol version (e.g., MQTT 3.1.1 or MQTT 5.0) - * Optional username and password - * Clean session flag or session expiry interval (for session persistence) - * Last Will and Testament (LWT) message, if defined - -#### Authentication & Authorization - -* The broker validates the connection request by checking credentials (username/password, certificates for SSL/TLS, or token-based mechanisms). -* Once authenticated, the broker enforces **authorization policies**, determining which topics the client is allowed to **publish** to and **subscribe** from. -* If the connection is accepted, the broker replies with a **CONNACK** packet confirming session parameters. If not, the connection is refused. - -#### Subscribing to Topics - -* To receive messages, the client sends a **SUBSCRIBE** packet specifying one or more topics (with optional wildcards) and the desired **QoS level**. -* The broker registers the client’s subscription and replies with a **SUBACK** packet that confirms which QoS levels were granted. - -#### Publishing Messages - -* When a client wants to send data, it sends a **PUBLISH** packet to the broker. -* The packet contains: - - * The topic name - * The message payload - * The QoS level for delivery reliability - * Retain flag (if the message should be stored as the last known good value for that topic) -* Depending on QoS, the broker and client may exchange acknowledgment packets (**PUBACK**, **PUBREC**, **PUBREL**, **PUBCOMP**) to guarantee delivery. - -#### Message Distribution - -* The broker receives the published message and looks up all active subscriptions that match the topic. -* For each matching subscriber, the broker forwards the message: - - * Respecting the **QoS level** agreed upon with each subscriber. - * Delivering retained messages where applicable. - * Storing messages for offline subscribers if persistent sessions are enabled. - -#### Receiving Messages - -* Subscribers receive the message in a **PUBLISH** packet from the broker. -* Based on QoS, the subscriber may need to send back acknowledgment packets to confirm receipt. -* Once processed, subscribers can act on the message — logging it, storing it, visualizing it, or triggering actions. - -#### Disconnecting - -* When a client no longer needs the connection, it sends a **DISCONNECT** packet. -* If the client disconnects unexpectedly, the broker triggers the **Last Will and Testament (LWT)** message (if configured) and may keep the session alive based on the persistence settings. - -This end-to-end lifecycle — from connection and authentication to message delivery and disconnection — -makes MQTT a lightweight but **robust messaging protocol** for everything from simple IoT gadgets to massive distributed systems. - -### Key Features of an MQTT Broker - -An MQTT broker combines **protocol-level features** of MQTT with **system-level capabilities** to ensure efficient, secure, and reliable messaging. - -#### MQTT Protocol Features Supported by the Broker - -* **Quality of Service (QoS)**: Guarantees message delivery at different levels — *at most once (0)*, *at least once (1)*, or *exactly once (2)*. -* **Keep Alive mechanism**: Ensures the connection between client and broker stays active by requiring periodic communication, helping detect broken connections quickly. -* **Last Will and Testament (LWT)**: Sends a predefined message if a client disconnects unexpectedly, helping detect failures automatically. -* **Retained messages**: Stores the last message on a topic so new subscribers receive the most recent state instantly. -* **Topic-based routing**: Efficiently matches published messages to subscribers using hierarchical topics and wildcards. -* **Session persistence**: Maintains subscriptions and undelivered messages for clients that reconnect, allowing reliable communication even after temporary disconnections. -* **Shared subscriptions** (MQTT 5.0): Distributes messages among a group of subscribers to balance load. - -These are some of the most important MQTT features supported by brokers. -Depending on the version of the protocol (MQTT 3.1.1 or 5.0) and the specific broker implementation, many more features may be available to enhance reliability, efficiency, and security. - -> TBMQ supports the full range of MQTT 3.x and MQTT 5.0 protocol features. - -#### Broker Capabilities - -* **Scalability**: Handles thousands or millions of simultaneous client connections and messages with consistent reliability. -* **Performance**: Optimized for low latency and high throughput, even in large distributed systems. -* **Durability**: Ensures that critical messages and session data are stored persistently (e.g., in databases or disk-backed queues), so they survive restarts or crashes. -* **Security**: Provides TLS/SSL encryption, authentication, and fine-grained access control to ensure safe communication. -* **High availability & clustering**: Supports clustering, load balancing, and fault tolerance for production-grade deployments. -* **Integration**: Connects seamlessly with external systems such as databases, Kafka, or cloud services for data processing and analytics. - -> TBMQ provides all of these capabilities out of the box: horizontal scalability to millions of clients, high throughput with low latency, persistence and durability powered by Redis/Kafka, -> built-in TLS/SSL security, clustering with fault tolerance, and integration with external systems like Kafka, other MQTT brokers, and HTTP-based services. - -### Types of MQTT Brokers - -MQTT brokers come in different forms depending on how they are deployed, licensed, and used. The main categories are: - -1. **Open-source brokers** - - * Free to use and highly customizable, with active developer communities. - * Suitable for prototyping, self-hosted deployments, and integration into larger systems. - -2. **Commercial brokers** - - * Provide enterprise-grade features such as clustering, monitoring dashboards, advanced security, and SLA-backed support. - * Ideal for organizations that need guaranteed reliability, high availability, and professional support. - -3. **Cloud-based brokers (MQTT-as-a-Service)** - - * Fully managed services where the provider handles deployment, scaling, maintenance, and uptime. - * Great for rapid adoption and use cases where infrastructure management should be outsourced. - -4. **Embedded brokers** - - * Extremely lightweight brokers that run directly on edge devices, gateways, or inside applications. - * Useful for local processing, offline-first scenarios, or edge computing environments where low latency is critical. - -### How to Choose the Right MQTT Broker - -Selecting the right MQTT broker depends on your project’s scale, requirements, and long-term goals. The following criteria can help guide the decision: - -* **Scalability**: Ensure the broker can handle your projected number of client connections and message throughput, with room to grow as your system expands. -* **High availability & clustering**: Look for features like clustering, replication, and load balancing to guarantee uptime and fault tolerance in production environments. -* **Performance**: Evaluate latency, throughput, and resource efficiency under real-world load conditions to ensure the broker meets your responsiveness needs. -* **Security**: Check for support of TLS/SSL encryption, authentication, authorization, and fine-grained access controls to protect data and devices. -* **Persistence**: Consider whether the broker provides durable message storage — including retained messages, offline queues, or integration with external databases. -* **Integration capabilities**: Verify compatibility with your ecosystem, such as Kafka, SQL/NoSQL databases, monitoring tools, or cloud platforms. -* **Community & support**: An active open-source community or available enterprise support can make a big difference in troubleshooting and long-term maintenance. -* **Cost**: Balance your budget against needs — choosing between open-source (free, DIY), commercial (license + support), or cloud (subscription-based, managed) options. - -By weighing these factors, you can select a broker that not only meets your current needs but also scales with your system as it evolves. - -> TBMQ is built to meet all these criteria — -> it offers enterprise-level scalability, clustering, persistence, strong security, and deep integration options while remaining easy to operate and cost-efficient. -> This makes it a strong choice for both open-source adopters and enterprises looking for a production-ready MQTT platform. - -### Final Words - -The MQTT broker is the backbone of any MQTT-based system, enabling efficient and reliable communication between distributed devices and services. -It plays a critical role in diverse domains such as IoT ecosystems, smart homes, industrial automation, connected vehicles, and large-scale data infrastructures. - -By offloading responsibilities like message routing, delivery guarantees, and connection management to the broker, client devices remain simple, lightweight, and resource-efficient. -This not only reduces device complexity but also improves scalability, security, and overall system reliability — making the MQTT broker a cornerstone of modern connected applications. +{% include docs/mqtt-broker/user-guide/mqtt-broker.md %} diff --git a/docs/mqtt-broker/user-guide/ui/subscriptions.md b/docs/mqtt-broker/user-guide/ui/subscriptions.md index 5e561c9a9f..3631cef30e 100644 --- a/docs/mqtt-broker/user-guide/ui/subscriptions.md +++ b/docs/mqtt-broker/user-guide/ui/subscriptions.md @@ -8,18 +8,15 @@ subscription-session: image: /images/mqtt-broker/user-guide/ui/subscription-session-1.png title: 'Open Subscriptions page and click on the icon button "Session details".' 1: - image: /images/mqtt-broker/user-guide/ui/subscription-session-2.png - title: 'Click on the tab "Subscriptions".' - 2: image: /images/mqtt-broker/user-guide/ui/subscription-session-3.png title: 'Add, edit or remove subscriptions.' - 3: + 2: image: /images/mqtt-broker/user-guide/ui/subscription-session-4.png title: 'For this subscription, for example, we changed "Retain as Published" to true and "Subscription Identifier" to 1.' - 4: + 3: image: /images/mqtt-broker/user-guide/ui/subscription-session-5.png title: 'Click "Update" button to apply changes.' - 5: + 4: image: /images/mqtt-broker/user-guide/ui/subscription-session-6.png title: 'The subscription parameters "Retained as Published" and "Subscription ID" have been successfully updated.' @@ -41,4 +38,4 @@ clear-empty-subscription-nodes: --- -{% include docs/mqtt-broker/user-guide/ui/subscriptions.md %} \ No newline at end of file +{% include docs/mqtt-broker/user-guide/ui/subscriptions.md %} diff --git a/docs/mqtt-broker/user-guide/ui/websocket-client.md b/docs/mqtt-broker/user-guide/ui/websocket-client.md index 94df0b0718..6dce937c65 100644 --- a/docs/mqtt-broker/user-guide/ui/websocket-client.md +++ b/docs/mqtt-broker/user-guide/ui/websocket-client.md @@ -44,7 +44,7 @@ ws-connection-edit: title: 'Go to the WebSocket Client page and click on the arrow icon to expand the list of connections.' 1: image: /images/mqtt-broker/user-guide/ui/ws-connection-edit-2.png - title: 'Click on the edit icon of the connection you wish to edit.' + title: 'Make changes and click Connect to save changes.' ws-connection-delete: 0: diff --git a/docs/mqtt-broker/user-management.md b/docs/mqtt-broker/user-management.md index eb3978d715..874f1e833f 100644 --- a/docs/mqtt-broker/user-management.md +++ b/docs/mqtt-broker/user-management.md @@ -5,53 +5,4 @@ description: User Management Guide --- -* TOC -{:toc} - -By default, the system is initially established with a singular admin user, with username **sysadmin@thingsboard.org** and password **sysadmin**. - -However, when operating in a production environment, it is strongly advised to create a new admin user, either remove the default user entirely -or modify the password associated with the aforementioned user. - -Throughout this documentation, all provided examples will employ the **curl** command to execute REST requests, thus showcasing practical implementations of the API interactions. - -{% include templates/mqtt-broker/authentication.md %} - -## Get all users - -```bash -curl --location --request GET "http://localhost:8083/api/admin?pageSize=50&page=0" \ ---header "X-Authorization: Bearer $ACCESS_TOKEN" -``` -{: .copy-code} - -Within the system, every user entity possesses a distinct and unique identifier known as the **id**. -This id serves as a reference point and can be utilized to perform operations such as _updating_ or _deleting_ users. - -## Create/update user - -```bash -curl --location --request POST 'http://localhost:8083/api/admin' \ ---header "X-Authorization: Bearer $ACCESS_TOKEN" \ ---header 'Content-Type: application/json' \ ---data-raw '{ - "id":$USER_ID, - "email":"test@gmail.com", - "password":"test", - "firstName":"test", - "lastName":"test" -}' -``` -{: .copy-code} - -If _$USER_ID_ is _null_ or _id_ field is absent in the request body, the new admin user will be created, otherwise the user with _$USER_ID_ identifier will be updated. - -## Delete user - -```bash -curl --location --request DELETE 'http://localhost:8083/api/admin/$USER_ID' \ ---header "X-Authorization: Bearer $ACCESS_TOKEN" -``` -{: .copy-code} - -Paste actual ID of the user you want to delete instead of _$USER_ID_. +{% include docs/mqtt-broker/user-management.md %} \ No newline at end of file diff --git a/docs/pe/mqtt-broker/api.md b/docs/pe/mqtt-broker/api.md new file mode 100644 index 0000000000..7a7f7e3167 --- /dev/null +++ b/docs/pe/mqtt-broker/api.md @@ -0,0 +1,9 @@ +--- +layout: docwithnav-pe-mqtt-broker +title: TBMQ API reference +description: TBMQ API reference + +--- + +{% assign docsPrefix = "pe/" %} +{% include docs/mqtt-broker/api.md %} diff --git a/docs/pe/mqtt-broker/application-shared-subscription.md b/docs/pe/mqtt-broker/application-shared-subscription.md new file mode 100644 index 0000000000..d11d02f9d1 --- /dev/null +++ b/docs/pe/mqtt-broker/application-shared-subscription.md @@ -0,0 +1,9 @@ +--- +layout: docwithnav-pe-mqtt-broker +title: Application Shared Subscription Entity +description: Application shared subscription entities management + +--- + +{% assign docsPrefix = "pe/" %} +{% include docs/mqtt-broker/application-shared-subscription.md %} \ No newline at end of file diff --git a/docs/pe/mqtt-broker/architecture-details/persistent-app-client.md b/docs/pe/mqtt-broker/architecture-details/persistent-app-client.md new file mode 100644 index 0000000000..31f6772c4b --- /dev/null +++ b/docs/pe/mqtt-broker/architecture-details/persistent-app-client.md @@ -0,0 +1,11 @@ +--- +layout: docwithnav-pe-mqtt-broker +title: Architecture for Persistent APPLICATION clients +description: Architecture Overview for Persistent APPLICATION clients + +--- + +* TOC +{:toc} + +![image](/images/coming-soon.jpg) diff --git a/docs/pe/mqtt-broker/architecture-details/persistent-device-client.md b/docs/pe/mqtt-broker/architecture-details/persistent-device-client.md new file mode 100644 index 0000000000..7e2ac5bbe0 --- /dev/null +++ b/docs/pe/mqtt-broker/architecture-details/persistent-device-client.md @@ -0,0 +1,27 @@ +--- +layout: docwithnav-pe-mqtt-broker +title: Redis Architecture for Persistent DEVICE clients +description: Redis Architecture Overview for Persistent DEVICE clients + +redis-cluster-constraints: + 0: + image: /images/mqtt-broker/architecture/details/redis-cluster-constraints.png + title: 'Key-slot based sharding in a Redis Cluster (masters with replicas)' + +redis-data-structures: + 0: + image: /images/mqtt-broker/architecture/details/sorted-set.png + title: 'Maintaining per-client message order with a Redis Sorted Set' + +jedis-to-lettuce: + 0: + image: /images/mqtt-broker/architecture/details/jedis-performance.png + title: 'RedisInsight shows ~66k commands/s per node, aligning with TBMQ’s 40k msg/s, as Lua scripts trigger multiple Redis operations per message.' + 1: + image: /images/mqtt-broker/architecture/details/lettuce-performance.png + title: 'At 60k msg/s, RedisInsight shows ~100k commands/s per node, aligning with the expected increase from 40k msg/s, which produced ~66k commands/s per node.' + +--- + +{% assign docsPrefix = "pe/" %} +{% include docs/mqtt-broker/architecture-details/persistent-device-client.md %} \ No newline at end of file diff --git a/docs/pe/mqtt-broker/architecture.md b/docs/pe/mqtt-broker/architecture.md new file mode 100644 index 0000000000..befe234846 --- /dev/null +++ b/docs/pe/mqtt-broker/architecture.md @@ -0,0 +1,9 @@ +--- +layout: docwithnav-pe-mqtt-broker +title: TBMQ architecture +description: TBMQ architecture + +--- + +{% assign docsPrefix = "pe/" %} +{% include docs/mqtt-broker/architecture.md %} \ No newline at end of file diff --git a/docs/pe/mqtt-broker/faq.md b/docs/pe/mqtt-broker/faq.md new file mode 100644 index 0000000000..2066ff2c97 --- /dev/null +++ b/docs/pe/mqtt-broker/faq.md @@ -0,0 +1,9 @@ +--- +layout: docwithnav-pe-mqtt-broker +title: FAQ +description: TBMQ FAQ + +--- + +{% assign docsPrefix = "pe/" %} +{% include docs/mqtt-broker/faq.md %} diff --git a/docs/pe/mqtt-broker/getting-started-guides/what-is-thingsboard-mqtt-broker.md b/docs/pe/mqtt-broker/getting-started-guides/what-is-thingsboard-mqtt-broker.md new file mode 100644 index 0000000000..3810fd3761 --- /dev/null +++ b/docs/pe/mqtt-broker/getting-started-guides/what-is-thingsboard-mqtt-broker.md @@ -0,0 +1,10 @@ +--- +layout: docwithnav-pe-mqtt-broker +title: What is TBMQ Professional Edition? +description: TBMQ key features, architecture, etc. +--- + +{% assign docsPrefix = "pe/" %} +{% assign tbmqSuffix = "PE" %} +{% assign tbmqDefinition = "enterprise" %} +{% include docs/mqtt-broker/getting-started-guides/what-is-thingsboard-mqtt-broker.md %} diff --git a/docs/pe/mqtt-broker/getting-started.md b/docs/pe/mqtt-broker/getting-started.md new file mode 100644 index 0000000000..55d509e445 --- /dev/null +++ b/docs/pe/mqtt-broker/getting-started.md @@ -0,0 +1,42 @@ +--- +layout: docwithnav-pe-mqtt-broker +title: Getting started with TBMQ Professional Edition +description: TBMQ - broker for real Use Cases + +broker-sessions: + 0: + image: /images/pe/mqtt-broker/getting-started/broker-session.png + title: 'Go to Sessions page. View all client sessions, click on the row to open session details' + 1: + image: /images/pe/mqtt-broker/getting-started/broker-session-details.png + title: 'View the client session details' + +broker-mqtt-creds-creation: + 0: + image: /images/pe/mqtt-broker/getting-started/add-mqtt-creds-1.png + title: 'Navigate to Authentication > Credentials page, click "+" in the top right corner of the table' + 1: + image: /images/pe/mqtt-broker/getting-started/add-mqtt-creds-2.png + title: 'Input credentials name. For example, "Getting Started Credentials"' + 2: + image: /images/pe/mqtt-broker/getting-started/add-mqtt-creds-3.png + title: 'Input "username" and "password" with chosen values. Click "Add" to save credentials' + 3: + image: /images/pe/mqtt-broker/getting-started/add-mqtt-creds-4.png + title: 'After adding the credentials, the "Check Connectivity" window will open. This window includes autogenerated commands for subscribing to a topic or publishing a message.' + +check-connectivity: + 0: + image: /images/pe/mqtt-broker/getting-started/gs-check-connectivity-1.png + title: 'Go to Authentication > Credentials page. Find "Getting Started Credentials" credentials and click on the row.' + 1: + image: /images/pe/mqtt-broker/getting-started/gs-check-connectivity-2.png + title: 'Click on the "Check connectivity" button.' + 2: + image: /images/pe/mqtt-broker/getting-started/gs-check-connectivity-3.png + title: 'Select your operating system, install the required tools, and copy the MQTT commands for further usage.' + +--- + +{% assign docsPrefix = "pe/" %} +{% include docs/mqtt-broker/getting-started.md %} diff --git a/docs/pe/mqtt-broker/help.md b/docs/pe/mqtt-broker/help.md new file mode 100644 index 0000000000..a3fbd434b1 --- /dev/null +++ b/docs/pe/mqtt-broker/help.md @@ -0,0 +1,9 @@ +--- +layout: docwithnav-pe-mqtt-broker +title: Get Support +description: TBMQ help links + +--- + +{% assign docsPrefix = "pe/" %} +{% include docs/mqtt-broker/help.md %} \ No newline at end of file diff --git a/docs/pe/mqtt-broker/image-gallery.md b/docs/pe/mqtt-broker/image-gallery.md new file mode 100644 index 0000000000..9adc5ff2fc --- /dev/null +++ b/docs/pe/mqtt-broker/image-gallery.md @@ -0,0 +1,102 @@ +--- +layout: docwithnav-pe-mqtt-broker +title: Image gallery +description: TBMQ PE Image gallery +redirect_from: "/docs/mqtt-broker/image-gallery/" + +upload-image-1: + 0: + image: /images/pe/mqtt-broker/user-guide/white-labeling/upload-image-1.png + title: 'Go to the "White labeling" page and click on the "Image gallery" tab. Then, click the “Upload image” button in the top right corner of the screen;' + 1: + image: /images/pe/mqtt-broker/user-guide/white-labeling/upload-image-2.png + title: 'Select an image or simply drag it to the "Upload image" window and click "Upload";' + 2: + image: /images/pe/mqtt-broker/user-guide/white-labeling/upload-image-3.png + title: 'The image has been uploaded.' + +upload-image-2: + 0: + image: /images/pe/mqtt-broker/user-guide/white-labeling/upload-image-4.png + title: 'Go to the "White labeling" page and click on the "Image gallery" tab. Then, click the "Import image" icon in the top right corner of the screen;' + 1: + image: /images/pe/mqtt-broker/user-guide/white-labeling/upload-image-5.png + title: 'In the "Import image" window, upload a JSON image file and click "Import";' + 2: + image: /images/pe/mqtt-broker/user-guide/white-labeling/upload-image-6.png + title: 'The image has been imported.' + +image-viewing-mode: + 0: + image: /images/pe/mqtt-broker/user-guide/white-labeling/image-viewing-mode-1.png + title: 'The image list view.' + 1: + image: /images/pe/mqtt-broker/user-guide/white-labeling/image-viewing-mode-2.png + title: 'The image grid view.' + +download-image-1: + 0: + image: /images/pe/mqtt-broker/user-guide/white-labeling/download-image-1.png + title: 'If you're using the list view of images, click the "Download image" icon next to the image name that you want to export. The image in image file format will be saved to your PC.' + 1: + image: /images/pe/mqtt-broker/user-guide/white-labeling/download-image-2.png + title: 'If you're using the grid view, hover your mouse pointer over the image you want to export and click the "Download image" icon. The image in image file format will be saved to your PC.' + +export-image-1: + 0: + image: /images/pe/mqtt-broker/user-guide/white-labeling/export-image-1.png + title: 'If you're using the list view of images, click the "Export image to JSON" icon next to the image name that you want to download. The image in JSON format will be saved to your PC.' + 1: + image: /images/pe/mqtt-broker/user-guide/white-labeling/export-image-2.png + title: 'If you're using the grid view, hover your mouse pointer over the image you want to download and click the "Export image to JSON" icon. The image in JSON format will be saved to your PC.' + +edit-image-1: + 0: + image: /images/pe/mqtt-broker/user-guide/white-labeling/edit-image-1.png + title: 'To open editing an image window, click the "Edit image" icon next to the image name that you want to edit;' + 1: + image: /images/pe/mqtt-broker/user-guide/white-labeling/edit-image-2.png + title: 'In this window, you can rename, download, export to JSON, and update image. Enter a new name and click the "Save" icon to change the image name.' + 2: + image: /images/pe/mqtt-broker/user-guide/white-labeling/edit-image-3.png + title: 'The image name has been changed.' + +update-image-1: + 0: + image: /images/pe/mqtt-broker/user-guide/white-labeling/update-image-1.png + title: 'To update the image, click the "Update image" button in the image editing window;' + 1: + image: /images/pe/mqtt-broker/user-guide/white-labeling/update-image-2.png + title: 'Select a new image or simply drag it here and click the "Update" button;' + 2: + image: /images/pe/mqtt-broker/user-guide/white-labeling/update-image-3.png + title: 'The image has been updated.' + +delete-image-1: + 0: + image: /images/pe/mqtt-broker/user-guide/white-labeling/delete-image-1.png + title: 'Click the "Delete image" icon opposite the image's name you want to delete;' + 1: + image: /images/pe/mqtt-broker/user-guide/white-labeling/delete-image-2.png + title: 'Confirm deleting the image in the dialog box' + +delete-image-2: + 0: + image: /images/pe/mqtt-broker/user-guide/white-labeling/delete-image-3.png + title: 'Hover your mouse over the image you want to delete and click the "Delete image" icon;' + 1: + image: /images/pe/mqtt-broker/user-guide/white-labeling/delete-image-4.png + title: 'Confirm deleting the image in the dialog box' + +delete-image-3: + 0: + image: /images/pe/mqtt-broker/user-guide/white-labeling/delete-image-5.png + title: 'Mark one or multiple images you want to delete. Click on the "Delete" bin icon in the top right corner;' + 1: + image: /images/pe/mqtt-broker/user-guide/white-labeling/delete-image-6.png + title: 'Confirm deleting images in the dialog box' + +--- + +{% assign docsPrefix = "pe/" %} +{% include docs/pe/mqtt-broker/image-gallery.md %} diff --git a/docs/pe/mqtt-broker/index.md b/docs/pe/mqtt-broker/index.md new file mode 100644 index 0000000000..6d8d045700 --- /dev/null +++ b/docs/pe/mqtt-broker/index.md @@ -0,0 +1,8 @@ +--- +layout: docwithnav-pe-mqtt-broker +title: TBMQ Professional Edition +description: PE TBMQ - learn about the platform and get your IoT projects running on TBMQ +--- + +{% assign docsPrefix = "pe/" %} +{% include docs/mqtt-broker/index.md %} diff --git a/docs/pe/mqtt-broker/install/cluster/aws-cluster-setup.md b/docs/pe/mqtt-broker/install/cluster/aws-cluster-setup.md new file mode 100644 index 0000000000..b6b4d4b522 --- /dev/null +++ b/docs/pe/mqtt-broker/install/cluster/aws-cluster-setup.md @@ -0,0 +1,66 @@ +--- +layout: docwithnav-pe-mqtt-broker +title: Deploy TBMQ PE Cluster on AWS with Kubernetes +description: Deploy TBMQ PE Cluster on AWS with Kubernetes + +tbmq-rds-set-up: + 0: + image: /images/mqtt-broker/install/aws-rds-vpc.png + title: 'AWS RDS Connectivity - choose VPC with the name of your cluster' + 1: + image: /images/mqtt-broker/install/aws-rds-vpc-sg.png + title: 'AWS RDS SG - choose "eksctl-tbmq-cluster-ClusterSharedNodeSecurityGroup-*" security group' + 2: + image: /images/mqtt-broker/install/aws-rds-default-database.png + title: 'AWS RDS Additional config - type "thingsboard_mqtt_broker" for the initial database name' + +tbmq-msk-set-up: + 0: + image: /images/mqtt-broker/install/aws-msk-creation.png + title: 'AWS MSK - create cluster' + +tbmq-msk-configuration: + 0: + image: /images/mqtt-broker/install/aws-msk-vpc.png + title: 'AWS MSK - choose TBMQ cluster’s VPC' + 1: + image: /images/mqtt-broker/install/aws-msk-vpc-sg.png + title: 'AWS MSK - choose "eksctl-tbmq-cluster-ClusterSharedNodeSecurityGroup-*" security group' + 2: + image: /images/mqtt-broker/install/aws-msk-security.png + title: 'AWS MSK - enable Plaintext communication between clients and brokers' + +tbmq-redis-set-up: + 0: + image: /images/mqtt-broker/install/aws-redis-create.png + title: 'AWS ElastiCache - create Valkey cluster' + 1: + image: /images/mqtt-broker/install/aws-redis-cluster-settings.png + title: 'AWS ElastiCache - choose 8.x engine version and appropriate Node type' + 2: + image: /images/mqtt-broker/install/aws-redis-connectivity.png + title: 'AWS ElastiCache - choose TBMQ VPC and private subnets' + 3: + image: /images/mqtt-broker/install/aws-redis-advanced.png + title: 'AWS ElastiCache - choose "eksctl-tbmq-cluster-ClusterSharedNodeSecurityGroup-*" security group' + +tbmq-rds-link-configure: + 0: + image: /images/mqtt-broker/install/aws-rds-endpoint.png + title: 'AWS RDS Details' + +tbmq-msk-link-configure: + 0: + image: /images/mqtt-broker/install/aws-msk-arn.png + title: 'AWS MSK Details' + +tbmq-redis-link-configure: + 0: + image: /images/mqtt-broker/install/aws-redis-result.png + title: 'AWS ElastiCache Details' + +--- + +{% assign docsPrefix = "pe/" %} +{% assign tbmqSuffix = "PE" %} +{% include docs/mqtt-broker/install/cluster/aws-cluster-setup.md %} diff --git a/docs/pe/mqtt-broker/install/cluster/azure-cluster-setup.md b/docs/pe/mqtt-broker/install/cluster/azure-cluster-setup.md new file mode 100644 index 0000000000..721f9338a5 --- /dev/null +++ b/docs/pe/mqtt-broker/install/cluster/azure-cluster-setup.md @@ -0,0 +1,11 @@ +--- +layout: docwithnav-pe-mqtt-broker +title: Deploy TBMQ PE Cluster on Azure with Kubernetes +description: Deploy TBMQ PE Cluster on Azure with Kubernetes + +--- + +{% assign docsPrefix = "pe/" %} +{% assign tbmqSuffix = "PE" %} +{% assign deployment = "azure" %} +{% include docs/mqtt-broker/install/cluster/azure-cluster-setup.md %} diff --git a/docs/pe/mqtt-broker/install/cluster/docker-compose-setup.md b/docs/pe/mqtt-broker/install/cluster/docker-compose-setup.md new file mode 100644 index 0000000000..2c6bf21b14 --- /dev/null +++ b/docs/pe/mqtt-broker/install/cluster/docker-compose-setup.md @@ -0,0 +1,10 @@ +--- +layout: docwithnav-pe-mqtt-broker +title: Deploy TBMQ PE Cluster using Docker Compose +description: Deploy TBMQ PE Cluster using Docker Compose + +--- + +{% assign docsPrefix = "pe/" %} +{% assign tbmqSuffix = "PE" %} +{% include docs/mqtt-broker/install/cluster/docker-compose-setup.md %} diff --git a/docs/pe/mqtt-broker/install/cluster/gcp-cluster-setup.md b/docs/pe/mqtt-broker/install/cluster/gcp-cluster-setup.md new file mode 100644 index 0000000000..f3753fcbb9 --- /dev/null +++ b/docs/pe/mqtt-broker/install/cluster/gcp-cluster-setup.md @@ -0,0 +1,11 @@ +--- +layout: docwithnav-pe-mqtt-broker +title: Deploy TBMQ PE Cluster on GCP with Kubernetes +description: Deploy TBMQ PE Cluster on GCP with Kubernetes + +--- + +{% assign docsPrefix = "pe/" %} +{% assign tbmqSuffix = "PE" %} +{% assign deployment = "gcp" %} +{% include docs/mqtt-broker/install/cluster/gcp-cluster-setup.md %} diff --git a/docs/pe/mqtt-broker/install/cluster/helm-cluster-setup-aws.md b/docs/pe/mqtt-broker/install/cluster/helm-cluster-setup-aws.md new file mode 100644 index 0000000000..ef52587e4c --- /dev/null +++ b/docs/pe/mqtt-broker/install/cluster/helm-cluster-setup-aws.md @@ -0,0 +1,10 @@ +--- +layout: docwithnav-pe-mqtt-broker +title: Deploy TBMQ PE Cluster on EKS with Helm +description: Deploy TBMQ PE Cluster on EKS with Helm + +--- + +{% assign docsPrefix = "pe/" %} +{% assign tbmqSuffix = "PE" %} +![image](/images/coming-soon.jpg) diff --git a/docs/pe/mqtt-broker/install/cluster/helm-cluster-setup-azure.md b/docs/pe/mqtt-broker/install/cluster/helm-cluster-setup-azure.md new file mode 100644 index 0000000000..7be3c6cd36 --- /dev/null +++ b/docs/pe/mqtt-broker/install/cluster/helm-cluster-setup-azure.md @@ -0,0 +1,10 @@ +--- +layout: docwithnav-pe-mqtt-broker +title: Deploy TBMQ PE Cluster on AKS with Helm +description: Deploy TBMQ PE Cluster on AKS with Helm + +--- + +{% assign docsPrefix = "pe/" %} +{% assign tbmqSuffix = "PE" %} +![image](/images/coming-soon.jpg) diff --git a/docs/pe/mqtt-broker/install/cluster/helm-cluster-setup-gcp.md b/docs/pe/mqtt-broker/install/cluster/helm-cluster-setup-gcp.md new file mode 100644 index 0000000000..1aa3682b09 --- /dev/null +++ b/docs/pe/mqtt-broker/install/cluster/helm-cluster-setup-gcp.md @@ -0,0 +1,10 @@ +--- +layout: docwithnav-pe-mqtt-broker +title: Deploy TBMQ PE Cluster on GKE with Helm +description: Deploy TBMQ PE Cluster on GKE with Helm + +--- + +{% assign docsPrefix = "pe/" %} +{% assign tbmqSuffix = "PE" %} +![image](/images/coming-soon.jpg) diff --git a/docs/pe/mqtt-broker/install/cluster/helm-cluster-setup-minikube.md b/docs/pe/mqtt-broker/install/cluster/helm-cluster-setup-minikube.md new file mode 100644 index 0000000000..b657ef728a --- /dev/null +++ b/docs/pe/mqtt-broker/install/cluster/helm-cluster-setup-minikube.md @@ -0,0 +1,10 @@ +--- +layout: docwithnav-pe-mqtt-broker +title: Deploy TBMQ PE Cluster on Minikube with Helm +description: Deploy TBMQ PE Cluster on Minikube with Helm + +--- + +{% assign docsPrefix = "pe/" %} +{% assign tbmqSuffix = "PE" %} +![image](/images/coming-soon.jpg) diff --git a/docs/pe/mqtt-broker/install/cluster/helm-cluster-setup-options.md b/docs/pe/mqtt-broker/install/cluster/helm-cluster-setup-options.md new file mode 100644 index 0000000000..edf2b40f1e --- /dev/null +++ b/docs/pe/mqtt-broker/install/cluster/helm-cluster-setup-options.md @@ -0,0 +1,10 @@ +--- +layout: docwithnav-pe-mqtt-broker +title: TBMQ cluster setup using Helm +description: K8S environment options for TBMQ cluster setup using Helm +notitle: "true" +--- + +{% assign docsPrefix = "pe/" %} +{% assign tbmqSuffix = "PE" %} +{% include docs/mqtt-broker/install/cluster/helm-cluster-setup-options.md %} diff --git a/docs/pe/mqtt-broker/install/cluster/helm-cluster-upgrading-options.md b/docs/pe/mqtt-broker/install/cluster/helm-cluster-upgrading-options.md new file mode 100644 index 0000000000..474e1ce346 --- /dev/null +++ b/docs/pe/mqtt-broker/install/cluster/helm-cluster-upgrading-options.md @@ -0,0 +1,10 @@ +--- +layout: docwithnav-pe-mqtt-broker +title: TBMQ cluster setup using Helm +description: K8S environment options for TBMQ cluster setup using Helm +notitle: "true" +--- + +{% assign docsPrefix = "pe/" %} +{% assign tbmqSuffix = "PE" %} +{% include docs/mqtt-broker/install/cluster/helm-cluster-upgrading-options.md %} diff --git a/docs/pe/mqtt-broker/install/cluster/minikube-cluster-setup.md b/docs/pe/mqtt-broker/install/cluster/minikube-cluster-setup.md new file mode 100644 index 0000000000..2107b875a8 --- /dev/null +++ b/docs/pe/mqtt-broker/install/cluster/minikube-cluster-setup.md @@ -0,0 +1,10 @@ +--- +layout: docwithnav-pe-mqtt-broker +title: Deploy TBMQ PE Cluster on Minikube with Kubernetes +description: Deploy TBMQ PE Cluster on Minikube with Kubernetes + +--- + +{% assign docsPrefix = "pe/" %} +{% assign tbmqSuffix = "PE" %} +{% include docs/mqtt-broker/install/cluster/minikube-cluster-setup.md %} diff --git a/docs/pe/mqtt-broker/install/cluster/resources/upgrade-options/docker-compose-upgrade-tbmq-with-from-version.md b/docs/pe/mqtt-broker/install/cluster/resources/upgrade-options/docker-compose-upgrade-tbmq-with-from-version.md new file mode 100644 index 0000000000..68fc17ec8d --- /dev/null +++ b/docs/pe/mqtt-broker/install/cluster/resources/upgrade-options/docker-compose-upgrade-tbmq-with-from-version.md @@ -0,0 +1,11 @@ +```bash +./scripts/docker-stop-services.sh +./scripts/docker-upgrade-tbmq.sh --fromVersion=FROM_VERSION +./scripts/docker-start-services.sh +``` +{: .copy-code} + +Where `FROM_VERSION` - from which version upgrade should be started. +See [Upgrade Instructions](/docs/mqtt-broker/install/upgrade-instructions/) for valid `fromVersion` values. + +
\ No newline at end of file diff --git a/docs/pe/mqtt-broker/install/cluster/resources/upgrade-options/docker-compose-upgrade-tbmq-without-from-version.md b/docs/pe/mqtt-broker/install/cluster/resources/upgrade-options/docker-compose-upgrade-tbmq-without-from-version.md new file mode 100644 index 0000000000..1b45c939d6 --- /dev/null +++ b/docs/pe/mqtt-broker/install/cluster/resources/upgrade-options/docker-compose-upgrade-tbmq-without-from-version.md @@ -0,0 +1,6 @@ +```bash +./scripts/docker-stop-services.sh +./scripts/docker-upgrade-tbmq.sh +./scripts/docker-start-services.sh +``` +{: .copy-code} \ No newline at end of file diff --git a/docs/pe/mqtt-broker/install/cluster/resources/upgrade-options/k8s-upgrade-tbmq-with-from-version.md b/docs/pe/mqtt-broker/install/cluster/resources/upgrade-options/k8s-upgrade-tbmq-with-from-version.md new file mode 100644 index 0000000000..cd342e61ef --- /dev/null +++ b/docs/pe/mqtt-broker/install/cluster/resources/upgrade-options/k8s-upgrade-tbmq-with-from-version.md @@ -0,0 +1,8 @@ +```bash +./k8s-upgrade-tbmq.sh --fromVersion=FROM_VERSION +``` +{: .copy-code} + +Where `FROM_VERSION` - from which version upgrade should be started. See [Upgrade Instructions](/docs/mqtt-broker/install/upgrade-instructions/) for valid `fromVersion` values. + +
\ No newline at end of file diff --git a/docs/pe/mqtt-broker/install/cluster/resources/upgrade-options/k8s-upgrade-tbmq-without-from-version.sh b/docs/pe/mqtt-broker/install/cluster/resources/upgrade-options/k8s-upgrade-tbmq-without-from-version.sh new file mode 100644 index 0000000000..1c547a0ca7 --- /dev/null +++ b/docs/pe/mqtt-broker/install/cluster/resources/upgrade-options/k8s-upgrade-tbmq-without-from-version.sh @@ -0,0 +1 @@ +./k8s-upgrade-tbmq.sh diff --git a/docs/pe/mqtt-broker/install/config.md b/docs/pe/mqtt-broker/install/config.md new file mode 100644 index 0000000000..47e7a3e540 --- /dev/null +++ b/docs/pe/mqtt-broker/install/config.md @@ -0,0 +1,10 @@ +--- +layout: docwithnav-pe-mqtt-broker +title: Configuration properties +description: TBMQ PE configuration properties and environment variables + +--- + +{% assign docsPrefix = "pe/" %} +{% assign tbmqSuffix = "PE" %} +{% include docs/mqtt-broker/install/configuration.md %} diff --git a/docs/pe/mqtt-broker/install/docker-windows.md b/docs/pe/mqtt-broker/install/docker-windows.md new file mode 100644 index 0000000000..2b39077b28 --- /dev/null +++ b/docs/pe/mqtt-broker/install/docker-windows.md @@ -0,0 +1,10 @@ +--- +layout: docwithnav-pe-mqtt-broker +title: Install TBMQ PE with Docker (Windows) +description: Install TBMQ PE with Docker (Windows) + +--- + +{% assign docsPrefix = "pe/" %} +{% assign tbmqSuffix = "PE" %} +{% include docs/mqtt-broker/install/docker-windows.md %} diff --git a/docs/pe/mqtt-broker/install/docker.md b/docs/pe/mqtt-broker/install/docker.md new file mode 100644 index 0000000000..b171b3a083 --- /dev/null +++ b/docs/pe/mqtt-broker/install/docker.md @@ -0,0 +1,10 @@ +--- +layout: docwithnav-pe-mqtt-broker +title: Install TBMQ PE with Docker (Linux or Mac OS) +description: Install TBMQ PE with Docker (Linux or Mac OS) + +--- + +{% assign docsPrefix = "pe/" %} +{% assign tbmqSuffix = "PE" %} +{% include docs/mqtt-broker/install/docker.md %} diff --git a/docs/pe/mqtt-broker/install/ie-config.md b/docs/pe/mqtt-broker/install/ie-config.md new file mode 100644 index 0000000000..5aedd01460 --- /dev/null +++ b/docs/pe/mqtt-broker/install/ie-config.md @@ -0,0 +1,10 @@ +--- +layout: docwithnav-pe-mqtt-broker +title: Integration Executor configuration properties +description: TBMQ PE IE configuration properties and environment variables + +--- + +{% assign docsPrefix = "pe/" %} +{% assign tbmqSuffix = "PE" %} +{% include docs/mqtt-broker/install/ie-configuration.md %} diff --git a/docs/pe/mqtt-broker/install/installation-options.md b/docs/pe/mqtt-broker/install/installation-options.md new file mode 100644 index 0000000000..75dccab661 --- /dev/null +++ b/docs/pe/mqtt-broker/install/installation-options.md @@ -0,0 +1,23 @@ +--- +layout: docwithnav-pe-mqtt-broker +title: TBMQ PE installation options +description: TBMQ Professional Edition installation instructions for various operation systems +notitle: "true" +--- + +
+
+
+
+
+

TBMQ Professional Edition installation options

+
+
+
+ {% include installation-options-cards.liquid installationOptions="installation-options-pe-mqtt-broker" active=true %} +
+
+
+
+
+
diff --git a/docs/pe/mqtt-broker/install/upgrade-instructions.md b/docs/pe/mqtt-broker/install/upgrade-instructions.md new file mode 100644 index 0000000000..701676f1d7 --- /dev/null +++ b/docs/pe/mqtt-broker/install/upgrade-instructions.md @@ -0,0 +1,9 @@ +--- +layout: docwithnav-pe-mqtt-broker +title: Upgrade instructions +description: TBMQ upgrade instructions +notitle: "true" +--- + +{% assign docsPrefix = "pe/" %} +{% include docs/mqtt-broker/install/upgrade-instructions.md %} diff --git a/docs/pe/mqtt-broker/integrations/http.md b/docs/pe/mqtt-broker/integrations/http.md new file mode 100644 index 0000000000..4139552564 --- /dev/null +++ b/docs/pe/mqtt-broker/integrations/http.md @@ -0,0 +1,47 @@ +--- +layout: docwithnav-pe-mqtt-broker +title: HTTP Integration +description: TBMQ HTTP integration guide + +tb-endpoint-url: + 0: + image: /images/mqtt-broker/user-guide/ui/tb-endpoint-url-1.png + title: 'In your ThingsBoard Cloud instance navigate to the "Integrations" page and opne HTTP integration details. Then enable debug mode and copy "HTTP endpoint URL".' + +add-http-integration: + 0: + image: /images/pe/mqtt-broker/user-guide/ui/add-http-integration-1.png + title: 'Navigate to the "Integrations" page, and click "plus" icon to add a new integration.' + 1: + image: /images/pe/mqtt-broker/user-guide/ui/add-http-integration-2.png + title: 'Select "HTTP" as the integration type and click "Next".' + 2: + image: /images/pe/mqtt-broker/user-guide/ui/add-http-integration-3.png + title: 'Click "Next" to subscribe to the default topic "tbmq/#".' + 3: + image: /images/pe/mqtt-broker/user-guide/ui/add-http-integration-4.png + title: 'In the field "Endpoint URL" paste the URL from the HTTP integration of your ThingsBoard Cloud.' + 4: + image: /images/pe/mqtt-broker/user-guide/ui/add-http-integration-5.png + title: 'Open "Advanced settings", set "Payload content type" as JSON, and click "Add".' + +send-uplink-message: + 0: + image: /images/pe/mqtt-broker/user-guide/ui/send-uplink-message-1.png + title: 'Navigate to the "WebSocket Client" page, select working connection, then click "Connect".' + 1: + image: /images/pe/mqtt-broker/user-guide/ui/send-uplink-message-2.png + title: 'Set topic name as "tbmq/http-integration", and click "Send" to publish message.' + +http-integration-result: + 0: + image: /images/mqtt-broker/user-guide/ui/http-integration-result-1.png + title: 'Open ThingsBoard Cloud HTTP integration details page.' + 1: + image: /images/mqtt-broker/user-guide/ui/http-integration-result-2.png + title: 'Go to the "Events" tab, the message from the TBMQ HTTP integration should be available in the table (if the debug mode was enabled when message was published).' + +--- + +{% assign docsPrefix = "pe/" %} +{% include docs/mqtt-broker/integrations/http.md %} diff --git a/docs/pe/mqtt-broker/integrations/index.md b/docs/pe/mqtt-broker/integrations/index.md new file mode 100644 index 0000000000..16727d0fc4 --- /dev/null +++ b/docs/pe/mqtt-broker/integrations/index.md @@ -0,0 +1,9 @@ +--- +layout: docwithnav-pe-mqtt-broker +title: Integrations +description: TBMQ Integrations Documentation + +--- + +{% assign docsPrefix = "pe/" %} +{% include docs/mqtt-broker/integrations/index.md %} diff --git a/docs/pe/mqtt-broker/integrations/kafka.md b/docs/pe/mqtt-broker/integrations/kafka.md new file mode 100644 index 0000000000..0c70e24142 --- /dev/null +++ b/docs/pe/mqtt-broker/integrations/kafka.md @@ -0,0 +1,63 @@ +--- +layout: docwithnav-pe-mqtt-broker +title: Kafka Integration +description: TBMQ Kafka integration guide + +add-kafka-integration: + 0: + image: /images/pe/mqtt-broker/user-guide/ui/add-http-integration-1.png + title: 'Navigate to the "Integrations" page, and click "plus" icon to add a new integration.' + 1: + image: /images/pe/mqtt-broker/user-guide/ui/add-kafka-integration-2.png + title: 'Select "HTTP" as the integration type and click "Next".' + 2: + image: /images/pe/mqtt-broker/user-guide/ui/add-http-integration-3.png + title: 'Click "Next" to subscribe to the default topic "tbmq/#".' + +kafka-integration-docker: + 0: + image: /images/pe/mqtt-broker/user-guide/ui/add-kafka-integration-4.png + title: 'Specify bootstrap servers that you are going to connect to, and if required, add Other properties key value pairs' + +kafka-integration-cloud-server: + 0: + image: /images/mqtt-broker/user-guide/ui/kafka-integration-cloud-server-1.png + 1: + image: /images/pe/mqtt-broker/user-guide/ui/kafka-integration-cloud-server-2.png + +kafka-integration-cloud-properties: + 0: + image: /images/mqtt-broker/user-guide/ui/kafka-integration-cloud-properties-1.png + 1: + image: /images/mqtt-broker/user-guide/ui/kafka-integration-cloud-properties-2.png + 2: + image: /images/mqtt-broker/user-guide/ui/kafka-integration-cloud-properties-3.png + 3: + image: /images/pe/mqtt-broker/user-guide/ui/kafka-integration-cloud-properties-4.png + +kafka-integration-cloud-topic: + 0: + image: /images/mqtt-broker/user-guide/ui/kafka-integration-cloud-topic-1.png + 1: + image: /images/mqtt-broker/user-guide/ui/kafka-integration-cloud-topic-2.png + 2: + image: /images/mqtt-broker/user-guide/ui/kafka-integration-cloud-topic-3.png + +send-uplink-message-kafka: + 0: + image: /images/pe/mqtt-broker/user-guide/ui/send-uplink-message-1.png + title: 'Navigate to the "WebSocket Client" page, select working connection, then click "Connect".' + 1: + image: /images/pe/mqtt-broker/user-guide/ui/send-uplink-message-kafka-1.png + title: 'Set topic name as "tbmq/kafka-integration", and click "Send" to publish message.' + 2: + image: /images/mqtt-broker/user-guide/ui/send-uplink-message-kafka-2.png + title: 'In the Confluent Cloud open Topics and click on the topic "tbmq.messages".' + 3: + image: /images/mqtt-broker/user-guide/ui/send-uplink-message-kafka-3.png + title: 'The message from the TBMQ Kafka integration should be available in the messages table.' + +--- + +{% assign docsPrefix = "pe/" %} +{% include docs/mqtt-broker/integrations/kafka.md %} diff --git a/docs/pe/mqtt-broker/integrations/mqtt.md b/docs/pe/mqtt-broker/integrations/mqtt.md new file mode 100644 index 0000000000..8b319041f8 --- /dev/null +++ b/docs/pe/mqtt-broker/integrations/mqtt.md @@ -0,0 +1,31 @@ +--- +layout: docwithnav-pe-mqtt-broker +title: MQTT Integration +description: TBMQ MQTT integration guide + +add-mqtt-integration: + 0: + image: /images/pe/mqtt-broker/user-guide/ui/add-http-integration-1.png + title: 'Navigate to the "Integrations" page, and click "plus" icon to add a new integration.' + 1: + image: /images/pe/mqtt-broker/user-guide/ui/add-mqtt-integration-2.png + title: 'Select "MQTT" as the integration type and click "Next".' + 2: + image: /images/pe/mqtt-broker/user-guide/ui/add-mqtt-integration-3.png + title: 'Change default topic filter to "tbmq/mqtt-integration" and click "Next".' + 3: + image: /images/pe/mqtt-broker/user-guide/ui/add-mqtt-integration-4.png + title: 'Specify external broker "Host", "Port", "Credentials" and "Topic name". Then click "Add".' + +send-uplink-message: + 0: + image: /images/pe/mqtt-broker/user-guide/ui/send-uplink-message-1.png + title: 'Navigate to the "WebSocket Client" page, select working connection, then click "Connect".' + 1: + image: /images/pe/mqtt-broker/user-guide/ui/send-mqtt-message-2.png + title: 'Set topic name as "tbmq/mqtt-integration", and click "Send" to publish message.' + +--- + +{% assign docsPrefix = "pe/" %} +{% include docs/mqtt-broker/integrations/mqtt.md %} diff --git a/docs/pe/mqtt-broker/mqtt-client-credentials-management.md b/docs/pe/mqtt-broker/mqtt-client-credentials-management.md new file mode 100644 index 0000000000..0a122a13b7 --- /dev/null +++ b/docs/pe/mqtt-broker/mqtt-client-credentials-management.md @@ -0,0 +1,9 @@ +--- +layout: docwithnav-pe-mqtt-broker +title: MQTT Client Credentials +description: Create/Update/Delete MQTT Client Credentials + +--- + +{% assign docsPrefix = "pe/" %} +{% include docs/mqtt-broker/mqtt-client-credentials-management.md %} \ No newline at end of file diff --git a/docs/pe/mqtt-broker/other/blocked-client.md b/docs/pe/mqtt-broker/other/blocked-client.md new file mode 100644 index 0000000000..df4c425de5 --- /dev/null +++ b/docs/pe/mqtt-broker/other/blocked-client.md @@ -0,0 +1,9 @@ +--- +layout: docwithnav-pe-mqtt-broker +title: Blocked Clients +description: TBMQ Blocked Clients description + +--- + +{% assign docsPrefix = "pe/" %} +{% include docs/mqtt-broker/other/blocked-client.md %} diff --git a/docs/pe/mqtt-broker/other/health.md b/docs/pe/mqtt-broker/other/health.md new file mode 100644 index 0000000000..de6777ea34 --- /dev/null +++ b/docs/pe/mqtt-broker/other/health.md @@ -0,0 +1,9 @@ +--- +layout: docwithnav-pe-mqtt-broker +title: Health API +description: TBMQ Health API description + +--- + +{% assign docsPrefix = "pe/" %} +{% include docs/mqtt-broker/other/health.md %} diff --git a/docs/pe/mqtt-broker/other/msg-delivery-strategy.md b/docs/pe/mqtt-broker/other/msg-delivery-strategy.md new file mode 100644 index 0000000000..8c2d66e35f --- /dev/null +++ b/docs/pe/mqtt-broker/other/msg-delivery-strategy.md @@ -0,0 +1,9 @@ +--- +layout: docwithnav-pe-mqtt-broker +title: Message Delivery Strategies +description: TBMQ Message Delivery Strategies documentation + +--- + +{% assign docsPrefix = "pe/" %} +{% include docs/mqtt-broker/other/msg-delivery-strategy.md %} diff --git a/docs/pe/mqtt-broker/other/proxy-protocol.md b/docs/pe/mqtt-broker/other/proxy-protocol.md new file mode 100644 index 0000000000..b395894306 --- /dev/null +++ b/docs/pe/mqtt-broker/other/proxy-protocol.md @@ -0,0 +1,9 @@ +--- +layout: docwithnav-pe-mqtt-broker +title: PROXY Protocol +description: TBMQ PROXY Protocol description + +--- + +{% assign docsPrefix = "pe/" %} +{% include docs/mqtt-broker/other/proxy-protocol.md %} diff --git a/docs/pe/mqtt-broker/reference/100m-connections-performance-test.md b/docs/pe/mqtt-broker/reference/100m-connections-performance-test.md new file mode 100644 index 0000000000..eea4170d34 --- /dev/null +++ b/docs/pe/mqtt-broker/reference/100m-connections-performance-test.md @@ -0,0 +1,43 @@ +--- +layout: docwithnav-pe-mqtt-broker +title: TBMQ Cluster Supports 100M MQTT Connections +description: TBMQ cluster-mode 100M MQTT connections performance test + +broker-aws-monitoring: + 0: + image: /images/mqtt-broker/reference/aws/aws-broker.png + title: 'AWS EC2 TBMQ Monitoring' + 1: + image: /images/mqtt-broker/reference/aws/aws-kafka.png + title: 'AWS EC2 Kafka Monitoring' + 2: + image: /images/mqtt-broker/reference/aws/aws-kafka-volume.png + title: 'AWS EBS Kafka Monitoring' + 3: + image: /images/mqtt-broker/reference/aws/aws-rds-stats.png + title: 'AWS RDS Monitoring' + +broker-jmx-monitoring: + 0: + image: /images/mqtt-broker/reference/jmx/broker-jmx.png + title: 'TBMQ JMX' + +broker-topics-monitoring: + 0: + image: /images/mqtt-broker/reference/topics/mqtt-pub-topic.png + title: 'Publish msg topic - received all 11,400M messages' + 1: + image: /images/mqtt-broker/reference/topics/mqtt-app-topic-1.png + title: 'Application topic example 1 - received all 22.8M messages' + 2: + image: /images/mqtt-broker/reference/topics/mqtt-app-topic-2.png + title: 'Application topic example 2 - received all 22.8M messages' + +broker-grafana-monitoring: + 0: + image: /images/mqtt-broker/reference/grafana/consumer-lag.png + title: 'Consumer lag monitoring' +--- + +{% assign docsPrefix = "pe/" %} +{% include docs/mqtt-broker/reference/100m-connections-performance-test.md %} diff --git a/docs/pe/mqtt-broker/reference/1m-throughput-p2p-performance-test.md b/docs/pe/mqtt-broker/reference/1m-throughput-p2p-performance-test.md new file mode 100644 index 0000000000..538ebe089e --- /dev/null +++ b/docs/pe/mqtt-broker/reference/1m-throughput-p2p-performance-test.md @@ -0,0 +1,34 @@ +--- +layout: docwithnav-pe-mqtt-broker +title: "Scaling P2P Messaging to 1M Msg/sec with Persistent MQTT Clients" +description: 1M msg/sec throughput One-to-one messaging utilizing persistent DEVICE clients as subscribers + +tbmq-p2p-test-aws-infrastructure: + 0: + image: /images/mqtt-broker/reference/p2p-test/aws-instances.png + title: 'AWS EC2 instances deployed' + 1: + image: /images/mqtt-broker/reference/p2p-test/eks-pods.png + title: 'AWS EKS cluster pods running' + +tbmq-p2p-test-monitoring: + 0: + image: /images/mqtt-broker/reference/p2p-test/tbmq-aws.png + title: 'AWS EC2 TBMQ monitoring' + 1: + image: /images/mqtt-broker/reference/p2p-test/tbmq-visual-vm-jmx.png + title: 'Visual VM JMX TBMQ monitoring' + 2: + image: /images/mqtt-broker/reference/p2p-test/redis-monitoring.png + title: 'Redis Insight Monitoring: Handling ~5M Commands/sec and Managing ~2.5M Keys' + 3: + image: /images/mqtt-broker/reference/p2p-test/tbmq-total-connected-clients.png + title: 'TBMQ 1M connected clients' + 4: + image: /images/mqtt-broker/reference/p2p-test/tbmq-total-subscriptions.png + title: 'TBMQ 500k subscriptions QoS 1' + +--- + +{% assign docsPrefix = "pe/" %} +{% include docs/mqtt-broker/reference/1m-throughput-p2p-performance-test.md %} \ No newline at end of file diff --git a/docs/pe/mqtt-broker/reference/3m-throughput-single-node-performance-test.md b/docs/pe/mqtt-broker/reference/3m-throughput-single-node-performance-test.md new file mode 100644 index 0000000000..8f712350cb --- /dev/null +++ b/docs/pe/mqtt-broker/reference/3m-throughput-single-node-performance-test.md @@ -0,0 +1,25 @@ +--- +layout: docwithnav-pe-mqtt-broker +title: 3M Msg/sec Throughput with a Single TBMQ Node +description: TBMQ 3M msg/s throughput single node performance test + +tbmq-3m-single-node-test-aws-instances: + 0: + image: /images/mqtt-broker/reference/single-node-test/aws-instances.png + title: 'AWS EC2 instances deployed' + +tbmq-3m-single-node-test-monitoring: + 0: + image: /images/mqtt-broker/reference/single-node-test/tbmq-aws.png + title: 'AWS EC2 TBMQ monitoring' + 1: + image: /images/mqtt-broker/reference/single-node-test/tbmq-jmx.png + title: 'JMX TBMQ monitoring' + 2: + image: /images/mqtt-broker/reference/single-node-test/tbmq-monitoring.png + title: 'TBMQ graphs monitoring' + +--- + +{% assign docsPrefix = "pe/" %} +{% include docs/mqtt-broker/reference/3m-throughput-single-node-performance-test.md %} diff --git a/docs/pe/mqtt-broker/reference/resources/get-token-response.json b/docs/pe/mqtt-broker/reference/resources/get-token-response.json new file mode 100755 index 0000000000..b6aac67966 --- /dev/null +++ b/docs/pe/mqtt-broker/reference/resources/get-token-response.json @@ -0,0 +1 @@ +{"token":"$YOUR_JWT_TOKEN", "refreshToken":"$YOUR_JWT_REFRESH_TOKEN"} \ No newline at end of file diff --git a/docs/pe/mqtt-broker/reference/resources/get-token.sh b/docs/pe/mqtt-broker/reference/resources/get-token.sh new file mode 100755 index 0000000000..4335190954 --- /dev/null +++ b/docs/pe/mqtt-broker/reference/resources/get-token.sh @@ -0,0 +1 @@ +curl -X POST --header 'Content-Type: application/json' --header 'Accept: application/json' -d '{"username":"sysadmin@thingsboard.org", "password":"sysadmin"}' 'http://THINGSBOARD_MQTT_BROKER_URL/api/auth/login' \ No newline at end of file diff --git a/docs/pe/mqtt-broker/releases.md b/docs/pe/mqtt-broker/releases.md new file mode 100644 index 0000000000..d315a7465a --- /dev/null +++ b/docs/pe/mqtt-broker/releases.md @@ -0,0 +1,11 @@ +--- +layout: docwithnav-pe-mqtt-broker +title: TBMQ Professional Edition Release Notes +description: TBMQ Professional Edition Releases + +--- + +* TOC +{:toc} + +## v2.2.0 (November ?, 2025) {#v220PE} diff --git a/docs/pe/mqtt-broker/rest-api.md b/docs/pe/mqtt-broker/rest-api.md new file mode 100644 index 0000000000..9e4799d0c0 --- /dev/null +++ b/docs/pe/mqtt-broker/rest-api.md @@ -0,0 +1,17 @@ +--- +layout: docwithnav-pe-mqtt-broker +title: Administration REST API +description: Administration REST API + +broker-swagger-ui: + 0: + image: /images/mqtt-broker/api/swagger.png + title: 'Swagger UI. Click on "Authorize" button to proceed' + 1: + image: /images/mqtt-broker/api/swagger-auth.png + title: 'Enter username and password to authorize' + +--- + +{% assign docsPrefix = "pe/" %} +{% include docs/mqtt-broker/rest-api.md %} diff --git a/docs/pe/mqtt-broker/roadmap.md b/docs/pe/mqtt-broker/roadmap.md new file mode 100644 index 0000000000..371f2c5fa6 --- /dev/null +++ b/docs/pe/mqtt-broker/roadmap.md @@ -0,0 +1,18 @@ +--- +layout: docwithnav-pe-mqtt-broker +title: TBMQ Professional Edition Roadmap +description: TBMQ upcoming releases + +--- + +* TOC +{:toc} + +The product roadmap listed below covers only main features and does not cover small improvements and bug fixes. + +## Upcoming releases + +* Webhook authentication for MQTT clients; +* Tracking dropped messages; +* Tracking MQTT client disconnections; +* More integrations with external third-party services. diff --git a/docs/pe/mqtt-broker/search.md b/docs/pe/mqtt-broker/search.md new file mode 100644 index 0000000000..719c9f6b1a --- /dev/null +++ b/docs/pe/mqtt-broker/search.md @@ -0,0 +1,7 @@ +--- +layout: docwithnav-pe-mqtt-broker +title: Search Results +hidetoc: "true" +--- + +{% include search.html %} diff --git a/docs/pe/mqtt-broker/security/authentication/basic.md b/docs/pe/mqtt-broker/security/authentication/basic.md new file mode 100644 index 0000000000..334162ccea --- /dev/null +++ b/docs/pe/mqtt-broker/security/authentication/basic.md @@ -0,0 +1,43 @@ +--- +layout: docwithnav-pe-mqtt-broker +title: Basic Authentication +description: Basic Authentication + +security-authentication-basic: + 0: + image: /images/pe/mqtt-broker/features/security-authentication-basic-1.png + title: 'Copy Basic credentials ID.' + 1: + image: /images/pe/mqtt-broker/features/security-authentication-basic-2.png + title: 'Basic authentication credentials params: Client ID, Username and Password.' + +security-authorization-basic: + 0: + image: /images/pe/mqtt-broker/features/security-authorization-basic-1.png + title: 'Examples of rule patterns that permit publishing to topics starting with "country/" and subscribing to topics starting with "city/".' + +authentication-provider-control: + 0: + image: /images/pe/mqtt-broker/security/auth-providers/provider-home-switch.png + title: 'Go to the Broker Settings card on the Home page to switch authentication providers.' + 1: + image: /images/pe/mqtt-broker/security/auth-providers/provider-table-switch.png + title: 'On the Authentication > Providers page, use the switch button in the table’s right column to enable or disable providers.' + 2: + image: /images/pe/mqtt-broker/security/auth-providers/basic/basic-overview.png + title: 'Open the Authentication > Providers page, select the Basic row, and click the "Edit" button to configure the provider.' + +tbmq-client-id-username-and-password: + 0: + image: /images/pe/mqtt-broker/security/auth-providers/basic/auth-client-id-username-and-password.png + title: '' + +tbmq-tls-client-id-username-and-password: + 0: + image: /images/pe/mqtt-broker/security/auth-providers/basic/tls-auth-client-id-username-and-password.png + title: '' + +--- + +{% assign docsPrefix = "pe/" %} +{% include docs/mqtt-broker/security/authentication/basic.md %} diff --git a/docs/pe/mqtt-broker/security/authentication/jwt.md b/docs/pe/mqtt-broker/security/authentication/jwt.md new file mode 100644 index 0000000000..42bc6ff59d --- /dev/null +++ b/docs/pe/mqtt-broker/security/authentication/jwt.md @@ -0,0 +1,66 @@ +--- +layout: docwithnav-pe-mqtt-broker +title: JWT Authentication +description: JWT Authentication + +configure-jwt-auth-provider: + 0: + image: /images/pe/mqtt-broker/security/auth-providers/jwt/configure-jwt-auth-provider.png + title: 'Open the Authentication > Providers page, select the JWT row, and click the "Edit" button to configure the provider.' +configure-signature-verifier-mechanism: + 0: + image: /images/pe/mqtt-broker/security/auth-providers/jwt/configure-signature-verifier-mechanism.png + title: 'Select the verification type that matches how your tokens are issued. If unsure, HMAC-based is usually the easiest to start with during testing.' +configure-hmac-based-verifier-mechanism: + 0: + image: /images/pe/mqtt-broker/security/auth-providers/jwt/configure-hmac-based-verifier-mechanism.png + title: 'Enter a raw shared secret. This secret will be used to verify JWTs signed using symmetric algorithms such as HS256, HS384, or HS512.' +configure-pem-based-verifier-mechanism: + 0: + image: /images/pe/mqtt-broker/security/auth-providers/jwt/configure-pem-based-verifier-mechanism.png + title: 'Upload a PEM-encoded public key file. TBMQ will use this key to verify JWTs signed with the corresponding private key.' +configure-jwks-based-verifier-mechanism: + 0: + image: /images/pe/mqtt-broker/security/auth-providers/jwt/configure-jwks-based-verifier-mechanism-0.png + title: 'Enter the JWKS endpoint URL, which TBMQ will use to fetch the JSON Web Key Set for token signature verification.' + 1: + image: /images/pe/mqtt-broker/security/auth-providers/jwt/configure-jwks-based-verifier-mechanism-1.png + title: 'Set the refresh interval in seconds. This controls how often TBMQ retrieves the JWKS from the remote endpoint.' + 2: + image: /images/pe/mqtt-broker/security/auth-providers/jwt/configure-jwks-based-verifier-mechanism-2.png + title: 'Select the credentials type for accessing the JWKS endpoint. In this case, Anonymous is selected, meaning no authentication is required.' + 3: + image: /images/pe/mqtt-broker/security/auth-providers/jwt/configure-jwks-based-verifier-mechanism-3.png + title: 'Add a custom HTTP header to JWKS requests. This example shows the Content-Type: application/json header and a placeholder for an additional custom header.' +configure-auth-claims: + 0: + image: /images/pe/mqtt-broker/security/auth-providers/jwt/configure-auth-claims.png + title: 'Authentication claims example: "sub" and "mqtt_user" match MQTT client ID and username; "env" is checked against static value "prod".' +configure-client-type: + 0: + image: /images/pe/mqtt-broker/security/auth-providers/jwt/configure-client-type.png + title: 'Client type is set to "DEVICE" by default. If the JWT contains claim "role" with the value "app", the client will be classified as "APPLICATION".' +configure-jwt-authorization: + 0: + image: /images/pe/mqtt-broker/security/auth-providers/jwt/configure-jwt-authorization.png + title: 'The JWT claim "pub_rules" restricts publish access to "devices/.*/data", while claim "sub_rules" expands subscribe access to include "alerts/.*".' +enable-and-save-jwt-provider: + 0: + image: /images/pe/mqtt-broker/security/auth-providers/jwt/enable-and-save-jwt-provider.png + title: 'Enable the JWT authentication provider and save the configuration.' +jwt-validate: + 0: + image: /images/mqtt-broker/security/auth-providers/jwt/jwt-validate.png + title: '' +jwt-mqtt-example: + 0: + image: /images/pe/mqtt-broker/security/auth-providers/jwt/jwt-mqtt-example.png + title: '' +jwt-mqtts-example: + 0: + image: /images/pe/mqtt-broker/security/auth-providers/jwt/jwt-mqtts-example.png + title: '' +--- + +{% assign docsPrefix = "pe/" %} +{% include docs/mqtt-broker/security/authentication/jwt.md %} diff --git a/docs/pe/mqtt-broker/security/authentication/scram.md b/docs/pe/mqtt-broker/security/authentication/scram.md new file mode 100644 index 0000000000..bc405019b3 --- /dev/null +++ b/docs/pe/mqtt-broker/security/authentication/scram.md @@ -0,0 +1,9 @@ +--- +layout: docwithnav-pe-mqtt-broker +title: SCRAM Authentication +description: SCRAM Authentication + +--- + +{% assign docsPrefix = "pe/" %} +{% include docs/mqtt-broker/security/authentication/scram.md %} diff --git a/docs/pe/mqtt-broker/security/authentication/x509.md b/docs/pe/mqtt-broker/security/authentication/x509.md new file mode 100644 index 0000000000..082833f707 --- /dev/null +++ b/docs/pe/mqtt-broker/security/authentication/x509.md @@ -0,0 +1,35 @@ +--- +layout: docwithnav-pe-mqtt-broker +title: X.509 Certificate Chain Authentication +description: X.509 Certificate Chain Authentication + +security-authentication-tls: + 0: + image: /images/pe/mqtt-broker/features/security-authentication-tls-1.png + title: 'Copy TLS credentials ID.' + 1: + image: /images/pe/mqtt-broker/features/security-authentication-tls-2.png + title: 'TLS authentication with "Use certificate CN regex" disabled to match certificate common name by exact match.' + 2: + image: /images/pe/mqtt-broker/features/security-authentication-tls-3.png + title: 'TLS authentication with "Use certificate CN regex" enabled to match certificate common name using a regex pattern.' + +security-authorization-tls: + 0: + image: /images/pe/mqtt-broker/features/security-authorization-tls-1.png + title: 'Examples of rule patterns for allowing all or forbidding all.' + +authentication-provider-control: + 0: + image: /images/pe/mqtt-broker/security/auth-providers/provider-home-switch.png + title: 'Go to the Broker Settings card on the Home page to switch authentication providers.' + 1: + image: /images/pe/mqtt-broker/security/auth-providers/provider-table-switch.png + title: 'On the Authentication > Providers page, use the switch button in the table’s right column to enable or disable providers.' + 2: + image: /images/pe/mqtt-broker/security/auth-providers/x509/x509-overview.png + title: 'Open the Authentication > Providers page, select the X.509 Certificate Chain row, and click the "Edit" button to configure the provider.' +--- + +{% assign docsPrefix = "pe/" %} +{% include docs/mqtt-broker/security/authentication/x509.md %} diff --git a/docs/pe/mqtt-broker/security/domains.md b/docs/pe/mqtt-broker/security/domains.md new file mode 100644 index 0000000000..1279b4c762 --- /dev/null +++ b/docs/pe/mqtt-broker/security/domains.md @@ -0,0 +1,41 @@ +--- +layout: docwithnav-pe-mqtt-broker +title: Managing domain +description: Domain managing through TBMQ + +register-domain: + 0: + image: /images/pe/mqtt-broker/security/adding-new-domain-1.png + title: 'Go to the "OAuth 2.0" page of the "Security" section. On the "Domains" tab click the "plus" icon;' + 1: + image: /images/pe/mqtt-broker/security/adding-new-domain-2.png + title: 'Enter valid domain name in the "Domain name" field and click "Add" button;' + 2: + image: /images/pe/mqtt-broker/security/adding-new-domain-3.png + title: 'You can see your domain name on the "Domains" tab.' + +login-with-domain: + 0: + image: /images/pe/mqtt-broker/security/domain-login-1.png + title: 'Now you can use your domain name to access TBMQ web interface and services. Try to login by entering the chosen domain name in the browser address line.' + +domain-details: + 0: + image: /images/pe/mqtt-broker/security/domain-details-1.png + title: 'To view details about a registered domain, simply click on it to open the domain details dialog. Switch to editing mode by clicking the large orange button;' + 1: + image: /images/pe/mqtt-broker/security/domain-details-2.png + title: 'Make the required modifications. Confirm and save your changes by clicking the "Apply changes" button.' + +delete-domain: + 0: + image: /images/pe/mqtt-broker/security/delete-domain-1.png + title: 'To delete the domain click "Delete" button on the "Domain" tab;' + 1: + image: /images/pe/mqtt-broker/security/delete-domain-2.png + title: 'In the confirmation dialog, click "Yes" if you are sure you want to delete the domain.' + +--- + +{% assign docsPrefix = "pe/" %} +{% include docs/pe/mqtt-broker/domains.md %} \ No newline at end of file diff --git a/docs/pe/mqtt-broker/security/https.md b/docs/pe/mqtt-broker/security/https.md new file mode 100644 index 0000000000..1f6b3d865e --- /dev/null +++ b/docs/pe/mqtt-broker/security/https.md @@ -0,0 +1,9 @@ +--- +layout: docwithnav-pe-mqtt-broker +title: HTTP over SSL +description: Launching TBMQ PE with secure HTTP web interface and REST API. + +--- + +{% assign docsPrefix = "pe/" %} +{% include docs/mqtt-broker/security/https.md %} diff --git a/docs/pe/mqtt-broker/security/listeners.md b/docs/pe/mqtt-broker/security/listeners.md new file mode 100644 index 0000000000..80dc885149 --- /dev/null +++ b/docs/pe/mqtt-broker/security/listeners.md @@ -0,0 +1,23 @@ +--- +layout: docwithnav-pe-mqtt-broker +title: MQTT Listeners +description: MQTT Listeners + +settings-connectivity-settings: + 0: + image: /images/mqtt-broker/user-guide/ui/settings-connectivity-settings-1.png + title: 'The MQTT host is changed to custom IP address.' + 1: + image: /images/mqtt-broker/user-guide/ui/settings-connectivity-settings-2.png + title: 'Check connectivity window uses new host.' + 2: + image: /images/mqtt-broker/user-guide/ui/settings-connectivity-settings-3.png + title: 'The WS host is changed to custom IP address.' + 3: + image: /images/mqtt-broker/user-guide/ui/settings-connectivity-settings-4.png + title: 'WebSocket Credentials window uses new host.' + +--- + +{% assign docsPrefix = "pe/" %} +{% include docs/mqtt-broker/security/listeners.md %} diff --git a/docs/pe/mqtt-broker/security/mqtts.md b/docs/pe/mqtt-broker/security/mqtts.md new file mode 100644 index 0000000000..2db9e1589e --- /dev/null +++ b/docs/pe/mqtt-broker/security/mqtts.md @@ -0,0 +1,9 @@ +--- +layout: docwithnav-pe-mqtt-broker +title: MQTT over SSL +description: Launching TBMQ with secure MQTT protocol to connect your IoT devices and projects. + +--- + +{% assign docsPrefix = "pe/" %} +{% include docs/mqtt-broker/security/mqtts.md %} \ No newline at end of file diff --git a/docs/pe/mqtt-broker/security/oauth-2-support.md b/docs/pe/mqtt-broker/security/oauth-2-support.md new file mode 100644 index 0000000000..a012553205 --- /dev/null +++ b/docs/pe/mqtt-broker/security/oauth-2-support.md @@ -0,0 +1,295 @@ +--- +layout: docwithnav-pe-mqtt-broker +title: OAuth 2.0 +description: OAuth 2.0 + +adding-domain-1: + 0: + image: /images/pe/mqtt-broker/user-guide/oauth-2-support/adding-domain-1.png + title: 'On the "Domains" tab of the "OAuth 2.0" page, click the "plus" icon to add a new domain. Provide your domain name and OAuth 2.0 client. Then, click "Add".' + 1: + image: /images/pe/mqtt-broker/user-guide/oauth-2-support/adding-domain-2.png + title: 'Domain added.' + +editing-domain-1: + 0: + image: /images/pe/mqtt-broker/user-guide/oauth-2-support/managing-domain-1.png + title: 'Click on the domain to view its details. Switch to editing mode by clicking the large orange button;' + 1: + image: /images/pe/mqtt-broker/user-guide/oauth-2-support/managing-domain-2.png + title: 'Make the required modifications. Then confirm and save the changes by clicking the "Apply changes" button.' + +deleting-domain-1: + 0: + image: /images/pe/mqtt-broker/user-guide/oauth-2-support/deleting-domain-1.png + title: 'Click the "trash" icon in the domain's row you wish to remove;' + 1: + image: /images/pe/mqtt-broker/user-guide/oauth-2-support/deleting-domain-2.png + title: 'Confirm the deletion by clicking "Yes".' + +adding-oauth2-client-1: + 0: + image: /images/pe/mqtt-broker/user-guide/oauth-2-support/adding-oauth2-client-1.png + title: 'Navigate to the "OAuth 2.0 clients" tab on the "OAuth 2.0" page. Click the "plus" icon to add a new OAuth 2.0 client;' + 1: + image: /images/pe/mqtt-broker/user-guide/oauth-2-support/adding-oauth2-client-2.png + title: 'Enter a descriptive title for the client, and select the "Google" from the dropdown menu as the authentication provider. Provide the Client ID and Client Secret obtained from your authentication provider. Configure advanced settings as necessary. Then, click "Add".' + 2: + image: /images/pe/mqtt-broker/user-guide/oauth-2-support/adding-oauth2-client-3.png + title: 'New OAuth 2.0 client added.' + +editing-oauth2-client-1: + 0: + image: /images/pe/mqtt-broker/user-guide/oauth-2-support/managing-oauth2-client-1.png + title: 'Click on the OAuth 2.0 client to view its details. Switch to editing mode by clicking the large orange button;' + 1: + image: /images/pe/mqtt-broker/user-guide/oauth-2-support/managing-oauth2-client-2.png + title: 'Make the required modifications. Then confirm and save the changes by clicking the "Apply changes" button.' + +deleting-oauth2-client-1: + 0: + image: /images/pe/mqtt-broker/user-guide/oauth-2-support/deleting-oauth2-client-1.png + title: 'Click the "trash" icon in the client's row you wish to remove;' + 1: + image: /images/pe/mqtt-broker/user-guide/oauth-2-support/deleting-oauth2-client-2.png + title: 'Confirm the deletion by clicking "Yes".' + +google-credentials-for-oauth-1: + 0: + image: /images/pe/mqtt-broker/user-guide/oauth-2-support/google-credentials-for-oauth-1.png + title: 'Go to the "Credentials" page in the left menu and select "OAuth client ID" from the "Create credentials" dropdown menu;' + 1: + image: /images/pe/mqtt-broker/user-guide/oauth-2-support/google-credentials-for-oauth-2.png + title: 'Enter a OAuth client name, and add the TBMQ redirect URI, to the "Authorized Redirect URIs" section. Then, click "Create";' + 2: + image: /images/pe/mqtt-broker/user-guide/oauth-2-support/google-credentials-for-oauth-3.png + title: 'OAuth client created. You now have credentials consisting of a Client ID and a Client secret;' + +google-configuration-of-thingsboard-google-1: + 0: + image: /images/pe/mqtt-broker/user-guide/oauth-2-support/google-configuration-of-thingsboard-1.png + title: 'Login to your TBMQ instance. Go to the "OAuth 2.0" page of the "Security" section. While on the "Domains" tab, click the "plus" icon;' + 1: + image: /images/pe/mqtt-broker/user-guide/oauth-2-support/google-configuration-of-thingsboard-2.png + title: 'Enter your domain name or IP address of your TBMQ instance. Click "Create new" in the "OAuth 2.0 clients" section to add a new one.' + +google-configuration-of-thingsboard-google-2: + 0: + image: /images/pe/mqtt-broker/user-guide/oauth-2-support/google-configuration-of-thingsboard-3.png + title: 'Enter "Google" as the title. The provider should be set to "Google". If necessary, specify the allowed platforms, or leave all. Enter the "Client ID" and "Client secret" from the Google API Console. Then, expand the "Advanced settings" menu;' + 1: + image: /images/pe/mqtt-broker/user-guide/oauth-2-support/google-configuration-of-thingsboard-4.png + title: 'Let's make the settings for the "General" block. Select "POST" as the client authentication method. Turn on the "Allow user creation" option. Add to the scope field: "email", "openid", and "profile";' + +google-configuration-of-thingsboard-google-3: + 0: + image: /images/pe/mqtt-broker/user-guide/oauth-2-support/google-configuration-of-thingsboard-5.png + title: 'Go to the "Mapper" block. Leave the mapper type "BASIC". If necessary, change the user role or leave as it is. Click "Add";' + +google-configuration-of-thingsboard-google-4: + 0: + image: /images/pe/mqtt-broker/user-guide/oauth-2-support/google-configuration-of-thingsboard-6.png + title: 'The OAuth client is added successfully. Click "Add" again to confirm the addition of the domain;' + 1: + image: /images/pe/mqtt-broker/user-guide/oauth-2-support/google-configuration-of-thingsboard-7.png + title: 'A new domain has been added.' + +login-with-google-1: + 0: + image: /images/pe/mqtt-broker/user-guide/oauth-2-support/login-with-google-1.png + title: 'Navigate to the TBMQ login screen. We will see an additional "Login with Google" option. Click this button and login using your Google account;' + +login-with-google-2: + 0: + image: /images/pe/mqtt-broker/user-guide/oauth-2-support/login-oauth-user.png + title: 'Go to the "Users" page. There you should find a new user that you have just logged in.' + +auth0-credentials-1: + 0: + image: /images/pe/mqtt-broker/user-guide/oauth-2-support/oauth0-credentials-1.png + title: 'To apply the configurations properly, we first need to obtain OAuth 2.0 credentials. Therefore, we first go to the OAuth0 Management Console. Open the "Applications" page, and click "+ Create Application" button;' + 1: + image: /images/pe/mqtt-broker/user-guide/oauth-2-support/oauth0-credentials-2.png + title: 'Name your application "TBMQ", and choose the application type - "Regular Web Applications";' + 2: + image: /images/pe/mqtt-broker/user-guide/oauth-2-support/oauth0-credentials-3.png + title: 'Afters, you need to choose the technology being used. Please, choose the "Java Spring Boot" technology;' + 3: + image: /images/pe/mqtt-broker/user-guide/oauth-2-support/oauth0-credentials-4.png + title: 'Once your application is created, you are redirected to the application details page. Navigate to the "Settings" tab to find the Client ID and Client Secret;' + 4: + image: /images/pe/mqtt-broker/user-guide/oauth-2-support/oauth0-credentials-5.png + title: 'As well, please update your allowed Callback URLs;' + 5: + image: /images/pe/mqtt-broker/user-guide/oauth-2-support/oauth0-credentials-6.png + title: 'In the "Advanced Settings" section you will be able to find all the required URLs (endpoints) for OAuth 2.0 configuration. Click "Save Changes" button.' + +oauth0-configuration-of-thingsboard-1: + 0: + image: /images/pe/mqtt-broker/user-guide/oauth-2-support/google-configuration-of-thingsboard-1.png + title: 'Login to your TBMQ instance. Go to the "OAuth 2.0" page of the "Security" section. While on the "Domains" tab, click the "plus" icon;' + 1: + image: /images/pe/mqtt-broker/user-guide/oauth-2-support/google-configuration-of-thingsboard-2.png + title: 'Enter your domain name of your TBMQ instance. Click "Create new" in the "OAuth 2.0 clients" section to add a new one.' + +oauth0-configuration-of-thingsboard-2: + 0: + image: /images/pe/mqtt-broker/user-guide/oauth-2-support/oauth0-configuration-of-thingsboard-3.png + title: 'Enter "OAuth0" as the title for the client. Select "Custom" as the provider. Now enter the "Client ID" and "Client secret" obtained from the OAuth0 Management Console. In the "General" block of the "Advanced settings" section, fill in all the necessary URLs. The client authentication method should be set to "POST". Enter "OAuth0" as the provider label. Add the following scopes in the scope field: "openid", "email", "profile";' + +oauth0-configuration-of-thingsboard-3: + 0: + image: /images/pe/mqtt-broker/user-guide/oauth-2-support/oauth0-configuration-of-thingsboard-4.png + title: 'Proceed to the "Mapper" block. Leave the mapper type "BASIC". If necessary, change the user role or leave as it is. Click "Add" to confirm adding the OAuth 2 client.' + +oauth0-configuration-of-thingsboard-4: + 0: + image: /images/pe/mqtt-broker/user-guide/oauth-2-support/oauth0-configuration-of-thingsboard-5.png + title: 'The OAuth0 client has been successfully added. Click "Add" again to confirm the addition of the domain.' + 1: + image: /images/pe/mqtt-broker/user-guide/oauth-2-support/oauth0-configuration-of-thingsboard-6.png + title: 'A new domain has been added.' + +login-with-oauth0-1: + 0: + image: /images/pe/mqtt-broker/user-guide/oauth-2-support/login-with-oauth0-1.png + title: 'Navigate to the login screen. You will find Auth0 login method. Click on the "Login with Auth0" button and use your Auth0 credentials to log in.' + +login-with-oauth0-2: + 0: + image: /images/pe/mqtt-broker/user-guide/oauth-2-support/login-oauth-user.png + title: 'Go to the "Users" page. There you should find a new user that you have just logged in.' + +terminal-start-keycloak: + 0: + image: /images/user-guide/oauth-2-support/keycloak/terminal-start-keycloak-1.png + title: 'Run this command to start Keycloak on local the port 8081 and create an initial admin user with the username admin and password admin.' + 1: + image: /images/user-guide/oauth-2-support/keycloak/terminal-start-keycloak-2.png + title: '' + +log-in-to-admin-console: + 0: + image: /images/user-guide/oauth-2-support/keycloak/log-in-to-admin-console-1.png + title: 'Log in to the Keycloak Admin Console using your username and password.' + 1: + image: /images/user-guide/oauth-2-support/keycloak/log-in-to-admin-console-2.png + title: '' + +create-new-realm: + 0: + image: /images/user-guide/oauth-2-support/keycloak/create-new-realm-1.png + title: 'Click "Keycloak" next to the master realm, then click "Create realm" button;' + 1: + image: /images/user-guide/oauth-2-support/keycloak/create-new-realm-2.png + title: 'Enter "ThingsBoard" in the realm name field, and click "Create" button;' + 2: + image: /images/user-guide/oauth-2-support/keycloak/create-new-realm-3.png + title: 'The new realm has been created.' + +create-client: + 0: + image: /images/user-guide/oauth-2-support/keycloak/create-client-1.png + title: 'Go to the "Clients" page in the left-hand menu, and click the "Create client" button;' + 1: + image: /images/user-guide/oauth-2-support/keycloak/create-client-2.png + title: 'Enter "thingsboard" as the client ID. Leave the client type as "OpenID Connect". Click "Next";' + 2: + image: /images/user-guide/oauth-2-support/keycloak/create-client-3.png + title: 'Turn on "Client authentication" option. Confirm that "Standard flow" is enabled. Click "Next";' + 3: + image: /images/user-guide/oauth-2-support/keycloak/create-client-4.png + title: 'In the "Login settings" section, add the ThingsBoard redirect URI to the "Authorized Redirect URIs" section. Then, click "Save";' + 4: + image: /images/user-guide/oauth-2-support/keycloak/create-client-5.png + title: 'Client created successfully.' + +client-id-and-secret: + 0: + image: /images/user-guide/oauth-2-support/keycloak/client-id-and-secret-1.png + title: 'You can find the "Client ID" on the "Settings" tab;' + 1: + image: /images/user-guide/oauth-2-support/keycloak/client-id-and-secret-2.png + title: 'The "Client Secret" is located on the "Credentials" tab.' + +endpoint-configuration: + 0: + image: /images/user-guide/oauth-2-support/keycloak/openid-endpoint-configuration-1.png + title: 'Go to the "Realm settings" page in the left-hand menu. Scroll down and locate the link to "OpenID Endpoint Configuration", then click on it;' + 1: + image: /images/user-guide/oauth-2-support/keycloak/openid-endpoint-configuration-2.png + title: 'A new window with OpenID Endpoint Configuration will open. Check the "Pretty-print" option to make the data view more user-friendly. Here you found "Access token URI," "Authorization URI," "JSON Web Key URI," and "User info URI," which are necessary for configuring the OAuth 2.0 client in ThingsBoard.' + +create-user: + 0: + image: /images/user-guide/oauth-2-support/keycloak/create-user-1.png + title: 'Go to the "Users" page in the left-hand menu. Click "Create new user";' + 1: + image: /images/user-guide/oauth-2-support/keycloak/create-user-2.png + title: 'Enter the username and email address in the form. First name and last name are optional. Then, click "Create";' + 2: + image: /images/user-guide/oauth-2-support/keycloak/create-user-3.png + title: 'The user has been created;' + +create-password: + 0: + image: /images/user-guide/oauth-2-support/keycloak/create-user-4.png + title: 'Navigate to the "Credentials" tab. Click "Set password";' + 1: + image: /images/user-guide/oauth-2-support/keycloak/create-user-5.png + title: 'Fill in the "Set password" form with a password. Toggle "Temporary" to "Off" so that the user does not need to update this password at the first login. Click "Save";' + 2: + image: /images/user-guide/oauth-2-support/keycloak/create-user-6.png + title: 'Confirm the set password by clicking the "Save password";' + 3: + image: /images/user-guide/oauth-2-support/keycloak/create-user-7.png + title: 'The password has been successfully.' + +keycloak-add-thingsboard-oauth-client-1: + 0: + image: /images/pe/mqtt-broker/user-guide/oauth-2-support/adding-oauth2-client-1.png + title: 'Login to your TBMQ instance. Navigate to the "OAuth 2.0" in the "Security" menu section, open "OAuth 2.0 clients" tab, and click "plus" icon to add a new client;' + 1: + image: /images/pe/mqtt-broker/user-guide/oauth-2-support/keycloak-configuration-of-thingsboard-2.png + title: 'Enter "Keycloak" as the title. Select the "Custom" from the dropdown menu as the authentication provider. Now enter the "Client ID" and "Client secret" using the values retrieved from the Keycloak console. In the "General" block of the "Advanced settings" section, fill in all the necessary URLs. The client authentication method should be set to "POST". Enter "Keycloak" as the provider label. Add the following scopes in the scope field: "openid", "email", "profile";' + +keycloak-add-thingsboard-oauth-client-2: + 0: + image: /images/pe/mqtt-broker/user-guide/oauth-2-support/keycloak-configuration-of-thingsboard-3.png + title: 'Go to the "Mapper" block. Leave the mapper type "BASIC". If necessary, change the user role or leave as it is. Click "Add" to confirm adding the OAuth 2 client;' + 1: + image: /images/pe/mqtt-broker/user-guide/oauth-2-support/keycloak-configuration-of-thingsboard-4.png + title: 'A new OAuth 2.0 client has been added.' + +keycloak-add-domain: + 0: + image: /images/pe/mqtt-broker/user-guide/oauth-2-support/keycloak-adding-domain-1.png + title: 'Navigate to the "Domains" tab, and click "plus" icon. Enter your domain name or IP address of your TBMQ instance. Specify "Keycloak" as the OAuth 2.0 client. Click "Add" again to confirm the addition of the domain;' + 1: + image: /images/pe/mqtt-broker/user-guide/oauth-2-support/keycloak-adding-domain-2.png + title: 'A new domain has been added.' + +login-with-keycloak-1: + 0: + image: /images/pe/mqtt-broker/user-guide/oauth-2-support/login-with-keycloak-1.png + title: 'Go to the TBMQ login screen. You will see an additional option, "Login with Keycloak". Click this button and login using your Keycloak credentials;' + +login-with-keycloak-2: + 0: + image: /images/pe/mqtt-broker/user-guide/oauth-2-support/login-oauth-user.png + title: 'Go to the "Users" page. There you should find a new user that you have just logged in.' + +mapper-basic-1: + 0: + image: /images/pe/mqtt-broker/user-guide/oauth-2-support/mapper-basic-1.png + title: 'To use a basic mapper, set mapper type "Basic".' + +mapper-custom-1: + 0: + image: /images/pe/mqtt-broker/user-guide/oauth-2-support/mapper-custom-1.png + title: 'To use the custom mapper, set mapper type "Custom".' + +--- + +{% assign docsPrefix = "pe/" %} +{% include docs/pe/mqtt-broker/oauth-2-support.md %} \ No newline at end of file diff --git a/docs/pe/mqtt-broker/security/overview.md b/docs/pe/mqtt-broker/security/overview.md new file mode 100644 index 0000000000..d17cdd5f8d --- /dev/null +++ b/docs/pe/mqtt-broker/security/overview.md @@ -0,0 +1,22 @@ +--- +layout: docwithnav-pe-mqtt-broker +title: Security Overview +description: Security Overview + +authentication-provider-control: + 0: + image: /images/pe/mqtt-broker/security/auth-providers/provider-home-switch.png + title: 'Go to the Broker Settings card on the Home page to switch authentication providers.' + 1: + image: /images/pe/mqtt-broker/security/auth-providers/provider-table-switch.png + title: 'On the Authentication > Providers page, use the switch button in the table’s right column to enable or disable providers.' + +authentication-settings: + 0: + image: /images/pe/mqtt-broker/security/auth-providers/authentication-settings.png + title: 'Navigate to the Settings > Security page to check the MQTT Authentication Settings.' + +--- + +{% assign docsPrefix = "pe/" %} +{% include docs/mqtt-broker/security/overview.md %} diff --git a/docs/pe/mqtt-broker/security/rbac.md b/docs/pe/mqtt-broker/security/rbac.md new file mode 100644 index 0000000000..799d0eee61 --- /dev/null +++ b/docs/pe/mqtt-broker/security/rbac.md @@ -0,0 +1,9 @@ +--- +layout: docwithnav-pe-mqtt-broker +title: Role-Based Access Control (RBAC) +description: Role-Based Access Control + +--- + +{% assign docsPrefix = "pe/" %} +{% include docs/pe/mqtt-broker/rbac.md %} \ No newline at end of file diff --git a/docs/pe/mqtt-broker/subscription.md b/docs/pe/mqtt-broker/subscription.md new file mode 100644 index 0000000000..cced9c5ce5 --- /dev/null +++ b/docs/pe/mqtt-broker/subscription.md @@ -0,0 +1,9 @@ +--- +layout: docwithnav-pe-mqtt-broker +title: TBMQ Private Cloud plans definition +description: Features and advantages of TBMQ Private Cloud payment model + +--- + +{% assign docsPrefix = "pe/" %} +{% include docs/mqtt-broker/subscription.md %} \ No newline at end of file diff --git a/docs/pe/mqtt-broker/troubleshooting.md b/docs/pe/mqtt-broker/troubleshooting.md new file mode 100644 index 0000000000..9d42ea5849 --- /dev/null +++ b/docs/pe/mqtt-broker/troubleshooting.md @@ -0,0 +1,9 @@ +--- +layout: docwithnav-pe-mqtt-broker +title: Troubleshooting +description: TBMQ troubleshooting guide + +--- + +{% assign docsPrefix = "pe/" %} +{% include docs/mqtt-broker/troubleshooting.md %} diff --git a/docs/pe/mqtt-broker/user-guide/backpressure.md b/docs/pe/mqtt-broker/user-guide/backpressure.md new file mode 100644 index 0000000000..c37d387dc2 --- /dev/null +++ b/docs/pe/mqtt-broker/user-guide/backpressure.md @@ -0,0 +1,9 @@ +--- +layout: docwithnav-pe-mqtt-broker +title: Backpressure +description: TBMQ Backpressure guide + +--- + +{% assign docsPrefix = "pe/" %} +{% include docs/mqtt-broker/user-guide/backpressure.md %} diff --git a/docs/pe/mqtt-broker/user-guide/integrations/how-to-connect-thingsboard-to-tbmq.md b/docs/pe/mqtt-broker/user-guide/integrations/how-to-connect-thingsboard-to-tbmq.md new file mode 100644 index 0000000000..bf4c1d50fe --- /dev/null +++ b/docs/pe/mqtt-broker/user-guide/integrations/how-to-connect-thingsboard-to-tbmq.md @@ -0,0 +1,67 @@ +--- +layout: docwithnav-pe-mqtt-broker +assignees: +- stitenko +title: Integration with ThingsBoard +description: Integration guide of TBMQ with ThingsBoard + +create-client-credentials: + 0: + image: /images/pe/mqtt-broker/user-guide/integrations/how-to-connect-tbqm-to-thingsboard/tbmq-add-client-credentials-1-pe.png + title: 'Navigate to "Credentials" tab, click on the "plus" icon in the top right corner of the table;' + 1: + image: /images/pe/mqtt-broker/user-guide/integrations/how-to-connect-tbqm-to-thingsboard/tbmq-add-client-credentials-2-pe.png + title: 'Input client credentials name, select client type. Enable "Basic" authentication type.' + 2: + image: /images/pe/mqtt-broker/user-guide/integrations/how-to-connect-tbqm-to-thingsboard/tbmq-add-client-credentials-3-pe.png + title: 'Input "Username" and "Password" with chosen values. For example, use `tb-pe` value for Username and `secret` for Password fields. Click "Add" to save credentials.' + 3: + image: /images/pe/mqtt-broker/user-guide/integrations/how-to-connect-tbqm-to-thingsboard/tbmq-add-client-credentials-4-pe.png + title: 'New client credential is created.' + +create-uplink-converter: + 0: + image: /images/mqtt-broker/user-guide/integrations/how-to-connect-tbqm-to-thingsboard/tbmq-uplink-converter-tbel-1-pe.png + +create-integration: + 0: + image: /images/mqtt-broker/user-guide/integrations/how-to-connect-tbqm-to-thingsboard/tbmq-integration-add-integration-1-pe.png + title: 'Go to the "Integrations center" section -> "Integrations" page and click "plus" icon to add a new integration. Name it "MQTT Integration", select type "MQTT";' + 1: + image: /images/mqtt-broker/user-guide/integrations/how-to-connect-tbqm-to-thingsboard/tbmq-integration-add-integration-2-pe.png + title: 'Add the recently created uplink converter;' + 2: + image: /images/mqtt-broker/user-guide/integrations/how-to-connect-tbqm-to-thingsboard/tbmq-integration-add-integration-3-pe.png + title: 'Leave the "Downlink data converter" field empty. Click "Skip";' + 3: + image: /images/mqtt-broker/user-guide/integrations/how-to-connect-tbqm-to-thingsboard/tbmq-integration-add-integration-4-pe.png + title: 'Specify host and port of TBMQ instance. Select "Basic" credentials type and specify TBMQ client credentials. Add a topic filter: "tb/mqtt-integration-tutorial/sensors/+/temperature" and select an MQTT QoS level higher than 0;' + 4: + image: /images/mqtt-broker/user-guide/integrations/how-to-connect-tbqm-to-thingsboard/tbmq-integration-add-integration-5-pe.png + title: 'Now go to the advanced settings. Uncheck the "Clean session" parameter and specify client ID as `tbpeintegration`;' + 5: + image: /images/mqtt-broker/user-guide/integrations/how-to-connect-tbqm-to-thingsboard/tbmq-integration-add-integration-6-pe.png + title: '[Optional] Click on Check connection button to check connection to TBMQ. Click Add button to create the integration.' + +successful-connection-tbmq-to-thingsboard: + 0: + image: /images/pe/mqtt-broker/user-guide/integrations/how-to-connect-tbqm-to-thingsboard/tbmq-sessions-1-pe.png + title: 'Go to the "Sessions" page in the TBMQ UI. Upon successful establishment of the connection ThingsBoard to TBMQ, we will see a new session and its status - "Connected".' + +tbmq-home-page: + 0: + image: /images/pe/mqtt-broker/user-guide/integrations/how-to-connect-tbqm-to-thingsboard/tbmq-home-page-1-pe.png + title: 'On the "Topics" page you will see a name of Kafka topic (which corresponds to the client ID specified in the MQTT integration), number of partitions, replication factor and size of the topic.' + +tbmq-create-device: + 0: + image: /images/mqtt-broker/user-guide/integrations/how-to-connect-tbqm-to-thingsboard/tbmq-create-device-1-pe.png + +tbmq-integration-events: + 0: + image: /images/mqtt-broker/user-guide/integrations/how-to-connect-tbqm-to-thingsboard/tbmq-integration-events-1-pe.png + +--- + +{% assign docsPrefix = "pe/" %} +{% include /docs/mqtt-broker/user-guide/integrations/how-to-connect-thingsboard-to-tbmq.md %} diff --git a/docs/pe/mqtt-broker/user-guide/keep-alive.md b/docs/pe/mqtt-broker/user-guide/keep-alive.md new file mode 100644 index 0000000000..8b504e48cf --- /dev/null +++ b/docs/pe/mqtt-broker/user-guide/keep-alive.md @@ -0,0 +1,9 @@ +--- +layout: docwithnav-pe-mqtt-broker +title: Keep Alive +description: TBMQ Keep Alive guide + +--- + +{% assign docsPrefix = "pe/" %} +{% include docs/mqtt-broker/user-guide/keep-alive.md %} diff --git a/docs/pe/mqtt-broker/user-guide/last-will.md b/docs/pe/mqtt-broker/user-guide/last-will.md new file mode 100644 index 0000000000..9042e92abb --- /dev/null +++ b/docs/pe/mqtt-broker/user-guide/last-will.md @@ -0,0 +1,47 @@ +--- +layout: docwithnav-pe-mqtt-broker +title: Last Will and Testament +description: TBMQ Last Will and Testament guide + +ws-connection-add-camera: + 0: + image: /images/pe/mqtt-broker/user-guide/ui/ws-connection-add-camera-1.png + title: 'Go to the WebSocket Client page and click the Select Connection, represented by the expand more icon.' + 1: + image: /images/pe/mqtt-broker/user-guide/ui/ws-connection-add-camera-2.png + title: 'Click on the button "Add new connection".' + 2: + image: /images/pe/mqtt-broker/user-guide/ui/ws-connection-add-camera-3.png + title: 'Set name as Security Camera. Click on the Last Will section.' + 3: + image: /images/pe/mqtt-broker/user-guide/ui/ws-connection-add-camera-4.png + title: 'Set Last Will topic ("sensors/lastwill"), payload type ("String"), payload message ("OFF"). Click "Connect".' + +ws-connection-add-hub: + 0: + image: /images/pe/mqtt-broker/user-guide/ui/ws-connection-add-hub-1.png + title: 'Open again the Select Connection panel and click on the button "Add new connection".' + 1: + image: /images/pe/mqtt-broker/user-guide/ui/ws-connection-add-hub-2.png + title: 'Set name as Security Hub.' + 2: + image: /images/pe/mqtt-broker/user-guide/ui/ws-connection-add-hub-3.png + title: 'To add a new subscription click on the icon button "Add Subscription".' + 3: + image: /images/pe/mqtt-broker/user-guide/ui/ws-connection-add-hub-4.png + title: 'Click "Add" to add subscription with default settings.' + +ws-connection-ungraceful-disconnect: + 0: + image: /images/pe/mqtt-broker/user-guide/ui/ws-connection-ungraceful-disconnect-1.png + title: 'Click on Select Connection icon and open Security Camera session details.' + 1: + image: /images/pe/mqtt-broker/user-guide/ui/ws-connection-ungraceful-disconnect-2.png + title: 'Click Disconnect client.' + 2: + image: /images/pe/mqtt-broker/user-guide/ui/ws-connection-ungraceful-disconnect-3.png + title: 'The client Security Hub should receive the Last Will message from the client Security Camera.' + +--- + +{% include docs/mqtt-broker/user-guide/last-will.md %} diff --git a/docs/pe/mqtt-broker/user-guide/mqtt-broker.md b/docs/pe/mqtt-broker/user-guide/mqtt-broker.md new file mode 100644 index 0000000000..72bb4c18ed --- /dev/null +++ b/docs/pe/mqtt-broker/user-guide/mqtt-broker.md @@ -0,0 +1,9 @@ +--- +layout: docwithnav-pe-mqtt-broker +title: MQTT broker +description: What is MQTT broker? Learn how the MQTT protocol works, what MQTT server does, and how clients use topics, and connections for reliable IoT communication + +--- + +{% assign docsPrefix = "pe/" %} +{% include docs/mqtt-broker/user-guide/mqtt-broker.md %} diff --git a/docs/pe/mqtt-broker/user-guide/mqtt-client-type.md b/docs/pe/mqtt-broker/user-guide/mqtt-client-type.md new file mode 100644 index 0000000000..1480202f4f --- /dev/null +++ b/docs/pe/mqtt-broker/user-guide/mqtt-client-type.md @@ -0,0 +1,14 @@ +--- +layout: docwithnav-pe-mqtt-broker +title: TBMQ Client Type +description: TBMQ MQTT Client types overview + +mqtt-client-type: + 0: + image: /images/pe/mqtt-broker/features/application-client-warning.png + title: 'Application client warning for non-persistent client' + +--- + +{% assign docsPrefix = "pe/" %} +{% include docs/mqtt-broker/user-guide/mqtt-client-type.md %} diff --git a/docs/pe/mqtt-broker/user-guide/mqtt-over-ws.md b/docs/pe/mqtt-broker/user-guide/mqtt-over-ws.md new file mode 100644 index 0000000000..f89a332e30 --- /dev/null +++ b/docs/pe/mqtt-broker/user-guide/mqtt-over-ws.md @@ -0,0 +1,9 @@ +--- +layout: docwithnav-pe-mqtt-broker +title: MQTT over WebSocket +description: TBMQ MQTT Over WebSocket guide + +--- + +{% assign docsPrefix = "pe/" %} +{% include docs/mqtt-broker/user-guide/mqtt-over-ws.md %} diff --git a/docs/pe/mqtt-broker/user-guide/mqtt-protocol.md b/docs/pe/mqtt-broker/user-guide/mqtt-protocol.md new file mode 100644 index 0000000000..64d8db6874 --- /dev/null +++ b/docs/pe/mqtt-broker/user-guide/mqtt-protocol.md @@ -0,0 +1,9 @@ +--- +layout: docwithnav-pe-mqtt-broker +title: MQTT protocol +description: Description of MQTT protocol + +--- + +{% assign docsPrefix = "pe/" %} +{% include docs/mqtt-broker/user-guide/mqtt-protocol.md %} diff --git a/docs/pe/mqtt-broker/user-guide/qos.md b/docs/pe/mqtt-broker/user-guide/qos.md new file mode 100644 index 0000000000..c409cbfe82 --- /dev/null +++ b/docs/pe/mqtt-broker/user-guide/qos.md @@ -0,0 +1,9 @@ +--- +layout: docwithnav-pe-mqtt-broker +title: Quality of Service +description: TBMQ QoS guide + +--- + +{% assign docsPrefix = "pe/" %} +{% include docs/mqtt-broker/user-guide/qos.md %} diff --git a/docs/pe/mqtt-broker/user-guide/retained-messages.md b/docs/pe/mqtt-broker/user-guide/retained-messages.md new file mode 100644 index 0000000000..391bedf079 --- /dev/null +++ b/docs/pe/mqtt-broker/user-guide/retained-messages.md @@ -0,0 +1,36 @@ +--- +layout: docwithnav-pe-mqtt-broker +title: Retained Messages +description: TBMQ Retained Messages feature + +details-retained-messages: + 0: + image: /images/pe/mqtt-broker/user-guide/ui/details-retained-messages-1.png + title: 'Navigate to the "Retained Messages" page.' + 1: + image: /images/pe/mqtt-broker/user-guide/ui/details-retained-messages-2.png + title: 'You can use the advanced filter feature to find the retained messages.' + 2: + image: /images/pe/mqtt-broker/user-guide/ui/details-retained-messages-3.png + title: 'Click on the button "Payload", represented by icon "{}".' + 3: + image: /images/pe/mqtt-broker/user-guide/ui/details-retained-messages-4.png + title: 'Click on the button "User Properties", represented by icon "[]".' + +delete-retained-messages: + 0: + image: /images/pe/mqtt-broker/user-guide/ui/delete-retained-messages-1.png + title: 'Delete single. Click on the icon "Delete retained message" and confirm action.' + 1: + image: /images/pe/mqtt-broker/user-guide/ui/delete-retained-messages-2.png + title: 'Delete multiple. Select messages you want to delete and click on the "Delete" icon in the top right corner.' + +clear-empty-retained-messages: + 0: + image: /images/pe/mqtt-broker/user-guide/ui/clear-empty-retained-messages-1.png + title: 'Click on the button "Clear empty retained messages nodes" in the top right corner. To confirm click on the button "Yes".' + +--- + +{% assign docsPrefix = "pe/" %} +{% include docs/mqtt-broker/user-guide/retained-messages.md %} diff --git a/docs/pe/mqtt-broker/user-guide/shared-subscriptions.md b/docs/pe/mqtt-broker/user-guide/shared-subscriptions.md new file mode 100644 index 0000000000..525e4aba8d --- /dev/null +++ b/docs/pe/mqtt-broker/user-guide/shared-subscriptions.md @@ -0,0 +1,19 @@ +--- +layout: docwithnav-pe-mqtt-broker +title: Shared Subscriptions +description: TBMQ Shared Subscriptions feature overview + +shared-subscription-group: + 0: + image: /images/pe/mqtt-broker/user-guide/shared-sub-group.png + title: 'Shared Subscription group' + +shared-subscription-groups: + 0: + image: /images/pe/mqtt-broker/user-guide/shared-sub-groups.png + title: 'Similar Shared Subscription groups with different client types' + +--- + +{% assign docsPrefix = "pe/" %} +{% include docs/mqtt-broker/user-guide/shared-subscriptions.md %} \ No newline at end of file diff --git a/docs/pe/mqtt-broker/user-guide/topics.md b/docs/pe/mqtt-broker/user-guide/topics.md new file mode 100644 index 0000000000..10d6b3232b --- /dev/null +++ b/docs/pe/mqtt-broker/user-guide/topics.md @@ -0,0 +1,9 @@ +--- +layout: docwithnav-pe-mqtt-broker +title: MQTT Topics & Wildcards +description: TBMQ Topics guide + +--- + +{% assign docsPrefix = "pe/" %} +{% include docs/mqtt-broker/user-guide/topics.md %} diff --git a/docs/pe/mqtt-broker/user-guide/ui/mail-server.md b/docs/pe/mqtt-broker/user-guide/ui/mail-server.md new file mode 100644 index 0000000000..f7726aca0b --- /dev/null +++ b/docs/pe/mqtt-broker/user-guide/ui/mail-server.md @@ -0,0 +1,9 @@ +--- +layout: docwithnav-pe-mqtt-broker +title: Mail Server +description: TBMQ Mail Server + +--- + +{% assign docsPrefix = "pe/" %} +{% include docs/mqtt-broker/user-guide/ui/mail-server.md %} diff --git a/docs/pe/mqtt-broker/user-guide/ui/monitoring.md b/docs/pe/mqtt-broker/user-guide/ui/monitoring.md new file mode 100644 index 0000000000..3c842793c2 --- /dev/null +++ b/docs/pe/mqtt-broker/user-guide/ui/monitoring.md @@ -0,0 +1,9 @@ +--- +layout: docwithnav-pe-mqtt-broker +title: Monitoring +description: TBMQ Monitoring Tools + +--- + +{% assign docsPrefix = "pe/" %} +{% include docs/mqtt-broker/user-guide/ui/monitoring.md %} diff --git a/docs/pe/mqtt-broker/user-guide/ui/mqtt-client-credentials.md b/docs/pe/mqtt-broker/user-guide/ui/mqtt-client-credentials.md new file mode 100644 index 0000000000..f19cb3a7f5 --- /dev/null +++ b/docs/pe/mqtt-broker/user-guide/ui/mqtt-client-credentials.md @@ -0,0 +1,58 @@ +--- +layout: docwithnav-pe-mqtt-broker +title: MQTT Client Credentials +description: UI MQTT Client Credentials + +add-client-credentials: + 0: + image: /images/pe/mqtt-broker/user-guide/ui/add-client-credentials-1.png + title: 'Go to the Credentials page and click the Add Client Credentials button, represented by a "plus" icon.' + 1: + image: /images/pe/mqtt-broker/user-guide/ui/add-client-credentials-2.png + title: 'Fill in the Name, Credentials Type.' + 2: + image: /images/pe/mqtt-broker/user-guide/ui/add-client-credentials-3.png + title: 'Fill in the Authentication settings.' + 3: + image: /images/pe/mqtt-broker/user-guide/ui/add-client-credentials-4.png + title: 'Set Authorization rules.' + +change-password-basic-credentials: + 0: + image: /images/pe/mqtt-broker/user-guide/ui/change-password-1.png + title: 'Go to the Credentials page, click on the corresponding row and click the Edit button.' + 1: + image: /images/pe/mqtt-broker/user-guide/ui/change-password-2.png + title: 'Click the Change password button.' + 2: + image: /images/pe/mqtt-broker/user-guide/ui/change-password-3.png + title: 'Input your current password and set a new one. Click the Change password button' + +delete-client-credentials: + 0: + image: /images/pe/mqtt-broker/user-guide/ui/delete-credentials-1.png + title: 'Delete single. Click on the icon "Delete".' + 1: + image: /images/pe/mqtt-broker/user-guide/ui/delete-credentials-2.png + title: 'Delete mulptiple. Click on the checkboxes and confirm action by clicking on the button "Delete" in the top right corner.' + +check-connectivity: + 0: + image: /images/pe/mqtt-broker/user-guide/ui/check-connectivity-1.png + title: 'Click on the button "Check connectivity" of the Basic client credentials.' + 1: + image: /images/pe/mqtt-broker/user-guide/ui/check-connectivity-2.png + title: 'Select your operating system, install required tools, and copy commands.' + +security-authentication-tls: + 1: + image: /images/pe/mqtt-broker/features/security-authentication-tls-2.png + title: 'TLS authentication with "Use certificate CN regex" disabled to match certificate common name by exact match.' + 2: + image: /images/pe/mqtt-broker/features/security-authentication-tls-3.png + title: 'TLS authentication with "Use certificate CN regex" enabled to match certificate common name using a regex pattern.' + +--- + +{% assign docsPrefix = "pe/" %} +{% include docs/mqtt-broker/user-guide/ui/mqtt-client-credentials.md %} diff --git a/docs/pe/mqtt-broker/user-guide/ui/sessions.md b/docs/pe/mqtt-broker/user-guide/ui/sessions.md new file mode 100644 index 0000000000..bc4ab89dab --- /dev/null +++ b/docs/pe/mqtt-broker/user-guide/ui/sessions.md @@ -0,0 +1,33 @@ +--- +layout: docwithnav-pe-mqtt-broker +title: Sessions +description: Sessions management + +sessions-details: + 0: + image: /images/pe/mqtt-broker/user-guide/ui/session-details-1.png + title: 'Navigate to the Sessions page. Then click on the row of the table.' + 1: + image: /images/pe/mqtt-broker/user-guide/ui/session-disconnect-1.png + title: 'To disconnect client, click on the button "Disconnect client". Note, that only connected clients can be disconnected.' + 2: + image: /images/pe/mqtt-broker/user-guide/ui/session-remove-1.png + title: 'To delete client session click on the button "Remove session". Note, that only disconnected clients can be removed.' + +sessions-subscriptions: + 0: + image: /images/pe/mqtt-broker/user-guide/ui/session-subscriptions-1.png + title: 'The list of subscriptions of the session.' + 1: + image: /images/pe/mqtt-broker/user-guide/ui/session-subscriptions-2.png + title: 'Subscription MQTT 5.0 options.' + +sessions-metrics: + 0: + image: /images/pe/mqtt-broker/user-guide/ui/session-metrics-1.png + title: 'The list of subscription metrics. To clear the statistics, click on the "Delete" icon in the top right corner.' + +--- + +{% assign docsPrefix = "pe/" %} +{% include docs/mqtt-broker/user-guide/ui/sessions.md %} diff --git a/docs/pe/mqtt-broker/user-guide/ui/settings.md b/docs/pe/mqtt-broker/user-guide/ui/settings.md new file mode 100644 index 0000000000..e99f9bb322 --- /dev/null +++ b/docs/pe/mqtt-broker/user-guide/ui/settings.md @@ -0,0 +1,36 @@ +--- +layout: docwithnav-pe-mqtt-broker +title: Settings +description: Settings management + +settings-password-policy: + 0: + image: /images/pe/mqtt-broker/user-guide/ui/settings-password-policy-1.png + title: 'Navigate to the Settings > Security page, update the password policy and click "Save" to apply changes.' + 1: + image: /images/pe/mqtt-broker/user-guide/ui/settings-password-policy-2.png + title: 'In your Account settings, you can change password to comply with the new password policy.' + +settings-connectivity-settings: + 0: + image: /images/pe/mqtt-broker/user-guide/ui/settings-connectivity-settings-1.png + title: 'The MQTT host is changed to custom IP address.' + 1: + image: /images/pe/mqtt-broker/user-guide/ui/settings-connectivity-settings-2.png + title: 'Check connectivity window uses new host.' + 2: + image: /images/pe/mqtt-broker/user-guide/ui/settings-connectivity-settings-3.png + title: 'The WS host is changed to custom IP address.' + 3: + image: /images/pe/mqtt-broker/user-guide/ui/settings-connectivity-settings-4.png + title: 'WebSocket Credentials window uses new host.' + +authentication-settings: + 0: + image: /images/pe/mqtt-broker/security/auth-providers/authentication-settings.png + title: 'Navigate to the Settings > Security page to check the MQTT Authentication Settings.' + +--- + +{% assign docsPrefix = "pe/" %} +{% include docs/mqtt-broker/user-guide/ui/settings.md %} diff --git a/docs/pe/mqtt-broker/user-guide/ui/shared-subscriptions.md b/docs/pe/mqtt-broker/user-guide/ui/shared-subscriptions.md new file mode 100644 index 0000000000..a79b41c4e8 --- /dev/null +++ b/docs/pe/mqtt-broker/user-guide/ui/shared-subscriptions.md @@ -0,0 +1,25 @@ +--- +layout: docwithnav-pe-mqtt-broker +title: Application Shared Subscriptions +description: Application Shared Subscriptions + +add-shared-subscriptions: + 0: + image: /images/pe/mqtt-broker/user-guide/ui/add-shared-subscriptions-1.png + title: 'Open Shared Subscriptions page and click on the "plus" icon.' + 1: + image: /images/pe/mqtt-broker/user-guide/ui/add-shared-subscriptions-2.png + title: 'Fill in the Name, Topic filter and Partitions fields.' + +delete-shared-subscriptions: + 0: + image: /images/pe/mqtt-broker/user-guide/ui/delete-shared-subscriptions-1.png + title: 'Delete single. Click on the icon "Delete".' + 1: + image: /images/pe/mqtt-broker/user-guide/ui/delete-shared-subscriptions-2.png + title: 'Delete multiple. Select subscriptions you want to delete and click on the "Delete" icon in the top right corner.' + +--- + +{% assign docsPrefix = "pe/" %} +{% include docs/mqtt-broker/user-guide/ui/shared-subscriptions.md %} diff --git a/docs/pe/mqtt-broker/user-guide/ui/subscriptions.md b/docs/pe/mqtt-broker/user-guide/ui/subscriptions.md new file mode 100644 index 0000000000..1df4b35108 --- /dev/null +++ b/docs/pe/mqtt-broker/user-guide/ui/subscriptions.md @@ -0,0 +1,42 @@ +--- +layout: docwithnav-pe-mqtt-broker +title: Subscriptions +description: Subscriptions management + +subscription-session: + 0: + image: /images/pe/mqtt-broker/user-guide/ui/subscription-session-1.png + title: 'Open Subscriptions page and click on the table row.' + 1: + image: /images/pe/mqtt-broker/user-guide/ui/subscription-session-2.png + title: 'Add, edit or remove subscriptions.' + 2: + image: /images/pe/mqtt-broker/user-guide/ui/subscription-session-3.png + title: 'For this subscription, for example, we changed "Retain as Published" to true and "Subscription Identifier" to 6.' + 3: + image: /images/pe/mqtt-broker/user-guide/ui/subscription-session-4.png + title: 'Click "Update" button to apply changes.' + 4: + image: /images/pe/mqtt-broker/user-guide/ui/subscription-session-5.png + title: 'The subscription parameters "Retained as Published" and "Subscription ID" have been successfully updated.' + +subscriptions-table: + 0: + image: /images/pe/mqtt-broker/user-guide/ui/subscriptions-table-1.png + title: 'The Subscriptions table displays all broker subscriptions.' + 1: + image: /images/pe/mqtt-broker/user-guide/ui/subscriptions-table-2.png + title: 'The "Filter" window allows easily filtering of the table by each column.' + +clear-empty-subscription-nodes: + 0: + image: /images/pe/mqtt-broker/user-guide/ui/clear-empty-subscription-nodes-1.png + title: 'Click on the button "Clear empty subscription nodes" in the top right corner.' + 1: + image: /images/pe/mqtt-broker/user-guide/ui/clear-empty-subscription-nodes-2.png + title: 'Confirm action.' + +--- + +{% assign docsPrefix = "pe/" %} +{% include docs/mqtt-broker/user-guide/ui/subscriptions.md %} diff --git a/docs/pe/mqtt-broker/user-guide/ui/unauthorized-clients.md b/docs/pe/mqtt-broker/user-guide/ui/unauthorized-clients.md new file mode 100644 index 0000000000..0a7c68505a --- /dev/null +++ b/docs/pe/mqtt-broker/user-guide/ui/unauthorized-clients.md @@ -0,0 +1,24 @@ +--- +layout: docwithnav-pe-mqtt-broker +title: Unauthorized clients +description: Unauthorized clients management + +unauthorized-clients: + 0: + image: /images/pe/mqtt-broker/user-guide/ui/unauthorized-clients-1.png + title: 'Navigate to the Authentication > Unauthorized Clients page, table shows clients that could not pass authorization.' + 1: + image: /images/pe/mqtt-broker/user-guide/ui/unauthorized-clients-2.png + title: 'The filter windows allow easily filtering of the table by each column and date.' + +delete-unauthorized-client: + 0: + image: /images/pe/mqtt-broker/user-guide/ui/delete-unauthorized-client-1.png + title: 'Find the client in the table and click on icon "Delete".' + 1: + image: /images/pe/mqtt-broker/user-guide/ui/delete-unauthorized-client-2.png + title: 'To delete all unauthorized clients click on the "Delete" icon in the top right corner of the table.' +--- + +{% assign docsPrefix = "pe/" %} +{% include docs/mqtt-broker/user-guide/ui/unauthorized-clients.md %} diff --git a/docs/pe/mqtt-broker/user-guide/ui/users.md b/docs/pe/mqtt-broker/user-guide/ui/users.md new file mode 100644 index 0000000000..201568a377 --- /dev/null +++ b/docs/pe/mqtt-broker/user-guide/ui/users.md @@ -0,0 +1,41 @@ +--- +layout: docwithnav-pe-mqtt-broker +title: User management +description: UI user management + +add-user-broker: + 0: + image: /images/pe/mqtt-broker/user-guide/ui/add-user-broker-1.png + title: 'Navigate to the Users page. Then click on the "plus" icon in the top right corner;' + 1: + image: /images/pe/mqtt-broker/user-guide/ui/add-user-broker-2.png + title: 'Provide the email address, which must be unique within the system. The fields for first name, last name, and description are optional. Click "Add" to create the user.' + +edit-user-broker: + 0: + image: /images/pe/mqtt-broker/user-guide/ui/edit-user-broker-1.png + title: 'Locate the desired user in the Users table and click on the corresponding row.' + 1: + image: /images/pe/mqtt-broker/user-guide/ui/edit-user-broker-2.png + title: 'Click the Toggle edit mode button.' + 2: + image: /images/pe/mqtt-broker/user-guide/ui/edit-user-broker-3.png + title: 'Modify the first name, last name, or description and click on the button "Apply changes" to save the changes.' + +delete-user-broker: + 0: + image: /images/pe/mqtt-broker/user-guide/ui/delete-user-broker-1.png + title: 'Find the user in the Users table and click on the Delete button.' + 1: + image: /images/pe/mqtt-broker/user-guide/ui/delete-user-broker-2.png + title: 'Confirm the action by selecting Yes.' + +login-as-user: + 0: + image: /images/pe/mqtt-broker/user-guide/ui/login-as-user.png + title: 'In the Users table, select the desired user and click the Login button to proceed.' + +--- + +{% assign docsPrefix = "pe/" %} +{% include docs/mqtt-broker/user-guide/ui/users.md %} diff --git a/docs/pe/mqtt-broker/user-guide/ui/websocket-client.md b/docs/pe/mqtt-broker/user-guide/ui/websocket-client.md new file mode 100644 index 0000000000..ab7d1f7d22 --- /dev/null +++ b/docs/pe/mqtt-broker/user-guide/ui/websocket-client.md @@ -0,0 +1,100 @@ +--- +layout: docwithnav-pe-mqtt-broker +title: WebSocket Client +description: MQTT tool + +ws-connection-add: + 0: + image: /images/pe/mqtt-broker/user-guide/ui/ws-connection-add-1.png + title: 'Go to the WebSocket Client page and click the Select Connection, represented by the expand more icon.' + 1: + image: /images/pe/mqtt-broker/user-guide/ui/ws-connection-add-2.png + title: 'Click on the button "Connect".' + +ws-connection-details: + 0: + image: /images/pe/mqtt-broker/user-guide/ui/ws-connection-details-1.png + title: 'Fill connection name, URL and MQTT client credentials. By default, the credentials are auto-generated.' + 1: + image: /images/pe/mqtt-broker/user-guide/ui/ws-connection-details-2.png + title: 'Authentication with custom Client ID, Username, Password.' + 2: + image: /images/pe/mqtt-broker/user-guide/ui/ws-connection-details-3.png + title: 'Use existing Client Credentials to authenticate MQTT client.' + +ws-connection-advanced: + 0: + image: /images/pe/mqtt-broker/user-guide/ui/ws-connection-advanced-1.png + title: 'Advanced settings of the connection.' + 1: + image: /images/pe/mqtt-broker/user-guide/ui/ws-connection-advanced-2.png + title: 'Advanced settings, available if selected MQTT v.5' + +ws-connection-will: + 0: + image: /images/pe/mqtt-broker/user-guide/ui/ws-connection-will-1.png + title: 'Last will settings of the connection.' + 1: + image: /images/pe/mqtt-broker/user-guide/ui/ws-connection-will-2.png + title: 'User properties of the Last will message, available if selected MQTT v.5' + +ws-connection-edit: + 0: + image: /images/pe/mqtt-broker/user-guide/ui/ws-connection-edit-1.png + title: 'Go to the WebSocket Client page and click on the arrow icon to expand the list of connections.' + 1: + image: /images/pe/mqtt-broker/user-guide/ui/ws-connection-edit-2.png + title: 'Make changes and click Connect to save changes.' + +ws-connection-delete: + 0: + image: /images/pe/mqtt-broker/user-guide/ui/ws-connection-delete-1.png + title: 'Go to the WebSocket Client page and click on the arrow icon to expand the list of connections, then click on the trash icon.' + 1: + image: /images/pe/mqtt-broker/user-guide/ui/ws-connection-delete-2.png + title: 'Confirm delete by clicking Yes.' + +ws-subscription-add: + 0: + image: /images/pe/mqtt-broker/user-guide/ui/ws-subscription-add-1.png + title: 'On the WebSocket Client page click on the button Add Subscription.' + 1: + image: /images/pe/mqtt-broker/user-guide/ui/ws-subscription-add-2.png + title: 'Fill in required subscription details and click Add.' + +ws-subscription-edit: + 0: + image: /images/pe/mqtt-broker/user-guide/ui/ws-subscription-edit-1.png + title: 'On the WebSocket Client page click on the edit button on the subscription row.' + 1: + image: /images/pe/mqtt-broker/user-guide/ui/ws-subscription-edit-2.png + title: 'Make changes and confirm by clicking Save.' + +ws-subscription-delete: + 0: + image: /images/pe/mqtt-broker/user-guide/ui/ws-subscription-delete-1.png + title: 'On the WebSocket Client page click on the delete icon on the subscription row.' + 1: + image: /images/pe/mqtt-broker/user-guide/ui/ws-subscription-delete-2.png + title: 'Click Yes to confirm delete action.' + +ws-table-msg: + 0: + image: /images/pe/mqtt-broker/user-guide/ui/ws-table-msg-1.png + title: 'List of messages. Payload and message properties can be found in the actions section.' + 1: + image: /images/pe/mqtt-broker/user-guide/ui/ws-table-msg-2.png + title: 'Payload of the message.' + 2: + image: /images/pe/mqtt-broker/user-guide/ui/ws-table-msg-3.png + title: 'Properties of the message.' + +ws-subscription-overview: + 0: + image: /images/pe/mqtt-broker/user-guide/ui/ws-subscription-overview-1.png + title: 'Subscription settings with MQTT 5 options.' + +--- + +{% assign docsPrefix = "pe/" %} +{% include docs/mqtt-broker/user-guide/ui/websocket-client.md %} diff --git a/docs/pe/mqtt-broker/user-management.md b/docs/pe/mqtt-broker/user-management.md new file mode 100644 index 0000000000..a7ac1638b7 --- /dev/null +++ b/docs/pe/mqtt-broker/user-management.md @@ -0,0 +1,9 @@ +--- +layout: docwithnav-pe-mqtt-broker +title: User Management +description: User Management Guide + +--- + +{% assign docsPrefix = "pe/" %} +{% include docs/mqtt-broker/user-management.md %} \ No newline at end of file diff --git a/docs/pe/mqtt-broker/white-labeling.md b/docs/pe/mqtt-broker/white-labeling.md new file mode 100644 index 0000000000..5ac6c1d3f1 --- /dev/null +++ b/docs/pe/mqtt-broker/white-labeling.md @@ -0,0 +1,44 @@ +--- +layout: docwithnav-pe-mqtt-broker +title: White Labeling +description: TBMQ PE White labeling +redirect_from: "/docs/mqtt-broker/white-labeling/" + +white-labeling-default: + 0: + image: /images/pe/mqtt-broker/user-guide/white-labeling/white-labeling-default.png + title: 'To configure your company or product logo and color scheme, go to the "White labeling" page.' + +white-labeling-custom: + 0: + image: /images/pe/mqtt-broker/user-guide/white-labeling/white-labeling-custom.png + title: 'The final look of the customized user interface.' + +advanced-css: + 0: + image: /images/pe/mqtt-broker/user-guide/white-labeling/white-labeling-advanced-css-1.png + title: 'Click on the "Advanced CSS" button;' + 1: + image: /images/pe/mqtt-broker/user-guide/white-labeling/white-labeling-advanced-css-2.png + title: 'Paste the CSS code with the style for the user interface into the "Advanced CSS" pop-up window and click "Save". Then save all changes;' + 2: + image: /images/pe/mqtt-broker/user-guide/white-labeling/white-labeling-advanced-css-3.png + title: 'As you can see, icons color changed to purple and the color of the active menu button (White labeling) changed to white.' + +customize-login-page: + 0: + image: /images/pe/mqtt-broker/user-guide/white-labeling/white-labeling-login-1.png + title: 'Enter the registered domain name. It is recommended to prevent usage of hostnames from headers of the request. Enter a custom application title, replace the default website icon and logo with your own;' + 1: + image: /images/pe/mqtt-broker/user-guide/white-labeling/white-labeling-login-2.png + title: 'Define the primary and accent color palettes, and set the page background color. Once done, save the changes.' + +verify-result-customize-login-page: + 0: + image: /images/pe/mqtt-broker/user-guide/white-labeling/white-labeling-login-3.png + title: 'Now, use your custom domain name to access the TBMQ web interface login page and verify the result of your configuration.' + +--- + +{% assign docsPrefix = "pe/" %} +{% include docs/pe/mqtt-broker/white-labeling.md %} diff --git a/generate_config_pages.py b/generate_config_pages.py index 7b920d3741..9c405556b0 100644 --- a/generate_config_pages.py +++ b/generate_config_pages.py @@ -182,6 +182,11 @@ def update_page(input_file, output_file): "_includes/docs/mqtt-broker/install/config.md") update_page(tb_repo_abs_path + "/integration/executor/src/main/resources/tbmq-integration-executor.yml", "_includes/docs/mqtt-broker/install/ie-config.md") + elif tb_repo_type.lower() == "tbmq-pe": + update_page(tb_repo_abs_path + "/application/src/main/resources/thingsboard-mqtt-broker.yml", + "_includes/docs/pe/mqtt-broker/install/config.md") + update_page(tb_repo_abs_path + "/integration/executor/src/main/resources/tbmq-integration-executor.yml", + "_includes/docs/pe/mqtt-broker/install/ie-config.md") elif tb_repo_type.lower() == "edge": update_page(tb_repo_abs_path + "/application/src/main/resources/tb-edge.yml", "_includes/docs/edge/user-guide/install/config.md") @@ -189,4 +194,4 @@ def update_page(input_file, output_file): update_page(tb_repo_abs_path + "/application/src/main/resources/tb-edge.yml", "_includes/docs/pe/edge/user-guide/install/config.md") else: - print("Invalid 'tb_repo_type'. Please provide 'ce' or `pe` or `tbmq` or 'edge' or 'edge-pe' as the first argument.") + print("Invalid 'tb_repo_type'. Please provide 'ce' or `pe` or `tbmq` or 'tbmq-pe' or 'edge' or 'edge-pe' as the first argument.") diff --git a/images/mqtt-broker/install-old/aws-msk-arn-preview.png b/images/mqtt-broker/install-old/aws-msk-arn-preview.png new file mode 100644 index 0000000000..9f042f0683 Binary files /dev/null and b/images/mqtt-broker/install-old/aws-msk-arn-preview.png differ diff --git a/images/mqtt-broker/install-old/aws-msk-arn.png b/images/mqtt-broker/install-old/aws-msk-arn.png new file mode 100644 index 0000000000..8d8bf40a8d Binary files /dev/null and b/images/mqtt-broker/install-old/aws-msk-arn.png differ diff --git a/images/mqtt-broker/install-old/aws-msk-creation-preview.png b/images/mqtt-broker/install-old/aws-msk-creation-preview.png new file mode 100644 index 0000000000..45241d3807 Binary files /dev/null and b/images/mqtt-broker/install-old/aws-msk-creation-preview.png differ diff --git a/images/mqtt-broker/install-old/aws-msk-creation.png b/images/mqtt-broker/install-old/aws-msk-creation.png new file mode 100644 index 0000000000..f8fe1fdc1e Binary files /dev/null and b/images/mqtt-broker/install-old/aws-msk-creation.png differ diff --git a/images/mqtt-broker/install-old/aws-msk-security-preview.png b/images/mqtt-broker/install-old/aws-msk-security-preview.png new file mode 100644 index 0000000000..68db52bed2 Binary files /dev/null and b/images/mqtt-broker/install-old/aws-msk-security-preview.png differ diff --git a/images/mqtt-broker/install-old/aws-msk-security.png b/images/mqtt-broker/install-old/aws-msk-security.png new file mode 100644 index 0000000000..f5ea00ea6e Binary files /dev/null and b/images/mqtt-broker/install-old/aws-msk-security.png differ diff --git a/images/mqtt-broker/install-old/aws-msk-vpc-preview.png b/images/mqtt-broker/install-old/aws-msk-vpc-preview.png new file mode 100644 index 0000000000..4bbee6fe9d Binary files /dev/null and b/images/mqtt-broker/install-old/aws-msk-vpc-preview.png differ diff --git a/images/mqtt-broker/install-old/aws-msk-vpc-sg-preview.png b/images/mqtt-broker/install-old/aws-msk-vpc-sg-preview.png new file mode 100644 index 0000000000..fae10c11ae Binary files /dev/null and b/images/mqtt-broker/install-old/aws-msk-vpc-sg-preview.png differ diff --git a/images/mqtt-broker/install-old/aws-msk-vpc-sg.png b/images/mqtt-broker/install-old/aws-msk-vpc-sg.png new file mode 100644 index 0000000000..169e4e07a7 Binary files /dev/null and b/images/mqtt-broker/install-old/aws-msk-vpc-sg.png differ diff --git a/images/mqtt-broker/install-old/aws-msk-vpc.png b/images/mqtt-broker/install-old/aws-msk-vpc.png new file mode 100644 index 0000000000..18e81e3a29 Binary files /dev/null and b/images/mqtt-broker/install-old/aws-msk-vpc.png differ diff --git a/images/mqtt-broker/install-old/aws-rds-default-database-preview.png b/images/mqtt-broker/install-old/aws-rds-default-database-preview.png new file mode 100644 index 0000000000..0cf8035cba Binary files /dev/null and b/images/mqtt-broker/install-old/aws-rds-default-database-preview.png differ diff --git a/images/mqtt-broker/install-old/aws-rds-default-database.png b/images/mqtt-broker/install-old/aws-rds-default-database.png new file mode 100644 index 0000000000..75dadeb12b Binary files /dev/null and b/images/mqtt-broker/install-old/aws-rds-default-database.png differ diff --git a/images/mqtt-broker/install-old/aws-rds-endpoint-preview.png b/images/mqtt-broker/install-old/aws-rds-endpoint-preview.png new file mode 100644 index 0000000000..2575f54f3b Binary files /dev/null and b/images/mqtt-broker/install-old/aws-rds-endpoint-preview.png differ diff --git a/images/mqtt-broker/install-old/aws-rds-endpoint.png b/images/mqtt-broker/install-old/aws-rds-endpoint.png new file mode 100644 index 0000000000..52f0d75109 Binary files /dev/null and b/images/mqtt-broker/install-old/aws-rds-endpoint.png differ diff --git a/images/mqtt-broker/install-old/aws-rds-vpc-preview.png b/images/mqtt-broker/install-old/aws-rds-vpc-preview.png new file mode 100644 index 0000000000..9688e426ad Binary files /dev/null and b/images/mqtt-broker/install-old/aws-rds-vpc-preview.png differ diff --git a/images/mqtt-broker/install-old/aws-rds-vpc-sg-preview.png b/images/mqtt-broker/install-old/aws-rds-vpc-sg-preview.png new file mode 100644 index 0000000000..2319020c5e Binary files /dev/null and b/images/mqtt-broker/install-old/aws-rds-vpc-sg-preview.png differ diff --git a/images/mqtt-broker/install-old/aws-rds-vpc-sg.png b/images/mqtt-broker/install-old/aws-rds-vpc-sg.png new file mode 100644 index 0000000000..5d58a41ef8 Binary files /dev/null and b/images/mqtt-broker/install-old/aws-rds-vpc-sg.png differ diff --git a/images/mqtt-broker/install-old/aws-rds-vpc.png b/images/mqtt-broker/install-old/aws-rds-vpc.png new file mode 100644 index 0000000000..b69eace1b4 Binary files /dev/null and b/images/mqtt-broker/install-old/aws-rds-vpc.png differ diff --git a/images/mqtt-broker/install-old/aws-redis-advanced-preview.png b/images/mqtt-broker/install-old/aws-redis-advanced-preview.png new file mode 100644 index 0000000000..98e4b82d07 Binary files /dev/null and b/images/mqtt-broker/install-old/aws-redis-advanced-preview.png differ diff --git a/images/mqtt-broker/install-old/aws-redis-advanced.png b/images/mqtt-broker/install-old/aws-redis-advanced.png new file mode 100644 index 0000000000..ca06d3eb72 Binary files /dev/null and b/images/mqtt-broker/install-old/aws-redis-advanced.png differ diff --git a/images/mqtt-broker/install-old/aws-redis-cluster-settings-preview.png b/images/mqtt-broker/install-old/aws-redis-cluster-settings-preview.png new file mode 100644 index 0000000000..d828c94bde Binary files /dev/null and b/images/mqtt-broker/install-old/aws-redis-cluster-settings-preview.png differ diff --git a/images/mqtt-broker/install-old/aws-redis-cluster-settings.png b/images/mqtt-broker/install-old/aws-redis-cluster-settings.png new file mode 100644 index 0000000000..0ca5660eac Binary files /dev/null and b/images/mqtt-broker/install-old/aws-redis-cluster-settings.png differ diff --git a/images/mqtt-broker/install-old/aws-redis-connectivity-preview.png b/images/mqtt-broker/install-old/aws-redis-connectivity-preview.png new file mode 100644 index 0000000000..87f34efa8e Binary files /dev/null and b/images/mqtt-broker/install-old/aws-redis-connectivity-preview.png differ diff --git a/images/mqtt-broker/install-old/aws-redis-connectivity.png b/images/mqtt-broker/install-old/aws-redis-connectivity.png new file mode 100644 index 0000000000..c944c624f5 Binary files /dev/null and b/images/mqtt-broker/install-old/aws-redis-connectivity.png differ diff --git a/images/mqtt-broker/install-old/aws-redis-create-preview.png b/images/mqtt-broker/install-old/aws-redis-create-preview.png new file mode 100644 index 0000000000..7cf9721ee8 Binary files /dev/null and b/images/mqtt-broker/install-old/aws-redis-create-preview.png differ diff --git a/images/mqtt-broker/install-old/aws-redis-create.png b/images/mqtt-broker/install-old/aws-redis-create.png new file mode 100644 index 0000000000..33163525d0 Binary files /dev/null and b/images/mqtt-broker/install-old/aws-redis-create.png differ diff --git a/images/mqtt-broker/install-old/aws-redis-result-preview.png b/images/mqtt-broker/install-old/aws-redis-result-preview.png new file mode 100644 index 0000000000..ee30b705af Binary files /dev/null and b/images/mqtt-broker/install-old/aws-redis-result-preview.png differ diff --git a/images/mqtt-broker/install-old/aws-redis-result.png b/images/mqtt-broker/install-old/aws-redis-result.png new file mode 100644 index 0000000000..b51211c909 Binary files /dev/null and b/images/mqtt-broker/install-old/aws-redis-result.png differ diff --git a/images/mqtt-broker/install/aws-msk-arn-preview.png b/images/mqtt-broker/install/aws-msk-arn-preview.png index 9f042f0683..e0cca7cd5e 100644 Binary files a/images/mqtt-broker/install/aws-msk-arn-preview.png and b/images/mqtt-broker/install/aws-msk-arn-preview.png differ diff --git a/images/mqtt-broker/install/aws-msk-arn.png b/images/mqtt-broker/install/aws-msk-arn.png index 8d8bf40a8d..10c96c40c6 100644 Binary files a/images/mqtt-broker/install/aws-msk-arn.png and b/images/mqtt-broker/install/aws-msk-arn.png differ diff --git a/images/mqtt-broker/install/aws-msk-creation-preview.png b/images/mqtt-broker/install/aws-msk-creation-preview.png index 45241d3807..075ca8fb4f 100644 Binary files a/images/mqtt-broker/install/aws-msk-creation-preview.png and b/images/mqtt-broker/install/aws-msk-creation-preview.png differ diff --git a/images/mqtt-broker/install/aws-msk-creation.png b/images/mqtt-broker/install/aws-msk-creation.png index f8fe1fdc1e..d58037fa6f 100644 Binary files a/images/mqtt-broker/install/aws-msk-creation.png and b/images/mqtt-broker/install/aws-msk-creation.png differ diff --git a/images/mqtt-broker/install/aws-msk-security-preview.png b/images/mqtt-broker/install/aws-msk-security-preview.png index 68db52bed2..16a9b57879 100644 Binary files a/images/mqtt-broker/install/aws-msk-security-preview.png and b/images/mqtt-broker/install/aws-msk-security-preview.png differ diff --git a/images/mqtt-broker/install/aws-msk-security.png b/images/mqtt-broker/install/aws-msk-security.png index f5ea00ea6e..417b23ba12 100644 Binary files a/images/mqtt-broker/install/aws-msk-security.png and b/images/mqtt-broker/install/aws-msk-security.png differ diff --git a/images/mqtt-broker/install/aws-msk-vpc-preview.png b/images/mqtt-broker/install/aws-msk-vpc-preview.png index 4bbee6fe9d..37651345ff 100644 Binary files a/images/mqtt-broker/install/aws-msk-vpc-preview.png and b/images/mqtt-broker/install/aws-msk-vpc-preview.png differ diff --git a/images/mqtt-broker/install/aws-msk-vpc-sg-preview.png b/images/mqtt-broker/install/aws-msk-vpc-sg-preview.png index fae10c11ae..61d1c42b76 100644 Binary files a/images/mqtt-broker/install/aws-msk-vpc-sg-preview.png and b/images/mqtt-broker/install/aws-msk-vpc-sg-preview.png differ diff --git a/images/mqtt-broker/install/aws-msk-vpc-sg.png b/images/mqtt-broker/install/aws-msk-vpc-sg.png index 169e4e07a7..bbd15deacb 100644 Binary files a/images/mqtt-broker/install/aws-msk-vpc-sg.png and b/images/mqtt-broker/install/aws-msk-vpc-sg.png differ diff --git a/images/mqtt-broker/install/aws-msk-vpc.png b/images/mqtt-broker/install/aws-msk-vpc.png index 18e81e3a29..c98424bf53 100644 Binary files a/images/mqtt-broker/install/aws-msk-vpc.png and b/images/mqtt-broker/install/aws-msk-vpc.png differ diff --git a/images/mqtt-broker/install/aws-rds-default-database-preview.png b/images/mqtt-broker/install/aws-rds-default-database-preview.png index 0cf8035cba..ea1d8f6096 100644 Binary files a/images/mqtt-broker/install/aws-rds-default-database-preview.png and b/images/mqtt-broker/install/aws-rds-default-database-preview.png differ diff --git a/images/mqtt-broker/install/aws-rds-default-database.png b/images/mqtt-broker/install/aws-rds-default-database.png index 75dadeb12b..57ce5d07f4 100644 Binary files a/images/mqtt-broker/install/aws-rds-default-database.png and b/images/mqtt-broker/install/aws-rds-default-database.png differ diff --git a/images/mqtt-broker/install/aws-rds-endpoint-preview.png b/images/mqtt-broker/install/aws-rds-endpoint-preview.png index 2575f54f3b..579a6c9492 100644 Binary files a/images/mqtt-broker/install/aws-rds-endpoint-preview.png and b/images/mqtt-broker/install/aws-rds-endpoint-preview.png differ diff --git a/images/mqtt-broker/install/aws-rds-endpoint.png b/images/mqtt-broker/install/aws-rds-endpoint.png index 52f0d75109..3a620659f9 100644 Binary files a/images/mqtt-broker/install/aws-rds-endpoint.png and b/images/mqtt-broker/install/aws-rds-endpoint.png differ diff --git a/images/mqtt-broker/install/aws-rds-vpc-preview.png b/images/mqtt-broker/install/aws-rds-vpc-preview.png index 9688e426ad..8ed6fc90bb 100644 Binary files a/images/mqtt-broker/install/aws-rds-vpc-preview.png and b/images/mqtt-broker/install/aws-rds-vpc-preview.png differ diff --git a/images/mqtt-broker/install/aws-rds-vpc-sg-preview.png b/images/mqtt-broker/install/aws-rds-vpc-sg-preview.png index 2319020c5e..c84761ce84 100644 Binary files a/images/mqtt-broker/install/aws-rds-vpc-sg-preview.png and b/images/mqtt-broker/install/aws-rds-vpc-sg-preview.png differ diff --git a/images/mqtt-broker/install/aws-rds-vpc-sg.png b/images/mqtt-broker/install/aws-rds-vpc-sg.png index 5d58a41ef8..c388b6bf45 100644 Binary files a/images/mqtt-broker/install/aws-rds-vpc-sg.png and b/images/mqtt-broker/install/aws-rds-vpc-sg.png differ diff --git a/images/mqtt-broker/install/aws-rds-vpc.png b/images/mqtt-broker/install/aws-rds-vpc.png index b69eace1b4..b882029aa7 100644 Binary files a/images/mqtt-broker/install/aws-rds-vpc.png and b/images/mqtt-broker/install/aws-rds-vpc.png differ diff --git a/images/mqtt-broker/install/aws-redis-advanced-preview.png b/images/mqtt-broker/install/aws-redis-advanced-preview.png index 98e4b82d07..ba45cc22f4 100644 Binary files a/images/mqtt-broker/install/aws-redis-advanced-preview.png and b/images/mqtt-broker/install/aws-redis-advanced-preview.png differ diff --git a/images/mqtt-broker/install/aws-redis-advanced.png b/images/mqtt-broker/install/aws-redis-advanced.png index ca06d3eb72..6b953e81a0 100644 Binary files a/images/mqtt-broker/install/aws-redis-advanced.png and b/images/mqtt-broker/install/aws-redis-advanced.png differ diff --git a/images/mqtt-broker/install/aws-redis-cluster-settings-preview.png b/images/mqtt-broker/install/aws-redis-cluster-settings-preview.png index d828c94bde..8967333970 100644 Binary files a/images/mqtt-broker/install/aws-redis-cluster-settings-preview.png and b/images/mqtt-broker/install/aws-redis-cluster-settings-preview.png differ diff --git a/images/mqtt-broker/install/aws-redis-cluster-settings.png b/images/mqtt-broker/install/aws-redis-cluster-settings.png index 0ca5660eac..668fa97653 100644 Binary files a/images/mqtt-broker/install/aws-redis-cluster-settings.png and b/images/mqtt-broker/install/aws-redis-cluster-settings.png differ diff --git a/images/mqtt-broker/install/aws-redis-connectivity-preview.png b/images/mqtt-broker/install/aws-redis-connectivity-preview.png index 87f34efa8e..bbe8130fcc 100644 Binary files a/images/mqtt-broker/install/aws-redis-connectivity-preview.png and b/images/mqtt-broker/install/aws-redis-connectivity-preview.png differ diff --git a/images/mqtt-broker/install/aws-redis-connectivity.png b/images/mqtt-broker/install/aws-redis-connectivity.png index c944c624f5..c1a656e351 100644 Binary files a/images/mqtt-broker/install/aws-redis-connectivity.png and b/images/mqtt-broker/install/aws-redis-connectivity.png differ diff --git a/images/mqtt-broker/install/aws-redis-create-preview.png b/images/mqtt-broker/install/aws-redis-create-preview.png index 7cf9721ee8..8dc44f3cd1 100644 Binary files a/images/mqtt-broker/install/aws-redis-create-preview.png and b/images/mqtt-broker/install/aws-redis-create-preview.png differ diff --git a/images/mqtt-broker/install/aws-redis-create.png b/images/mqtt-broker/install/aws-redis-create.png index 33163525d0..1ac97c43ea 100644 Binary files a/images/mqtt-broker/install/aws-redis-create.png and b/images/mqtt-broker/install/aws-redis-create.png differ diff --git a/images/mqtt-broker/install/aws-redis-result-preview.png b/images/mqtt-broker/install/aws-redis-result-preview.png index ee30b705af..a080016d84 100644 Binary files a/images/mqtt-broker/install/aws-redis-result-preview.png and b/images/mqtt-broker/install/aws-redis-result-preview.png differ diff --git a/images/mqtt-broker/install/aws-redis-result.png b/images/mqtt-broker/install/aws-redis-result.png index b51211c909..eaa4975bd2 100644 Binary files a/images/mqtt-broker/install/aws-redis-result.png and b/images/mqtt-broker/install/aws-redis-result.png differ diff --git a/images/mqtt-broker/product/backpressure.svg b/images/mqtt-broker/product/backpressure.svg new file mode 100644 index 0000000000..de5ab53f18 --- /dev/null +++ b/images/mqtt-broker/product/backpressure.svg @@ -0,0 +1,5 @@ + + + + + diff --git a/images/mqtt-broker/product/blocked-clients.svg b/images/mqtt-broker/product/blocked-clients.svg new file mode 100644 index 0000000000..4f4154898f --- /dev/null +++ b/images/mqtt-broker/product/blocked-clients.svg @@ -0,0 +1,11 @@ + + + + + + + + + + + diff --git a/images/mqtt-broker/product/login.webp b/images/mqtt-broker/product/login.webp new file mode 100644 index 0000000000..7a9aecb91e Binary files /dev/null and b/images/mqtt-broker/product/login.webp differ diff --git a/images/mqtt-broker/product/news-1.webp b/images/mqtt-broker/product/news-1.webp index e4a1d5c011..f531fb0a78 100644 Binary files a/images/mqtt-broker/product/news-1.webp and b/images/mqtt-broker/product/news-1.webp differ diff --git a/images/mqtt-broker/product/scheme.webp b/images/mqtt-broker/product/scheme.webp new file mode 100644 index 0000000000..09d48441bb Binary files /dev/null and b/images/mqtt-broker/product/scheme.webp differ diff --git a/images/mqtt-broker/product/white-labeling.webp b/images/mqtt-broker/product/white-labeling.webp new file mode 100644 index 0000000000..8ca141ff64 Binary files /dev/null and b/images/mqtt-broker/product/white-labeling.webp differ diff --git a/images/mqtt-broker/reference/aws/aws-rds-stats-preview.png b/images/mqtt-broker/reference/aws/aws-rds-stats-preview.png index 773424981c..2cbc3ae999 100644 Binary files a/images/mqtt-broker/reference/aws/aws-rds-stats-preview.png and b/images/mqtt-broker/reference/aws/aws-rds-stats-preview.png differ diff --git a/images/mqtt-broker/slack-logo.svg b/images/mqtt-broker/slack-logo.svg index 9aa4872d70..e15e5dd9b4 100644 --- a/images/mqtt-broker/slack-logo.svg +++ b/images/mqtt-broker/slack-logo.svg @@ -1,6 +1,9 @@ - - - + + + + + + \ No newline at end of file diff --git a/images/mqtt-broker/user-guide/ui/change-password-1-preview.png b/images/mqtt-broker/user-guide/ui/change-password-1-preview.png index 4a6bab158c..163f8fa698 100644 Binary files a/images/mqtt-broker/user-guide/ui/change-password-1-preview.png and b/images/mqtt-broker/user-guide/ui/change-password-1-preview.png differ diff --git a/images/mqtt-broker/user-guide/ui/change-password-1.png b/images/mqtt-broker/user-guide/ui/change-password-1.png index c499aa30c0..a2554478ed 100644 Binary files a/images/mqtt-broker/user-guide/ui/change-password-1.png and b/images/mqtt-broker/user-guide/ui/change-password-1.png differ diff --git a/images/mqtt-broker/user-guide/ui/change-password-2-preview.png b/images/mqtt-broker/user-guide/ui/change-password-2-preview.png index a7a6dbb717..a8a5c34307 100644 Binary files a/images/mqtt-broker/user-guide/ui/change-password-2-preview.png and b/images/mqtt-broker/user-guide/ui/change-password-2-preview.png differ diff --git a/images/mqtt-broker/user-guide/ui/change-password-2.png b/images/mqtt-broker/user-guide/ui/change-password-2.png index d02d29f4a5..a786d101ab 100644 Binary files a/images/mqtt-broker/user-guide/ui/change-password-2.png and b/images/mqtt-broker/user-guide/ui/change-password-2.png differ diff --git a/images/mqtt-broker/user-guide/ui/change-password-3-preview.png b/images/mqtt-broker/user-guide/ui/change-password-3-preview.png index 20b795913a..830a22cba9 100644 Binary files a/images/mqtt-broker/user-guide/ui/change-password-3-preview.png and b/images/mqtt-broker/user-guide/ui/change-password-3-preview.png differ diff --git a/images/mqtt-broker/user-guide/ui/change-password-3.png b/images/mqtt-broker/user-guide/ui/change-password-3.png index b165c752ef..6b81fa7840 100644 Binary files a/images/mqtt-broker/user-guide/ui/change-password-3.png and b/images/mqtt-broker/user-guide/ui/change-password-3.png differ diff --git a/images/mqtt-broker/user-guide/ui/integration-events-1-preview.png b/images/mqtt-broker/user-guide/ui/integration-events-1-preview.png index 8661843a5b..cc07261fce 100644 Binary files a/images/mqtt-broker/user-guide/ui/integration-events-1-preview.png and b/images/mqtt-broker/user-guide/ui/integration-events-1-preview.png differ diff --git a/images/mqtt-broker/user-guide/ui/integration-events-1.png b/images/mqtt-broker/user-guide/ui/integration-events-1.png index 9f3cb16549..77f24e5840 100644 Binary files a/images/mqtt-broker/user-guide/ui/integration-events-1.png and b/images/mqtt-broker/user-guide/ui/integration-events-1.png differ diff --git a/images/mqtt-broker/user-guide/ui/integration-events-2-preview.png b/images/mqtt-broker/user-guide/ui/integration-events-2-preview.png index f71d402216..16d1f26cbb 100644 Binary files a/images/mqtt-broker/user-guide/ui/integration-events-2-preview.png and b/images/mqtt-broker/user-guide/ui/integration-events-2-preview.png differ diff --git a/images/mqtt-broker/user-guide/ui/integration-events-2.png b/images/mqtt-broker/user-guide/ui/integration-events-2.png index ed4a62bf8c..cc19792db0 100644 Binary files a/images/mqtt-broker/user-guide/ui/integration-events-2.png and b/images/mqtt-broker/user-guide/ui/integration-events-2.png differ diff --git a/images/mqtt-broker/user-guide/ui/integration-events-3-preview.png b/images/mqtt-broker/user-guide/ui/integration-events-3-preview.png index 85b5baab5a..b287a14d85 100644 Binary files a/images/mqtt-broker/user-guide/ui/integration-events-3-preview.png and b/images/mqtt-broker/user-guide/ui/integration-events-3-preview.png differ diff --git a/images/mqtt-broker/user-guide/ui/integration-events-3.png b/images/mqtt-broker/user-guide/ui/integration-events-3.png index dc9389e4cc..01b5e419ea 100644 Binary files a/images/mqtt-broker/user-guide/ui/integration-events-3.png and b/images/mqtt-broker/user-guide/ui/integration-events-3.png differ diff --git a/images/mqtt-broker/user-guide/ui/subscription-session-1-preview.png b/images/mqtt-broker/user-guide/ui/subscription-session-1-preview.png index 3f09055925..41aa0dfd52 100644 Binary files a/images/mqtt-broker/user-guide/ui/subscription-session-1-preview.png and b/images/mqtt-broker/user-guide/ui/subscription-session-1-preview.png differ diff --git a/images/mqtt-broker/user-guide/ui/subscription-session-1.png b/images/mqtt-broker/user-guide/ui/subscription-session-1.png index ab3dda3a5c..4d8ebf469f 100644 Binary files a/images/mqtt-broker/user-guide/ui/subscription-session-1.png and b/images/mqtt-broker/user-guide/ui/subscription-session-1.png differ diff --git a/images/mqtt-broker/user-guide/ui/ws-publish-basic-params-preview.png b/images/mqtt-broker/user-guide/ui/ws-publish-basic-params-preview.png new file mode 100644 index 0000000000..6a078664c7 Binary files /dev/null and b/images/mqtt-broker/user-guide/ui/ws-publish-basic-params-preview.png differ diff --git a/images/mqtt-broker/user-guide/ui/ws-subscription-overview-preview.png b/images/mqtt-broker/user-guide/ui/ws-subscription-overview-preview.png new file mode 100644 index 0000000000..2c7b9c5526 Binary files /dev/null and b/images/mqtt-broker/user-guide/ui/ws-subscription-overview-preview.png differ diff --git a/images/pe/mqtt-broker/features/application-client-warning-preview.png b/images/pe/mqtt-broker/features/application-client-warning-preview.png new file mode 100644 index 0000000000..74209c2aac Binary files /dev/null and b/images/pe/mqtt-broker/features/application-client-warning-preview.png differ diff --git a/images/pe/mqtt-broker/features/application-client-warning.png b/images/pe/mqtt-broker/features/application-client-warning.png new file mode 100644 index 0000000000..4917e7f890 Binary files /dev/null and b/images/pe/mqtt-broker/features/application-client-warning.png differ diff --git a/images/pe/mqtt-broker/features/security-authentication-basic-1-preview.png b/images/pe/mqtt-broker/features/security-authentication-basic-1-preview.png new file mode 100644 index 0000000000..19ab700bb1 Binary files /dev/null and b/images/pe/mqtt-broker/features/security-authentication-basic-1-preview.png differ diff --git a/images/pe/mqtt-broker/features/security-authentication-basic-1.png b/images/pe/mqtt-broker/features/security-authentication-basic-1.png new file mode 100644 index 0000000000..e9a525735c Binary files /dev/null and b/images/pe/mqtt-broker/features/security-authentication-basic-1.png differ diff --git a/images/pe/mqtt-broker/features/security-authentication-basic-2-preview.png b/images/pe/mqtt-broker/features/security-authentication-basic-2-preview.png new file mode 100644 index 0000000000..5661368a7d Binary files /dev/null and b/images/pe/mqtt-broker/features/security-authentication-basic-2-preview.png differ diff --git a/images/pe/mqtt-broker/features/security-authentication-basic-2.png b/images/pe/mqtt-broker/features/security-authentication-basic-2.png new file mode 100644 index 0000000000..b982a16160 Binary files /dev/null and b/images/pe/mqtt-broker/features/security-authentication-basic-2.png differ diff --git a/images/pe/mqtt-broker/features/security-authentication-tls-1-preview.png b/images/pe/mqtt-broker/features/security-authentication-tls-1-preview.png new file mode 100644 index 0000000000..04fb7188ea Binary files /dev/null and b/images/pe/mqtt-broker/features/security-authentication-tls-1-preview.png differ diff --git a/images/pe/mqtt-broker/features/security-authentication-tls-1.png b/images/pe/mqtt-broker/features/security-authentication-tls-1.png new file mode 100644 index 0000000000..44d67aeaf0 Binary files /dev/null and b/images/pe/mqtt-broker/features/security-authentication-tls-1.png differ diff --git a/images/pe/mqtt-broker/features/security-authentication-tls-2-preview.png b/images/pe/mqtt-broker/features/security-authentication-tls-2-preview.png new file mode 100644 index 0000000000..3cc382ccb6 Binary files /dev/null and b/images/pe/mqtt-broker/features/security-authentication-tls-2-preview.png differ diff --git a/images/pe/mqtt-broker/features/security-authentication-tls-2.png b/images/pe/mqtt-broker/features/security-authentication-tls-2.png new file mode 100644 index 0000000000..04e18c5e9d Binary files /dev/null and b/images/pe/mqtt-broker/features/security-authentication-tls-2.png differ diff --git a/images/pe/mqtt-broker/features/security-authentication-tls-3-preview.png b/images/pe/mqtt-broker/features/security-authentication-tls-3-preview.png new file mode 100644 index 0000000000..7fa79ef383 Binary files /dev/null and b/images/pe/mqtt-broker/features/security-authentication-tls-3-preview.png differ diff --git a/images/pe/mqtt-broker/features/security-authentication-tls-3.png b/images/pe/mqtt-broker/features/security-authentication-tls-3.png new file mode 100644 index 0000000000..b48b9f5674 Binary files /dev/null and b/images/pe/mqtt-broker/features/security-authentication-tls-3.png differ diff --git a/images/pe/mqtt-broker/features/security-authorization-basic-1-preview.png b/images/pe/mqtt-broker/features/security-authorization-basic-1-preview.png new file mode 100644 index 0000000000..a5e1c25bdd Binary files /dev/null and b/images/pe/mqtt-broker/features/security-authorization-basic-1-preview.png differ diff --git a/images/pe/mqtt-broker/features/security-authorization-basic-1.png b/images/pe/mqtt-broker/features/security-authorization-basic-1.png new file mode 100644 index 0000000000..6ad5ef6815 Binary files /dev/null and b/images/pe/mqtt-broker/features/security-authorization-basic-1.png differ diff --git a/images/pe/mqtt-broker/features/security-authorization-tls-1-preview.png b/images/pe/mqtt-broker/features/security-authorization-tls-1-preview.png new file mode 100644 index 0000000000..193e8b059a Binary files /dev/null and b/images/pe/mqtt-broker/features/security-authorization-tls-1-preview.png differ diff --git a/images/pe/mqtt-broker/features/security-authorization-tls-1.png b/images/pe/mqtt-broker/features/security-authorization-tls-1.png new file mode 100644 index 0000000000..b1c5f8aad5 Binary files /dev/null and b/images/pe/mqtt-broker/features/security-authorization-tls-1.png differ diff --git a/images/pe/mqtt-broker/getting-started/add-mqtt-creds-1-preview.png b/images/pe/mqtt-broker/getting-started/add-mqtt-creds-1-preview.png new file mode 100644 index 0000000000..7572b6fc60 Binary files /dev/null and b/images/pe/mqtt-broker/getting-started/add-mqtt-creds-1-preview.png differ diff --git a/images/pe/mqtt-broker/getting-started/add-mqtt-creds-1.png b/images/pe/mqtt-broker/getting-started/add-mqtt-creds-1.png new file mode 100644 index 0000000000..355530bb8e Binary files /dev/null and b/images/pe/mqtt-broker/getting-started/add-mqtt-creds-1.png differ diff --git a/images/pe/mqtt-broker/getting-started/add-mqtt-creds-2-preview.png b/images/pe/mqtt-broker/getting-started/add-mqtt-creds-2-preview.png new file mode 100644 index 0000000000..081b947bcd Binary files /dev/null and b/images/pe/mqtt-broker/getting-started/add-mqtt-creds-2-preview.png differ diff --git a/images/pe/mqtt-broker/getting-started/add-mqtt-creds-2.png b/images/pe/mqtt-broker/getting-started/add-mqtt-creds-2.png new file mode 100644 index 0000000000..e6ceed840e Binary files /dev/null and b/images/pe/mqtt-broker/getting-started/add-mqtt-creds-2.png differ diff --git a/images/pe/mqtt-broker/getting-started/add-mqtt-creds-3-preview.png b/images/pe/mqtt-broker/getting-started/add-mqtt-creds-3-preview.png new file mode 100644 index 0000000000..b0f31d7133 Binary files /dev/null and b/images/pe/mqtt-broker/getting-started/add-mqtt-creds-3-preview.png differ diff --git a/images/pe/mqtt-broker/getting-started/add-mqtt-creds-3.png b/images/pe/mqtt-broker/getting-started/add-mqtt-creds-3.png new file mode 100644 index 0000000000..883f5f7bf8 Binary files /dev/null and b/images/pe/mqtt-broker/getting-started/add-mqtt-creds-3.png differ diff --git a/images/pe/mqtt-broker/getting-started/add-mqtt-creds-4-preview.png b/images/pe/mqtt-broker/getting-started/add-mqtt-creds-4-preview.png new file mode 100644 index 0000000000..6e44e16bee Binary files /dev/null and b/images/pe/mqtt-broker/getting-started/add-mqtt-creds-4-preview.png differ diff --git a/images/pe/mqtt-broker/getting-started/add-mqtt-creds-4.png b/images/pe/mqtt-broker/getting-started/add-mqtt-creds-4.png new file mode 100644 index 0000000000..b6a31b2794 Binary files /dev/null and b/images/pe/mqtt-broker/getting-started/add-mqtt-creds-4.png differ diff --git a/images/pe/mqtt-broker/getting-started/broker-session-details-preview.png b/images/pe/mqtt-broker/getting-started/broker-session-details-preview.png new file mode 100644 index 0000000000..a9c0d9df30 Binary files /dev/null and b/images/pe/mqtt-broker/getting-started/broker-session-details-preview.png differ diff --git a/images/pe/mqtt-broker/getting-started/broker-session-details.png b/images/pe/mqtt-broker/getting-started/broker-session-details.png new file mode 100644 index 0000000000..20be669024 Binary files /dev/null and b/images/pe/mqtt-broker/getting-started/broker-session-details.png differ diff --git a/images/pe/mqtt-broker/getting-started/broker-session-preview.png b/images/pe/mqtt-broker/getting-started/broker-session-preview.png new file mode 100644 index 0000000000..febfb5153d Binary files /dev/null and b/images/pe/mqtt-broker/getting-started/broker-session-preview.png differ diff --git a/images/pe/mqtt-broker/getting-started/broker-session.png b/images/pe/mqtt-broker/getting-started/broker-session.png new file mode 100644 index 0000000000..f0fc199496 Binary files /dev/null and b/images/pe/mqtt-broker/getting-started/broker-session.png differ diff --git a/images/pe/mqtt-broker/getting-started/gs-check-connectivity-1-preview.png b/images/pe/mqtt-broker/getting-started/gs-check-connectivity-1-preview.png new file mode 100644 index 0000000000..78ae0d433c Binary files /dev/null and b/images/pe/mqtt-broker/getting-started/gs-check-connectivity-1-preview.png differ diff --git a/images/pe/mqtt-broker/getting-started/gs-check-connectivity-1.png b/images/pe/mqtt-broker/getting-started/gs-check-connectivity-1.png new file mode 100644 index 0000000000..0d05088aca Binary files /dev/null and b/images/pe/mqtt-broker/getting-started/gs-check-connectivity-1.png differ diff --git a/images/pe/mqtt-broker/getting-started/gs-check-connectivity-2-preview.png b/images/pe/mqtt-broker/getting-started/gs-check-connectivity-2-preview.png new file mode 100644 index 0000000000..a3f56c0c6e Binary files /dev/null and b/images/pe/mqtt-broker/getting-started/gs-check-connectivity-2-preview.png differ diff --git a/images/pe/mqtt-broker/getting-started/gs-check-connectivity-2.png b/images/pe/mqtt-broker/getting-started/gs-check-connectivity-2.png new file mode 100644 index 0000000000..38e12b7553 Binary files /dev/null and b/images/pe/mqtt-broker/getting-started/gs-check-connectivity-2.png differ diff --git a/images/pe/mqtt-broker/getting-started/gs-check-connectivity-3-preview.png b/images/pe/mqtt-broker/getting-started/gs-check-connectivity-3-preview.png new file mode 100644 index 0000000000..ed230bd11e Binary files /dev/null and b/images/pe/mqtt-broker/getting-started/gs-check-connectivity-3-preview.png differ diff --git a/images/pe/mqtt-broker/getting-started/gs-check-connectivity-3.png b/images/pe/mqtt-broker/getting-started/gs-check-connectivity-3.png new file mode 100644 index 0000000000..91a322b12d Binary files /dev/null and b/images/pe/mqtt-broker/getting-started/gs-check-connectivity-3.png differ diff --git a/images/pe/mqtt-broker/other/blocked-clients.png b/images/pe/mqtt-broker/other/blocked-clients.png new file mode 100644 index 0000000000..160c8625b9 Binary files /dev/null and b/images/pe/mqtt-broker/other/blocked-clients.png differ diff --git a/images/pe/mqtt-broker/security/adding-new-domain-1-preview.png b/images/pe/mqtt-broker/security/adding-new-domain-1-preview.png new file mode 100644 index 0000000000..dc9a7b51b9 Binary files /dev/null and b/images/pe/mqtt-broker/security/adding-new-domain-1-preview.png differ diff --git a/images/pe/mqtt-broker/security/adding-new-domain-1.png b/images/pe/mqtt-broker/security/adding-new-domain-1.png new file mode 100644 index 0000000000..e5be84b2e1 Binary files /dev/null and b/images/pe/mqtt-broker/security/adding-new-domain-1.png differ diff --git a/images/pe/mqtt-broker/security/adding-new-domain-2-preview.png b/images/pe/mqtt-broker/security/adding-new-domain-2-preview.png new file mode 100644 index 0000000000..6eff49a647 Binary files /dev/null and b/images/pe/mqtt-broker/security/adding-new-domain-2-preview.png differ diff --git a/images/pe/mqtt-broker/security/adding-new-domain-2.png b/images/pe/mqtt-broker/security/adding-new-domain-2.png new file mode 100644 index 0000000000..961a014608 Binary files /dev/null and b/images/pe/mqtt-broker/security/adding-new-domain-2.png differ diff --git a/images/pe/mqtt-broker/security/adding-new-domain-3-preview.png b/images/pe/mqtt-broker/security/adding-new-domain-3-preview.png new file mode 100644 index 0000000000..99bdf02f77 Binary files /dev/null and b/images/pe/mqtt-broker/security/adding-new-domain-3-preview.png differ diff --git a/images/pe/mqtt-broker/security/adding-new-domain-3.png b/images/pe/mqtt-broker/security/adding-new-domain-3.png new file mode 100644 index 0000000000..8104644e28 Binary files /dev/null and b/images/pe/mqtt-broker/security/adding-new-domain-3.png differ diff --git a/images/pe/mqtt-broker/security/auth-providers/authentication-settings-preview.png b/images/pe/mqtt-broker/security/auth-providers/authentication-settings-preview.png new file mode 100644 index 0000000000..09966d6812 Binary files /dev/null and b/images/pe/mqtt-broker/security/auth-providers/authentication-settings-preview.png differ diff --git a/images/pe/mqtt-broker/security/auth-providers/authentication-settings.png b/images/pe/mqtt-broker/security/auth-providers/authentication-settings.png new file mode 100644 index 0000000000..786e67cd31 Binary files /dev/null and b/images/pe/mqtt-broker/security/auth-providers/authentication-settings.png differ diff --git a/images/pe/mqtt-broker/security/auth-providers/basic/auth-client-id-username-and-password-preview.png b/images/pe/mqtt-broker/security/auth-providers/basic/auth-client-id-username-and-password-preview.png new file mode 100644 index 0000000000..08f8a5ab79 Binary files /dev/null and b/images/pe/mqtt-broker/security/auth-providers/basic/auth-client-id-username-and-password-preview.png differ diff --git a/images/pe/mqtt-broker/security/auth-providers/basic/auth-client-id-username-and-password.png b/images/pe/mqtt-broker/security/auth-providers/basic/auth-client-id-username-and-password.png new file mode 100644 index 0000000000..a90892ced7 Binary files /dev/null and b/images/pe/mqtt-broker/security/auth-providers/basic/auth-client-id-username-and-password.png differ diff --git a/images/pe/mqtt-broker/security/auth-providers/basic/basic-overview-preview.png b/images/pe/mqtt-broker/security/auth-providers/basic/basic-overview-preview.png new file mode 100644 index 0000000000..72070c366a Binary files /dev/null and b/images/pe/mqtt-broker/security/auth-providers/basic/basic-overview-preview.png differ diff --git a/images/pe/mqtt-broker/security/auth-providers/basic/basic-overview.png b/images/pe/mqtt-broker/security/auth-providers/basic/basic-overview.png new file mode 100644 index 0000000000..a0bd6e09eb Binary files /dev/null and b/images/pe/mqtt-broker/security/auth-providers/basic/basic-overview.png differ diff --git a/images/pe/mqtt-broker/security/auth-providers/basic/tls-auth-client-id-username-and-password-preview.png b/images/pe/mqtt-broker/security/auth-providers/basic/tls-auth-client-id-username-and-password-preview.png new file mode 100644 index 0000000000..53ab8d6e76 Binary files /dev/null and b/images/pe/mqtt-broker/security/auth-providers/basic/tls-auth-client-id-username-and-password-preview.png differ diff --git a/images/pe/mqtt-broker/security/auth-providers/basic/tls-auth-client-id-username-and-password.png b/images/pe/mqtt-broker/security/auth-providers/basic/tls-auth-client-id-username-and-password.png new file mode 100644 index 0000000000..c77d95daeb Binary files /dev/null and b/images/pe/mqtt-broker/security/auth-providers/basic/tls-auth-client-id-username-and-password.png differ diff --git a/images/pe/mqtt-broker/security/auth-providers/jwt/configure-auth-claims-preview.png b/images/pe/mqtt-broker/security/auth-providers/jwt/configure-auth-claims-preview.png new file mode 100644 index 0000000000..c3e8c4f233 Binary files /dev/null and b/images/pe/mqtt-broker/security/auth-providers/jwt/configure-auth-claims-preview.png differ diff --git a/images/pe/mqtt-broker/security/auth-providers/jwt/configure-auth-claims.png b/images/pe/mqtt-broker/security/auth-providers/jwt/configure-auth-claims.png new file mode 100644 index 0000000000..9531dbfe5c Binary files /dev/null and b/images/pe/mqtt-broker/security/auth-providers/jwt/configure-auth-claims.png differ diff --git a/images/pe/mqtt-broker/security/auth-providers/jwt/configure-client-type-preview.png b/images/pe/mqtt-broker/security/auth-providers/jwt/configure-client-type-preview.png new file mode 100644 index 0000000000..d40c521741 Binary files /dev/null and b/images/pe/mqtt-broker/security/auth-providers/jwt/configure-client-type-preview.png differ diff --git a/images/pe/mqtt-broker/security/auth-providers/jwt/configure-client-type.png b/images/pe/mqtt-broker/security/auth-providers/jwt/configure-client-type.png new file mode 100644 index 0000000000..9ccef82571 Binary files /dev/null and b/images/pe/mqtt-broker/security/auth-providers/jwt/configure-client-type.png differ diff --git a/images/pe/mqtt-broker/security/auth-providers/jwt/configure-hmac-based-verifier-mechanism-preview.png b/images/pe/mqtt-broker/security/auth-providers/jwt/configure-hmac-based-verifier-mechanism-preview.png new file mode 100644 index 0000000000..76f39c69e5 Binary files /dev/null and b/images/pe/mqtt-broker/security/auth-providers/jwt/configure-hmac-based-verifier-mechanism-preview.png differ diff --git a/images/pe/mqtt-broker/security/auth-providers/jwt/configure-hmac-based-verifier-mechanism.png b/images/pe/mqtt-broker/security/auth-providers/jwt/configure-hmac-based-verifier-mechanism.png new file mode 100644 index 0000000000..0c281cdd66 Binary files /dev/null and b/images/pe/mqtt-broker/security/auth-providers/jwt/configure-hmac-based-verifier-mechanism.png differ diff --git a/images/pe/mqtt-broker/security/auth-providers/jwt/configure-jwks-based-verifier-mechanism-0-preview.png b/images/pe/mqtt-broker/security/auth-providers/jwt/configure-jwks-based-verifier-mechanism-0-preview.png new file mode 100644 index 0000000000..ab02c79ba1 Binary files /dev/null and b/images/pe/mqtt-broker/security/auth-providers/jwt/configure-jwks-based-verifier-mechanism-0-preview.png differ diff --git a/images/pe/mqtt-broker/security/auth-providers/jwt/configure-jwks-based-verifier-mechanism-0.png b/images/pe/mqtt-broker/security/auth-providers/jwt/configure-jwks-based-verifier-mechanism-0.png new file mode 100644 index 0000000000..f3d137ff6b Binary files /dev/null and b/images/pe/mqtt-broker/security/auth-providers/jwt/configure-jwks-based-verifier-mechanism-0.png differ diff --git a/images/pe/mqtt-broker/security/auth-providers/jwt/configure-jwks-based-verifier-mechanism-1-preview.png b/images/pe/mqtt-broker/security/auth-providers/jwt/configure-jwks-based-verifier-mechanism-1-preview.png new file mode 100644 index 0000000000..c494bb6455 Binary files /dev/null and b/images/pe/mqtt-broker/security/auth-providers/jwt/configure-jwks-based-verifier-mechanism-1-preview.png differ diff --git a/images/pe/mqtt-broker/security/auth-providers/jwt/configure-jwks-based-verifier-mechanism-1.png b/images/pe/mqtt-broker/security/auth-providers/jwt/configure-jwks-based-verifier-mechanism-1.png new file mode 100644 index 0000000000..37c0ff0d1f Binary files /dev/null and b/images/pe/mqtt-broker/security/auth-providers/jwt/configure-jwks-based-verifier-mechanism-1.png differ diff --git a/images/pe/mqtt-broker/security/auth-providers/jwt/configure-jwks-based-verifier-mechanism-2-preview.png b/images/pe/mqtt-broker/security/auth-providers/jwt/configure-jwks-based-verifier-mechanism-2-preview.png new file mode 100644 index 0000000000..e7b1128a31 Binary files /dev/null and b/images/pe/mqtt-broker/security/auth-providers/jwt/configure-jwks-based-verifier-mechanism-2-preview.png differ diff --git a/images/pe/mqtt-broker/security/auth-providers/jwt/configure-jwks-based-verifier-mechanism-2.png b/images/pe/mqtt-broker/security/auth-providers/jwt/configure-jwks-based-verifier-mechanism-2.png new file mode 100644 index 0000000000..451444b5b2 Binary files /dev/null and b/images/pe/mqtt-broker/security/auth-providers/jwt/configure-jwks-based-verifier-mechanism-2.png differ diff --git a/images/pe/mqtt-broker/security/auth-providers/jwt/configure-jwks-based-verifier-mechanism-3-preview.png b/images/pe/mqtt-broker/security/auth-providers/jwt/configure-jwks-based-verifier-mechanism-3-preview.png new file mode 100644 index 0000000000..3ab4403013 Binary files /dev/null and b/images/pe/mqtt-broker/security/auth-providers/jwt/configure-jwks-based-verifier-mechanism-3-preview.png differ diff --git a/images/pe/mqtt-broker/security/auth-providers/jwt/configure-jwks-based-verifier-mechanism-3.png b/images/pe/mqtt-broker/security/auth-providers/jwt/configure-jwks-based-verifier-mechanism-3.png new file mode 100644 index 0000000000..bb629cfd1a Binary files /dev/null and b/images/pe/mqtt-broker/security/auth-providers/jwt/configure-jwks-based-verifier-mechanism-3.png differ diff --git a/images/pe/mqtt-broker/security/auth-providers/jwt/configure-jwt-auth-provider-preview.png b/images/pe/mqtt-broker/security/auth-providers/jwt/configure-jwt-auth-provider-preview.png new file mode 100644 index 0000000000..94fc8e567c Binary files /dev/null and b/images/pe/mqtt-broker/security/auth-providers/jwt/configure-jwt-auth-provider-preview.png differ diff --git a/images/pe/mqtt-broker/security/auth-providers/jwt/configure-jwt-auth-provider.png b/images/pe/mqtt-broker/security/auth-providers/jwt/configure-jwt-auth-provider.png new file mode 100644 index 0000000000..29aa3a9fa6 Binary files /dev/null and b/images/pe/mqtt-broker/security/auth-providers/jwt/configure-jwt-auth-provider.png differ diff --git a/images/pe/mqtt-broker/security/auth-providers/jwt/configure-jwt-authorization-preview.png b/images/pe/mqtt-broker/security/auth-providers/jwt/configure-jwt-authorization-preview.png new file mode 100644 index 0000000000..7302f80c98 Binary files /dev/null and b/images/pe/mqtt-broker/security/auth-providers/jwt/configure-jwt-authorization-preview.png differ diff --git a/images/pe/mqtt-broker/security/auth-providers/jwt/configure-jwt-authorization.png b/images/pe/mqtt-broker/security/auth-providers/jwt/configure-jwt-authorization.png new file mode 100644 index 0000000000..1f6c29ba0f Binary files /dev/null and b/images/pe/mqtt-broker/security/auth-providers/jwt/configure-jwt-authorization.png differ diff --git a/images/pe/mqtt-broker/security/auth-providers/jwt/configure-pem-based-verifier-mechanism-preview.png b/images/pe/mqtt-broker/security/auth-providers/jwt/configure-pem-based-verifier-mechanism-preview.png new file mode 100644 index 0000000000..146ae5306f Binary files /dev/null and b/images/pe/mqtt-broker/security/auth-providers/jwt/configure-pem-based-verifier-mechanism-preview.png differ diff --git a/images/pe/mqtt-broker/security/auth-providers/jwt/configure-pem-based-verifier-mechanism.png b/images/pe/mqtt-broker/security/auth-providers/jwt/configure-pem-based-verifier-mechanism.png new file mode 100644 index 0000000000..6cb515232d Binary files /dev/null and b/images/pe/mqtt-broker/security/auth-providers/jwt/configure-pem-based-verifier-mechanism.png differ diff --git a/images/pe/mqtt-broker/security/auth-providers/jwt/configure-signature-verifier-mechanism-preview.png b/images/pe/mqtt-broker/security/auth-providers/jwt/configure-signature-verifier-mechanism-preview.png new file mode 100644 index 0000000000..6f4e142c35 Binary files /dev/null and b/images/pe/mqtt-broker/security/auth-providers/jwt/configure-signature-verifier-mechanism-preview.png differ diff --git a/images/pe/mqtt-broker/security/auth-providers/jwt/configure-signature-verifier-mechanism.png b/images/pe/mqtt-broker/security/auth-providers/jwt/configure-signature-verifier-mechanism.png new file mode 100644 index 0000000000..75fefa7b8a Binary files /dev/null and b/images/pe/mqtt-broker/security/auth-providers/jwt/configure-signature-verifier-mechanism.png differ diff --git a/images/pe/mqtt-broker/security/auth-providers/jwt/enable-and-save-jwt-provider-preview.png b/images/pe/mqtt-broker/security/auth-providers/jwt/enable-and-save-jwt-provider-preview.png new file mode 100644 index 0000000000..c176e42faa Binary files /dev/null and b/images/pe/mqtt-broker/security/auth-providers/jwt/enable-and-save-jwt-provider-preview.png differ diff --git a/images/pe/mqtt-broker/security/auth-providers/jwt/enable-and-save-jwt-provider.png b/images/pe/mqtt-broker/security/auth-providers/jwt/enable-and-save-jwt-provider.png new file mode 100644 index 0000000000..944f8e555b Binary files /dev/null and b/images/pe/mqtt-broker/security/auth-providers/jwt/enable-and-save-jwt-provider.png differ diff --git a/images/pe/mqtt-broker/security/auth-providers/jwt/jwt-mqtt-example-preview.png b/images/pe/mqtt-broker/security/auth-providers/jwt/jwt-mqtt-example-preview.png new file mode 100644 index 0000000000..a618b2e0f6 Binary files /dev/null and b/images/pe/mqtt-broker/security/auth-providers/jwt/jwt-mqtt-example-preview.png differ diff --git a/images/pe/mqtt-broker/security/auth-providers/jwt/jwt-mqtt-example.png b/images/pe/mqtt-broker/security/auth-providers/jwt/jwt-mqtt-example.png new file mode 100644 index 0000000000..5b4bf7ff28 Binary files /dev/null and b/images/pe/mqtt-broker/security/auth-providers/jwt/jwt-mqtt-example.png differ diff --git a/images/pe/mqtt-broker/security/auth-providers/jwt/jwt-mqtts-example-preview.png b/images/pe/mqtt-broker/security/auth-providers/jwt/jwt-mqtts-example-preview.png new file mode 100644 index 0000000000..3cb64b6262 Binary files /dev/null and b/images/pe/mqtt-broker/security/auth-providers/jwt/jwt-mqtts-example-preview.png differ diff --git a/images/pe/mqtt-broker/security/auth-providers/jwt/jwt-mqtts-example.png b/images/pe/mqtt-broker/security/auth-providers/jwt/jwt-mqtts-example.png new file mode 100644 index 0000000000..baa997e537 Binary files /dev/null and b/images/pe/mqtt-broker/security/auth-providers/jwt/jwt-mqtts-example.png differ diff --git a/images/pe/mqtt-broker/security/auth-providers/provider-home-switch-preview.png b/images/pe/mqtt-broker/security/auth-providers/provider-home-switch-preview.png new file mode 100644 index 0000000000..ddceec170b Binary files /dev/null and b/images/pe/mqtt-broker/security/auth-providers/provider-home-switch-preview.png differ diff --git a/images/pe/mqtt-broker/security/auth-providers/provider-home-switch.png b/images/pe/mqtt-broker/security/auth-providers/provider-home-switch.png new file mode 100644 index 0000000000..63069e52a6 Binary files /dev/null and b/images/pe/mqtt-broker/security/auth-providers/provider-home-switch.png differ diff --git a/images/pe/mqtt-broker/security/auth-providers/provider-table-switch-preview.png b/images/pe/mqtt-broker/security/auth-providers/provider-table-switch-preview.png new file mode 100644 index 0000000000..b29bf47849 Binary files /dev/null and b/images/pe/mqtt-broker/security/auth-providers/provider-table-switch-preview.png differ diff --git a/images/pe/mqtt-broker/security/auth-providers/provider-table-switch.png b/images/pe/mqtt-broker/security/auth-providers/provider-table-switch.png new file mode 100644 index 0000000000..7e0b211cfc Binary files /dev/null and b/images/pe/mqtt-broker/security/auth-providers/provider-table-switch.png differ diff --git a/images/pe/mqtt-broker/security/auth-providers/x509/x509-overview-preview.png b/images/pe/mqtt-broker/security/auth-providers/x509/x509-overview-preview.png new file mode 100644 index 0000000000..093310acee Binary files /dev/null and b/images/pe/mqtt-broker/security/auth-providers/x509/x509-overview-preview.png differ diff --git a/images/pe/mqtt-broker/security/auth-providers/x509/x509-overview.png b/images/pe/mqtt-broker/security/auth-providers/x509/x509-overview.png new file mode 100644 index 0000000000..c327f28674 Binary files /dev/null and b/images/pe/mqtt-broker/security/auth-providers/x509/x509-overview.png differ diff --git a/images/pe/mqtt-broker/security/delete-domain-1-preview.png b/images/pe/mqtt-broker/security/delete-domain-1-preview.png new file mode 100644 index 0000000000..9978d9c801 Binary files /dev/null and b/images/pe/mqtt-broker/security/delete-domain-1-preview.png differ diff --git a/images/pe/mqtt-broker/security/delete-domain-1.png b/images/pe/mqtt-broker/security/delete-domain-1.png new file mode 100644 index 0000000000..cd3e411b3a Binary files /dev/null and b/images/pe/mqtt-broker/security/delete-domain-1.png differ diff --git a/images/pe/mqtt-broker/security/delete-domain-2-preview.png b/images/pe/mqtt-broker/security/delete-domain-2-preview.png new file mode 100644 index 0000000000..88132470e2 Binary files /dev/null and b/images/pe/mqtt-broker/security/delete-domain-2-preview.png differ diff --git a/images/pe/mqtt-broker/security/delete-domain-2.png b/images/pe/mqtt-broker/security/delete-domain-2.png new file mode 100644 index 0000000000..bc42613f24 Binary files /dev/null and b/images/pe/mqtt-broker/security/delete-domain-2.png differ diff --git a/images/pe/mqtt-broker/security/domain-details-1-preview.png b/images/pe/mqtt-broker/security/domain-details-1-preview.png new file mode 100644 index 0000000000..35abf4f62a Binary files /dev/null and b/images/pe/mqtt-broker/security/domain-details-1-preview.png differ diff --git a/images/pe/mqtt-broker/security/domain-details-1.png b/images/pe/mqtt-broker/security/domain-details-1.png new file mode 100644 index 0000000000..c92db406f9 Binary files /dev/null and b/images/pe/mqtt-broker/security/domain-details-1.png differ diff --git a/images/pe/mqtt-broker/security/domain-details-2-preview.png b/images/pe/mqtt-broker/security/domain-details-2-preview.png new file mode 100644 index 0000000000..4792793266 Binary files /dev/null and b/images/pe/mqtt-broker/security/domain-details-2-preview.png differ diff --git a/images/pe/mqtt-broker/security/domain-details-2.png b/images/pe/mqtt-broker/security/domain-details-2.png new file mode 100644 index 0000000000..9e2bd1a377 Binary files /dev/null and b/images/pe/mqtt-broker/security/domain-details-2.png differ diff --git a/images/pe/mqtt-broker/security/domain-login-1-preview.png b/images/pe/mqtt-broker/security/domain-login-1-preview.png new file mode 100644 index 0000000000..ff3e865ff4 Binary files /dev/null and b/images/pe/mqtt-broker/security/domain-login-1-preview.png differ diff --git a/images/pe/mqtt-broker/security/domain-login-1.png b/images/pe/mqtt-broker/security/domain-login-1.png new file mode 100644 index 0000000000..90704ab1c9 Binary files /dev/null and b/images/pe/mqtt-broker/security/domain-login-1.png differ diff --git a/images/pe/mqtt-broker/user-guide/integrations/how-to-connect-tbqm-to-thingsboard/tbmq-add-client-credentials-1-pe-preview.png b/images/pe/mqtt-broker/user-guide/integrations/how-to-connect-tbqm-to-thingsboard/tbmq-add-client-credentials-1-pe-preview.png new file mode 100644 index 0000000000..a12eedf8f9 Binary files /dev/null and b/images/pe/mqtt-broker/user-guide/integrations/how-to-connect-tbqm-to-thingsboard/tbmq-add-client-credentials-1-pe-preview.png differ diff --git a/images/pe/mqtt-broker/user-guide/integrations/how-to-connect-tbqm-to-thingsboard/tbmq-add-client-credentials-1-pe.png b/images/pe/mqtt-broker/user-guide/integrations/how-to-connect-tbqm-to-thingsboard/tbmq-add-client-credentials-1-pe.png new file mode 100644 index 0000000000..f5eb52dd54 Binary files /dev/null and b/images/pe/mqtt-broker/user-guide/integrations/how-to-connect-tbqm-to-thingsboard/tbmq-add-client-credentials-1-pe.png differ diff --git a/images/pe/mqtt-broker/user-guide/integrations/how-to-connect-tbqm-to-thingsboard/tbmq-add-client-credentials-2-pe-preview.png b/images/pe/mqtt-broker/user-guide/integrations/how-to-connect-tbqm-to-thingsboard/tbmq-add-client-credentials-2-pe-preview.png new file mode 100644 index 0000000000..2f7a76bef7 Binary files /dev/null and b/images/pe/mqtt-broker/user-guide/integrations/how-to-connect-tbqm-to-thingsboard/tbmq-add-client-credentials-2-pe-preview.png differ diff --git a/images/pe/mqtt-broker/user-guide/integrations/how-to-connect-tbqm-to-thingsboard/tbmq-add-client-credentials-2-pe.png b/images/pe/mqtt-broker/user-guide/integrations/how-to-connect-tbqm-to-thingsboard/tbmq-add-client-credentials-2-pe.png new file mode 100644 index 0000000000..db6a95e72e Binary files /dev/null and b/images/pe/mqtt-broker/user-guide/integrations/how-to-connect-tbqm-to-thingsboard/tbmq-add-client-credentials-2-pe.png differ diff --git a/images/pe/mqtt-broker/user-guide/integrations/how-to-connect-tbqm-to-thingsboard/tbmq-add-client-credentials-3-pe-preview.png b/images/pe/mqtt-broker/user-guide/integrations/how-to-connect-tbqm-to-thingsboard/tbmq-add-client-credentials-3-pe-preview.png new file mode 100644 index 0000000000..2beff2ace8 Binary files /dev/null and b/images/pe/mqtt-broker/user-guide/integrations/how-to-connect-tbqm-to-thingsboard/tbmq-add-client-credentials-3-pe-preview.png differ diff --git a/images/pe/mqtt-broker/user-guide/integrations/how-to-connect-tbqm-to-thingsboard/tbmq-add-client-credentials-3-pe.png b/images/pe/mqtt-broker/user-guide/integrations/how-to-connect-tbqm-to-thingsboard/tbmq-add-client-credentials-3-pe.png new file mode 100644 index 0000000000..0922dcfb93 Binary files /dev/null and b/images/pe/mqtt-broker/user-guide/integrations/how-to-connect-tbqm-to-thingsboard/tbmq-add-client-credentials-3-pe.png differ diff --git a/images/pe/mqtt-broker/user-guide/integrations/how-to-connect-tbqm-to-thingsboard/tbmq-add-client-credentials-4-pe-preview.png b/images/pe/mqtt-broker/user-guide/integrations/how-to-connect-tbqm-to-thingsboard/tbmq-add-client-credentials-4-pe-preview.png new file mode 100644 index 0000000000..3f9720fdca Binary files /dev/null and b/images/pe/mqtt-broker/user-guide/integrations/how-to-connect-tbqm-to-thingsboard/tbmq-add-client-credentials-4-pe-preview.png differ diff --git a/images/pe/mqtt-broker/user-guide/integrations/how-to-connect-tbqm-to-thingsboard/tbmq-add-client-credentials-4-pe.png b/images/pe/mqtt-broker/user-guide/integrations/how-to-connect-tbqm-to-thingsboard/tbmq-add-client-credentials-4-pe.png new file mode 100644 index 0000000000..7bb0fcf978 Binary files /dev/null and b/images/pe/mqtt-broker/user-guide/integrations/how-to-connect-tbqm-to-thingsboard/tbmq-add-client-credentials-4-pe.png differ diff --git a/images/pe/mqtt-broker/user-guide/integrations/how-to-connect-tbqm-to-thingsboard/tbmq-home-page-1-pe-preview.png b/images/pe/mqtt-broker/user-guide/integrations/how-to-connect-tbqm-to-thingsboard/tbmq-home-page-1-pe-preview.png new file mode 100644 index 0000000000..e93d6d6482 Binary files /dev/null and b/images/pe/mqtt-broker/user-guide/integrations/how-to-connect-tbqm-to-thingsboard/tbmq-home-page-1-pe-preview.png differ diff --git a/images/pe/mqtt-broker/user-guide/integrations/how-to-connect-tbqm-to-thingsboard/tbmq-home-page-1-pe.png b/images/pe/mqtt-broker/user-guide/integrations/how-to-connect-tbqm-to-thingsboard/tbmq-home-page-1-pe.png new file mode 100644 index 0000000000..78fca55205 Binary files /dev/null and b/images/pe/mqtt-broker/user-guide/integrations/how-to-connect-tbqm-to-thingsboard/tbmq-home-page-1-pe.png differ diff --git a/images/pe/mqtt-broker/user-guide/integrations/how-to-connect-tbqm-to-thingsboard/tbmq-sessions-1-pe-preview.png b/images/pe/mqtt-broker/user-guide/integrations/how-to-connect-tbqm-to-thingsboard/tbmq-sessions-1-pe-preview.png new file mode 100644 index 0000000000..c16e15be36 Binary files /dev/null and b/images/pe/mqtt-broker/user-guide/integrations/how-to-connect-tbqm-to-thingsboard/tbmq-sessions-1-pe-preview.png differ diff --git a/images/pe/mqtt-broker/user-guide/integrations/how-to-connect-tbqm-to-thingsboard/tbmq-sessions-1-pe.png b/images/pe/mqtt-broker/user-guide/integrations/how-to-connect-tbqm-to-thingsboard/tbmq-sessions-1-pe.png new file mode 100644 index 0000000000..c846a3bebb Binary files /dev/null and b/images/pe/mqtt-broker/user-guide/integrations/how-to-connect-tbqm-to-thingsboard/tbmq-sessions-1-pe.png differ diff --git a/images/pe/mqtt-broker/user-guide/oauth-2-support/adding-domain-1-preview.png b/images/pe/mqtt-broker/user-guide/oauth-2-support/adding-domain-1-preview.png new file mode 100644 index 0000000000..b982d2593d Binary files /dev/null and b/images/pe/mqtt-broker/user-guide/oauth-2-support/adding-domain-1-preview.png differ diff --git a/images/pe/mqtt-broker/user-guide/oauth-2-support/adding-domain-1.png b/images/pe/mqtt-broker/user-guide/oauth-2-support/adding-domain-1.png new file mode 100644 index 0000000000..a7d053c263 Binary files /dev/null and b/images/pe/mqtt-broker/user-guide/oauth-2-support/adding-domain-1.png differ diff --git a/images/pe/mqtt-broker/user-guide/oauth-2-support/adding-domain-2-preview.png b/images/pe/mqtt-broker/user-guide/oauth-2-support/adding-domain-2-preview.png new file mode 100644 index 0000000000..eb1d454eb1 Binary files /dev/null and b/images/pe/mqtt-broker/user-guide/oauth-2-support/adding-domain-2-preview.png differ diff --git a/images/pe/mqtt-broker/user-guide/oauth-2-support/adding-domain-2.png b/images/pe/mqtt-broker/user-guide/oauth-2-support/adding-domain-2.png new file mode 100644 index 0000000000..683b045c23 Binary files /dev/null and b/images/pe/mqtt-broker/user-guide/oauth-2-support/adding-domain-2.png differ diff --git a/images/pe/mqtt-broker/user-guide/oauth-2-support/adding-oauth2-client-1-preview.png b/images/pe/mqtt-broker/user-guide/oauth-2-support/adding-oauth2-client-1-preview.png new file mode 100644 index 0000000000..d5b0d10770 Binary files /dev/null and b/images/pe/mqtt-broker/user-guide/oauth-2-support/adding-oauth2-client-1-preview.png differ diff --git a/images/pe/mqtt-broker/user-guide/oauth-2-support/adding-oauth2-client-1.png b/images/pe/mqtt-broker/user-guide/oauth-2-support/adding-oauth2-client-1.png new file mode 100644 index 0000000000..528fe46b5f Binary files /dev/null and b/images/pe/mqtt-broker/user-guide/oauth-2-support/adding-oauth2-client-1.png differ diff --git a/images/pe/mqtt-broker/user-guide/oauth-2-support/adding-oauth2-client-2-preview.png b/images/pe/mqtt-broker/user-guide/oauth-2-support/adding-oauth2-client-2-preview.png new file mode 100644 index 0000000000..4b39a1d562 Binary files /dev/null and b/images/pe/mqtt-broker/user-guide/oauth-2-support/adding-oauth2-client-2-preview.png differ diff --git a/images/pe/mqtt-broker/user-guide/oauth-2-support/adding-oauth2-client-2.png b/images/pe/mqtt-broker/user-guide/oauth-2-support/adding-oauth2-client-2.png new file mode 100644 index 0000000000..cc23cafbc6 Binary files /dev/null and b/images/pe/mqtt-broker/user-guide/oauth-2-support/adding-oauth2-client-2.png differ diff --git a/images/pe/mqtt-broker/user-guide/oauth-2-support/adding-oauth2-client-3-preview.png b/images/pe/mqtt-broker/user-guide/oauth-2-support/adding-oauth2-client-3-preview.png new file mode 100644 index 0000000000..6119d7363c Binary files /dev/null and b/images/pe/mqtt-broker/user-guide/oauth-2-support/adding-oauth2-client-3-preview.png differ diff --git a/images/pe/mqtt-broker/user-guide/oauth-2-support/adding-oauth2-client-3.png b/images/pe/mqtt-broker/user-guide/oauth-2-support/adding-oauth2-client-3.png new file mode 100644 index 0000000000..195cb09e6d Binary files /dev/null and b/images/pe/mqtt-broker/user-guide/oauth-2-support/adding-oauth2-client-3.png differ diff --git a/images/pe/mqtt-broker/user-guide/oauth-2-support/deleting-domain-1-preview.png b/images/pe/mqtt-broker/user-guide/oauth-2-support/deleting-domain-1-preview.png new file mode 100644 index 0000000000..4d3057fc5f Binary files /dev/null and b/images/pe/mqtt-broker/user-guide/oauth-2-support/deleting-domain-1-preview.png differ diff --git a/images/pe/mqtt-broker/user-guide/oauth-2-support/deleting-domain-1.png b/images/pe/mqtt-broker/user-guide/oauth-2-support/deleting-domain-1.png new file mode 100644 index 0000000000..0a57c04312 Binary files /dev/null and b/images/pe/mqtt-broker/user-guide/oauth-2-support/deleting-domain-1.png differ diff --git a/images/pe/mqtt-broker/user-guide/oauth-2-support/deleting-domain-2-preview.png b/images/pe/mqtt-broker/user-guide/oauth-2-support/deleting-domain-2-preview.png new file mode 100644 index 0000000000..83b5597d11 Binary files /dev/null and b/images/pe/mqtt-broker/user-guide/oauth-2-support/deleting-domain-2-preview.png differ diff --git a/images/pe/mqtt-broker/user-guide/oauth-2-support/deleting-domain-2.png b/images/pe/mqtt-broker/user-guide/oauth-2-support/deleting-domain-2.png new file mode 100644 index 0000000000..911b6daf6f Binary files /dev/null and b/images/pe/mqtt-broker/user-guide/oauth-2-support/deleting-domain-2.png differ diff --git a/images/pe/mqtt-broker/user-guide/oauth-2-support/deleting-oauth2-client-1-preview.png b/images/pe/mqtt-broker/user-guide/oauth-2-support/deleting-oauth2-client-1-preview.png new file mode 100644 index 0000000000..281cb347db Binary files /dev/null and b/images/pe/mqtt-broker/user-guide/oauth-2-support/deleting-oauth2-client-1-preview.png differ diff --git a/images/pe/mqtt-broker/user-guide/oauth-2-support/deleting-oauth2-client-1.png b/images/pe/mqtt-broker/user-guide/oauth-2-support/deleting-oauth2-client-1.png new file mode 100644 index 0000000000..f83b571def Binary files /dev/null and b/images/pe/mqtt-broker/user-guide/oauth-2-support/deleting-oauth2-client-1.png differ diff --git a/images/pe/mqtt-broker/user-guide/oauth-2-support/deleting-oauth2-client-2-preview.png b/images/pe/mqtt-broker/user-guide/oauth-2-support/deleting-oauth2-client-2-preview.png new file mode 100644 index 0000000000..dfaad8753c Binary files /dev/null and b/images/pe/mqtt-broker/user-guide/oauth-2-support/deleting-oauth2-client-2-preview.png differ diff --git a/images/pe/mqtt-broker/user-guide/oauth-2-support/deleting-oauth2-client-2.png b/images/pe/mqtt-broker/user-guide/oauth-2-support/deleting-oauth2-client-2.png new file mode 100644 index 0000000000..160148cc48 Binary files /dev/null and b/images/pe/mqtt-broker/user-guide/oauth-2-support/deleting-oauth2-client-2.png differ diff --git a/images/pe/mqtt-broker/user-guide/oauth-2-support/domain-details-1-preview.png b/images/pe/mqtt-broker/user-guide/oauth-2-support/domain-details-1-preview.png new file mode 100644 index 0000000000..35abf4f62a Binary files /dev/null and b/images/pe/mqtt-broker/user-guide/oauth-2-support/domain-details-1-preview.png differ diff --git a/images/pe/mqtt-broker/user-guide/oauth-2-support/domain-details-1.png b/images/pe/mqtt-broker/user-guide/oauth-2-support/domain-details-1.png new file mode 100644 index 0000000000..c92db406f9 Binary files /dev/null and b/images/pe/mqtt-broker/user-guide/oauth-2-support/domain-details-1.png differ diff --git a/images/pe/mqtt-broker/user-guide/oauth-2-support/google-configuration-of-thingsboard-1-preview.png b/images/pe/mqtt-broker/user-guide/oauth-2-support/google-configuration-of-thingsboard-1-preview.png new file mode 100644 index 0000000000..76ebdd8bee Binary files /dev/null and b/images/pe/mqtt-broker/user-guide/oauth-2-support/google-configuration-of-thingsboard-1-preview.png differ diff --git a/images/pe/mqtt-broker/user-guide/oauth-2-support/google-configuration-of-thingsboard-1.png b/images/pe/mqtt-broker/user-guide/oauth-2-support/google-configuration-of-thingsboard-1.png new file mode 100644 index 0000000000..b6159f5a8f Binary files /dev/null and b/images/pe/mqtt-broker/user-guide/oauth-2-support/google-configuration-of-thingsboard-1.png differ diff --git a/images/pe/mqtt-broker/user-guide/oauth-2-support/google-configuration-of-thingsboard-2-preview.png b/images/pe/mqtt-broker/user-guide/oauth-2-support/google-configuration-of-thingsboard-2-preview.png new file mode 100644 index 0000000000..2224617e67 Binary files /dev/null and b/images/pe/mqtt-broker/user-guide/oauth-2-support/google-configuration-of-thingsboard-2-preview.png differ diff --git a/images/pe/mqtt-broker/user-guide/oauth-2-support/google-configuration-of-thingsboard-2.png b/images/pe/mqtt-broker/user-guide/oauth-2-support/google-configuration-of-thingsboard-2.png new file mode 100644 index 0000000000..d3d28d978c Binary files /dev/null and b/images/pe/mqtt-broker/user-guide/oauth-2-support/google-configuration-of-thingsboard-2.png differ diff --git a/images/pe/mqtt-broker/user-guide/oauth-2-support/google-configuration-of-thingsboard-3-preview.png b/images/pe/mqtt-broker/user-guide/oauth-2-support/google-configuration-of-thingsboard-3-preview.png new file mode 100644 index 0000000000..b185bea8e3 Binary files /dev/null and b/images/pe/mqtt-broker/user-guide/oauth-2-support/google-configuration-of-thingsboard-3-preview.png differ diff --git a/images/pe/mqtt-broker/user-guide/oauth-2-support/google-configuration-of-thingsboard-3.png b/images/pe/mqtt-broker/user-guide/oauth-2-support/google-configuration-of-thingsboard-3.png new file mode 100644 index 0000000000..2c881b8f07 Binary files /dev/null and b/images/pe/mqtt-broker/user-guide/oauth-2-support/google-configuration-of-thingsboard-3.png differ diff --git a/images/pe/mqtt-broker/user-guide/oauth-2-support/google-configuration-of-thingsboard-4-preview.png b/images/pe/mqtt-broker/user-guide/oauth-2-support/google-configuration-of-thingsboard-4-preview.png new file mode 100644 index 0000000000..b9e56c649b Binary files /dev/null and b/images/pe/mqtt-broker/user-guide/oauth-2-support/google-configuration-of-thingsboard-4-preview.png differ diff --git a/images/pe/mqtt-broker/user-guide/oauth-2-support/google-configuration-of-thingsboard-4.png b/images/pe/mqtt-broker/user-guide/oauth-2-support/google-configuration-of-thingsboard-4.png new file mode 100644 index 0000000000..7e3c5fc074 Binary files /dev/null and b/images/pe/mqtt-broker/user-guide/oauth-2-support/google-configuration-of-thingsboard-4.png differ diff --git a/images/pe/mqtt-broker/user-guide/oauth-2-support/google-configuration-of-thingsboard-5-preview.png b/images/pe/mqtt-broker/user-guide/oauth-2-support/google-configuration-of-thingsboard-5-preview.png new file mode 100644 index 0000000000..c75482d0d7 Binary files /dev/null and b/images/pe/mqtt-broker/user-guide/oauth-2-support/google-configuration-of-thingsboard-5-preview.png differ diff --git a/images/pe/mqtt-broker/user-guide/oauth-2-support/google-configuration-of-thingsboard-5.png b/images/pe/mqtt-broker/user-guide/oauth-2-support/google-configuration-of-thingsboard-5.png new file mode 100644 index 0000000000..aa15cef553 Binary files /dev/null and b/images/pe/mqtt-broker/user-guide/oauth-2-support/google-configuration-of-thingsboard-5.png differ diff --git a/images/pe/mqtt-broker/user-guide/oauth-2-support/google-configuration-of-thingsboard-6-preview.png b/images/pe/mqtt-broker/user-guide/oauth-2-support/google-configuration-of-thingsboard-6-preview.png new file mode 100644 index 0000000000..662d0d00ad Binary files /dev/null and b/images/pe/mqtt-broker/user-guide/oauth-2-support/google-configuration-of-thingsboard-6-preview.png differ diff --git a/images/pe/mqtt-broker/user-guide/oauth-2-support/google-configuration-of-thingsboard-6.png b/images/pe/mqtt-broker/user-guide/oauth-2-support/google-configuration-of-thingsboard-6.png new file mode 100644 index 0000000000..a481cd5e8c Binary files /dev/null and b/images/pe/mqtt-broker/user-guide/oauth-2-support/google-configuration-of-thingsboard-6.png differ diff --git a/images/pe/mqtt-broker/user-guide/oauth-2-support/google-configuration-of-thingsboard-7-preview.png b/images/pe/mqtt-broker/user-guide/oauth-2-support/google-configuration-of-thingsboard-7-preview.png new file mode 100644 index 0000000000..5a42f673f1 Binary files /dev/null and b/images/pe/mqtt-broker/user-guide/oauth-2-support/google-configuration-of-thingsboard-7-preview.png differ diff --git a/images/pe/mqtt-broker/user-guide/oauth-2-support/google-configuration-of-thingsboard-7.png b/images/pe/mqtt-broker/user-guide/oauth-2-support/google-configuration-of-thingsboard-7.png new file mode 100644 index 0000000000..4a2a526058 Binary files /dev/null and b/images/pe/mqtt-broker/user-guide/oauth-2-support/google-configuration-of-thingsboard-7.png differ diff --git a/images/pe/mqtt-broker/user-guide/oauth-2-support/google-credentials-for-oauth-1-preview.png b/images/pe/mqtt-broker/user-guide/oauth-2-support/google-credentials-for-oauth-1-preview.png new file mode 100644 index 0000000000..9cf94c830d Binary files /dev/null and b/images/pe/mqtt-broker/user-guide/oauth-2-support/google-credentials-for-oauth-1-preview.png differ diff --git a/images/pe/mqtt-broker/user-guide/oauth-2-support/google-credentials-for-oauth-1.png b/images/pe/mqtt-broker/user-guide/oauth-2-support/google-credentials-for-oauth-1.png new file mode 100644 index 0000000000..d50a41434e Binary files /dev/null and b/images/pe/mqtt-broker/user-guide/oauth-2-support/google-credentials-for-oauth-1.png differ diff --git a/images/pe/mqtt-broker/user-guide/oauth-2-support/google-credentials-for-oauth-2-preview.png b/images/pe/mqtt-broker/user-guide/oauth-2-support/google-credentials-for-oauth-2-preview.png new file mode 100644 index 0000000000..45e0beb3e3 Binary files /dev/null and b/images/pe/mqtt-broker/user-guide/oauth-2-support/google-credentials-for-oauth-2-preview.png differ diff --git a/images/pe/mqtt-broker/user-guide/oauth-2-support/google-credentials-for-oauth-2.png b/images/pe/mqtt-broker/user-guide/oauth-2-support/google-credentials-for-oauth-2.png new file mode 100644 index 0000000000..66ab8f9438 Binary files /dev/null and b/images/pe/mqtt-broker/user-guide/oauth-2-support/google-credentials-for-oauth-2.png differ diff --git a/images/pe/mqtt-broker/user-guide/oauth-2-support/google-credentials-for-oauth-3-preview.png b/images/pe/mqtt-broker/user-guide/oauth-2-support/google-credentials-for-oauth-3-preview.png new file mode 100644 index 0000000000..58ad74b2f1 Binary files /dev/null and b/images/pe/mqtt-broker/user-guide/oauth-2-support/google-credentials-for-oauth-3-preview.png differ diff --git a/images/pe/mqtt-broker/user-guide/oauth-2-support/google-credentials-for-oauth-3.png b/images/pe/mqtt-broker/user-guide/oauth-2-support/google-credentials-for-oauth-3.png new file mode 100644 index 0000000000..94d127e5a0 Binary files /dev/null and b/images/pe/mqtt-broker/user-guide/oauth-2-support/google-credentials-for-oauth-3.png differ diff --git a/images/pe/mqtt-broker/user-guide/oauth-2-support/keycloak-adding-domain-1-preview.png b/images/pe/mqtt-broker/user-guide/oauth-2-support/keycloak-adding-domain-1-preview.png new file mode 100644 index 0000000000..a1a40f5032 Binary files /dev/null and b/images/pe/mqtt-broker/user-guide/oauth-2-support/keycloak-adding-domain-1-preview.png differ diff --git a/images/pe/mqtt-broker/user-guide/oauth-2-support/keycloak-adding-domain-1.png b/images/pe/mqtt-broker/user-guide/oauth-2-support/keycloak-adding-domain-1.png new file mode 100644 index 0000000000..c61a91aa18 Binary files /dev/null and b/images/pe/mqtt-broker/user-guide/oauth-2-support/keycloak-adding-domain-1.png differ diff --git a/images/pe/mqtt-broker/user-guide/oauth-2-support/keycloak-adding-domain-2-preview.png b/images/pe/mqtt-broker/user-guide/oauth-2-support/keycloak-adding-domain-2-preview.png new file mode 100644 index 0000000000..9a0a1b2978 Binary files /dev/null and b/images/pe/mqtt-broker/user-guide/oauth-2-support/keycloak-adding-domain-2-preview.png differ diff --git a/images/pe/mqtt-broker/user-guide/oauth-2-support/keycloak-adding-domain-2.png b/images/pe/mqtt-broker/user-guide/oauth-2-support/keycloak-adding-domain-2.png new file mode 100644 index 0000000000..151d6002aa Binary files /dev/null and b/images/pe/mqtt-broker/user-guide/oauth-2-support/keycloak-adding-domain-2.png differ diff --git a/images/pe/mqtt-broker/user-guide/oauth-2-support/keycloak-configuration-of-thingsboard-2-preview.png b/images/pe/mqtt-broker/user-guide/oauth-2-support/keycloak-configuration-of-thingsboard-2-preview.png new file mode 100644 index 0000000000..6a4e3e9f9b Binary files /dev/null and b/images/pe/mqtt-broker/user-guide/oauth-2-support/keycloak-configuration-of-thingsboard-2-preview.png differ diff --git a/images/pe/mqtt-broker/user-guide/oauth-2-support/keycloak-configuration-of-thingsboard-2.png b/images/pe/mqtt-broker/user-guide/oauth-2-support/keycloak-configuration-of-thingsboard-2.png new file mode 100644 index 0000000000..5d83073f26 Binary files /dev/null and b/images/pe/mqtt-broker/user-guide/oauth-2-support/keycloak-configuration-of-thingsboard-2.png differ diff --git a/images/pe/mqtt-broker/user-guide/oauth-2-support/keycloak-configuration-of-thingsboard-3-preview.png b/images/pe/mqtt-broker/user-guide/oauth-2-support/keycloak-configuration-of-thingsboard-3-preview.png new file mode 100644 index 0000000000..e89477d293 Binary files /dev/null and b/images/pe/mqtt-broker/user-guide/oauth-2-support/keycloak-configuration-of-thingsboard-3-preview.png differ diff --git a/images/pe/mqtt-broker/user-guide/oauth-2-support/keycloak-configuration-of-thingsboard-3.png b/images/pe/mqtt-broker/user-guide/oauth-2-support/keycloak-configuration-of-thingsboard-3.png new file mode 100644 index 0000000000..f94cb08679 Binary files /dev/null and b/images/pe/mqtt-broker/user-guide/oauth-2-support/keycloak-configuration-of-thingsboard-3.png differ diff --git a/images/pe/mqtt-broker/user-guide/oauth-2-support/keycloak-configuration-of-thingsboard-4-preview.png b/images/pe/mqtt-broker/user-guide/oauth-2-support/keycloak-configuration-of-thingsboard-4-preview.png new file mode 100644 index 0000000000..399c77b197 Binary files /dev/null and b/images/pe/mqtt-broker/user-guide/oauth-2-support/keycloak-configuration-of-thingsboard-4-preview.png differ diff --git a/images/pe/mqtt-broker/user-guide/oauth-2-support/keycloak-configuration-of-thingsboard-4.png b/images/pe/mqtt-broker/user-guide/oauth-2-support/keycloak-configuration-of-thingsboard-4.png new file mode 100644 index 0000000000..85ccef65a0 Binary files /dev/null and b/images/pe/mqtt-broker/user-guide/oauth-2-support/keycloak-configuration-of-thingsboard-4.png differ diff --git a/images/pe/mqtt-broker/user-guide/oauth-2-support/login-oauth-user-preview.png b/images/pe/mqtt-broker/user-guide/oauth-2-support/login-oauth-user-preview.png new file mode 100644 index 0000000000..5f88b2d6a1 Binary files /dev/null and b/images/pe/mqtt-broker/user-guide/oauth-2-support/login-oauth-user-preview.png differ diff --git a/images/pe/mqtt-broker/user-guide/oauth-2-support/login-oauth-user.png b/images/pe/mqtt-broker/user-guide/oauth-2-support/login-oauth-user.png new file mode 100644 index 0000000000..f3a1defc04 Binary files /dev/null and b/images/pe/mqtt-broker/user-guide/oauth-2-support/login-oauth-user.png differ diff --git a/images/pe/mqtt-broker/user-guide/oauth-2-support/login-with-google-1-preview.png b/images/pe/mqtt-broker/user-guide/oauth-2-support/login-with-google-1-preview.png new file mode 100644 index 0000000000..4c254ea8ed Binary files /dev/null and b/images/pe/mqtt-broker/user-guide/oauth-2-support/login-with-google-1-preview.png differ diff --git a/images/pe/mqtt-broker/user-guide/oauth-2-support/login-with-google-1.png b/images/pe/mqtt-broker/user-guide/oauth-2-support/login-with-google-1.png new file mode 100644 index 0000000000..d3ba969657 Binary files /dev/null and b/images/pe/mqtt-broker/user-guide/oauth-2-support/login-with-google-1.png differ diff --git a/images/pe/mqtt-broker/user-guide/oauth-2-support/login-with-google-2-preview.png b/images/pe/mqtt-broker/user-guide/oauth-2-support/login-with-google-2-preview.png new file mode 100644 index 0000000000..92573b66e1 Binary files /dev/null and b/images/pe/mqtt-broker/user-guide/oauth-2-support/login-with-google-2-preview.png differ diff --git a/images/pe/mqtt-broker/user-guide/oauth-2-support/login-with-google-2.png b/images/pe/mqtt-broker/user-guide/oauth-2-support/login-with-google-2.png new file mode 100644 index 0000000000..a1f2d57040 Binary files /dev/null and b/images/pe/mqtt-broker/user-guide/oauth-2-support/login-with-google-2.png differ diff --git a/images/pe/mqtt-broker/user-guide/oauth-2-support/login-with-keycloak-1-preview.png b/images/pe/mqtt-broker/user-guide/oauth-2-support/login-with-keycloak-1-preview.png new file mode 100644 index 0000000000..aec20b3f0a Binary files /dev/null and b/images/pe/mqtt-broker/user-guide/oauth-2-support/login-with-keycloak-1-preview.png differ diff --git a/images/pe/mqtt-broker/user-guide/oauth-2-support/login-with-keycloak-1.png b/images/pe/mqtt-broker/user-guide/oauth-2-support/login-with-keycloak-1.png new file mode 100644 index 0000000000..173169e494 Binary files /dev/null and b/images/pe/mqtt-broker/user-guide/oauth-2-support/login-with-keycloak-1.png differ diff --git a/images/pe/mqtt-broker/user-guide/oauth-2-support/login-with-oauth0-1-preview.png b/images/pe/mqtt-broker/user-guide/oauth-2-support/login-with-oauth0-1-preview.png new file mode 100644 index 0000000000..50af9e7acf Binary files /dev/null and b/images/pe/mqtt-broker/user-guide/oauth-2-support/login-with-oauth0-1-preview.png differ diff --git a/images/pe/mqtt-broker/user-guide/oauth-2-support/login-with-oauth0-1.png b/images/pe/mqtt-broker/user-guide/oauth-2-support/login-with-oauth0-1.png new file mode 100644 index 0000000000..f15718625e Binary files /dev/null and b/images/pe/mqtt-broker/user-guide/oauth-2-support/login-with-oauth0-1.png differ diff --git a/images/pe/mqtt-broker/user-guide/oauth-2-support/managing-domain-1-preview.png b/images/pe/mqtt-broker/user-guide/oauth-2-support/managing-domain-1-preview.png new file mode 100644 index 0000000000..4b6ee62eac Binary files /dev/null and b/images/pe/mqtt-broker/user-guide/oauth-2-support/managing-domain-1-preview.png differ diff --git a/images/pe/mqtt-broker/user-guide/oauth-2-support/managing-domain-1.png b/images/pe/mqtt-broker/user-guide/oauth-2-support/managing-domain-1.png new file mode 100644 index 0000000000..ac845244cd Binary files /dev/null and b/images/pe/mqtt-broker/user-guide/oauth-2-support/managing-domain-1.png differ diff --git a/images/pe/mqtt-broker/user-guide/oauth-2-support/managing-domain-2-preview.png b/images/pe/mqtt-broker/user-guide/oauth-2-support/managing-domain-2-preview.png new file mode 100644 index 0000000000..15521c7ac2 Binary files /dev/null and b/images/pe/mqtt-broker/user-guide/oauth-2-support/managing-domain-2-preview.png differ diff --git a/images/pe/mqtt-broker/user-guide/oauth-2-support/managing-domain-2.png b/images/pe/mqtt-broker/user-guide/oauth-2-support/managing-domain-2.png new file mode 100644 index 0000000000..da6e4db2f3 Binary files /dev/null and b/images/pe/mqtt-broker/user-guide/oauth-2-support/managing-domain-2.png differ diff --git a/images/pe/mqtt-broker/user-guide/oauth-2-support/managing-oauth2-client-1-preview.png b/images/pe/mqtt-broker/user-guide/oauth-2-support/managing-oauth2-client-1-preview.png new file mode 100644 index 0000000000..9db6a32b15 Binary files /dev/null and b/images/pe/mqtt-broker/user-guide/oauth-2-support/managing-oauth2-client-1-preview.png differ diff --git a/images/pe/mqtt-broker/user-guide/oauth-2-support/managing-oauth2-client-1.png b/images/pe/mqtt-broker/user-guide/oauth-2-support/managing-oauth2-client-1.png new file mode 100644 index 0000000000..77a764a190 Binary files /dev/null and b/images/pe/mqtt-broker/user-guide/oauth-2-support/managing-oauth2-client-1.png differ diff --git a/images/pe/mqtt-broker/user-guide/oauth-2-support/managing-oauth2-client-2-preview.png b/images/pe/mqtt-broker/user-guide/oauth-2-support/managing-oauth2-client-2-preview.png new file mode 100644 index 0000000000..fd72a91dbd Binary files /dev/null and b/images/pe/mqtt-broker/user-guide/oauth-2-support/managing-oauth2-client-2-preview.png differ diff --git a/images/pe/mqtt-broker/user-guide/oauth-2-support/managing-oauth2-client-2.png b/images/pe/mqtt-broker/user-guide/oauth-2-support/managing-oauth2-client-2.png new file mode 100644 index 0000000000..ea9fa04c34 Binary files /dev/null and b/images/pe/mqtt-broker/user-guide/oauth-2-support/managing-oauth2-client-2.png differ diff --git a/images/pe/mqtt-broker/user-guide/oauth-2-support/mapper-basic-1-preview.png b/images/pe/mqtt-broker/user-guide/oauth-2-support/mapper-basic-1-preview.png new file mode 100644 index 0000000000..3a6fc4a3a5 Binary files /dev/null and b/images/pe/mqtt-broker/user-guide/oauth-2-support/mapper-basic-1-preview.png differ diff --git a/images/pe/mqtt-broker/user-guide/oauth-2-support/mapper-basic-1.png b/images/pe/mqtt-broker/user-guide/oauth-2-support/mapper-basic-1.png new file mode 100644 index 0000000000..ee5c5fdbcf Binary files /dev/null and b/images/pe/mqtt-broker/user-guide/oauth-2-support/mapper-basic-1.png differ diff --git a/images/pe/mqtt-broker/user-guide/oauth-2-support/mapper-custom-1-preview.png b/images/pe/mqtt-broker/user-guide/oauth-2-support/mapper-custom-1-preview.png new file mode 100644 index 0000000000..b4c5ad1fa2 Binary files /dev/null and b/images/pe/mqtt-broker/user-guide/oauth-2-support/mapper-custom-1-preview.png differ diff --git a/images/pe/mqtt-broker/user-guide/oauth-2-support/mapper-custom-1.png b/images/pe/mqtt-broker/user-guide/oauth-2-support/mapper-custom-1.png new file mode 100644 index 0000000000..bfa8c198fe Binary files /dev/null and b/images/pe/mqtt-broker/user-guide/oauth-2-support/mapper-custom-1.png differ diff --git a/images/pe/mqtt-broker/user-guide/oauth-2-support/oauth0-configuration-of-thingsboard-3-preview.png b/images/pe/mqtt-broker/user-guide/oauth-2-support/oauth0-configuration-of-thingsboard-3-preview.png new file mode 100644 index 0000000000..641032c029 Binary files /dev/null and b/images/pe/mqtt-broker/user-guide/oauth-2-support/oauth0-configuration-of-thingsboard-3-preview.png differ diff --git a/images/pe/mqtt-broker/user-guide/oauth-2-support/oauth0-configuration-of-thingsboard-3.png b/images/pe/mqtt-broker/user-guide/oauth-2-support/oauth0-configuration-of-thingsboard-3.png new file mode 100644 index 0000000000..e0a809e372 Binary files /dev/null and b/images/pe/mqtt-broker/user-guide/oauth-2-support/oauth0-configuration-of-thingsboard-3.png differ diff --git a/images/pe/mqtt-broker/user-guide/oauth-2-support/oauth0-configuration-of-thingsboard-4-preview.png b/images/pe/mqtt-broker/user-guide/oauth-2-support/oauth0-configuration-of-thingsboard-4-preview.png new file mode 100644 index 0000000000..0f9b1d620f Binary files /dev/null and b/images/pe/mqtt-broker/user-guide/oauth-2-support/oauth0-configuration-of-thingsboard-4-preview.png differ diff --git a/images/pe/mqtt-broker/user-guide/oauth-2-support/oauth0-configuration-of-thingsboard-4.png b/images/pe/mqtt-broker/user-guide/oauth-2-support/oauth0-configuration-of-thingsboard-4.png new file mode 100644 index 0000000000..357b95dd89 Binary files /dev/null and b/images/pe/mqtt-broker/user-guide/oauth-2-support/oauth0-configuration-of-thingsboard-4.png differ diff --git a/images/pe/mqtt-broker/user-guide/oauth-2-support/oauth0-configuration-of-thingsboard-5-preview.png b/images/pe/mqtt-broker/user-guide/oauth-2-support/oauth0-configuration-of-thingsboard-5-preview.png new file mode 100644 index 0000000000..be2154e148 Binary files /dev/null and b/images/pe/mqtt-broker/user-guide/oauth-2-support/oauth0-configuration-of-thingsboard-5-preview.png differ diff --git a/images/pe/mqtt-broker/user-guide/oauth-2-support/oauth0-configuration-of-thingsboard-5.png b/images/pe/mqtt-broker/user-guide/oauth-2-support/oauth0-configuration-of-thingsboard-5.png new file mode 100644 index 0000000000..8572d08159 Binary files /dev/null and b/images/pe/mqtt-broker/user-guide/oauth-2-support/oauth0-configuration-of-thingsboard-5.png differ diff --git a/images/pe/mqtt-broker/user-guide/oauth-2-support/oauth0-configuration-of-thingsboard-6-preview.png b/images/pe/mqtt-broker/user-guide/oauth-2-support/oauth0-configuration-of-thingsboard-6-preview.png new file mode 100644 index 0000000000..59c8f915b0 Binary files /dev/null and b/images/pe/mqtt-broker/user-guide/oauth-2-support/oauth0-configuration-of-thingsboard-6-preview.png differ diff --git a/images/pe/mqtt-broker/user-guide/oauth-2-support/oauth0-configuration-of-thingsboard-6.png b/images/pe/mqtt-broker/user-guide/oauth-2-support/oauth0-configuration-of-thingsboard-6.png new file mode 100644 index 0000000000..1366954ebb Binary files /dev/null and b/images/pe/mqtt-broker/user-guide/oauth-2-support/oauth0-configuration-of-thingsboard-6.png differ diff --git a/images/pe/mqtt-broker/user-guide/oauth-2-support/oauth0-credentials-1-preview.png b/images/pe/mqtt-broker/user-guide/oauth-2-support/oauth0-credentials-1-preview.png new file mode 100644 index 0000000000..30e4a9bb84 Binary files /dev/null and b/images/pe/mqtt-broker/user-guide/oauth-2-support/oauth0-credentials-1-preview.png differ diff --git a/images/pe/mqtt-broker/user-guide/oauth-2-support/oauth0-credentials-1.png b/images/pe/mqtt-broker/user-guide/oauth-2-support/oauth0-credentials-1.png new file mode 100644 index 0000000000..28cdb8560d Binary files /dev/null and b/images/pe/mqtt-broker/user-guide/oauth-2-support/oauth0-credentials-1.png differ diff --git a/images/pe/mqtt-broker/user-guide/oauth-2-support/oauth0-credentials-2-preview.png b/images/pe/mqtt-broker/user-guide/oauth-2-support/oauth0-credentials-2-preview.png new file mode 100644 index 0000000000..29a8eb2e09 Binary files /dev/null and b/images/pe/mqtt-broker/user-guide/oauth-2-support/oauth0-credentials-2-preview.png differ diff --git a/images/pe/mqtt-broker/user-guide/oauth-2-support/oauth0-credentials-2.png b/images/pe/mqtt-broker/user-guide/oauth-2-support/oauth0-credentials-2.png new file mode 100644 index 0000000000..2eddb5eabd Binary files /dev/null and b/images/pe/mqtt-broker/user-guide/oauth-2-support/oauth0-credentials-2.png differ diff --git a/images/pe/mqtt-broker/user-guide/oauth-2-support/oauth0-credentials-3-preview.png b/images/pe/mqtt-broker/user-guide/oauth-2-support/oauth0-credentials-3-preview.png new file mode 100644 index 0000000000..5e0f2f3716 Binary files /dev/null and b/images/pe/mqtt-broker/user-guide/oauth-2-support/oauth0-credentials-3-preview.png differ diff --git a/images/pe/mqtt-broker/user-guide/oauth-2-support/oauth0-credentials-3.png b/images/pe/mqtt-broker/user-guide/oauth-2-support/oauth0-credentials-3.png new file mode 100644 index 0000000000..bdaf92cac7 Binary files /dev/null and b/images/pe/mqtt-broker/user-guide/oauth-2-support/oauth0-credentials-3.png differ diff --git a/images/pe/mqtt-broker/user-guide/oauth-2-support/oauth0-credentials-4-preview.png b/images/pe/mqtt-broker/user-guide/oauth-2-support/oauth0-credentials-4-preview.png new file mode 100644 index 0000000000..1537e31399 Binary files /dev/null and b/images/pe/mqtt-broker/user-guide/oauth-2-support/oauth0-credentials-4-preview.png differ diff --git a/images/pe/mqtt-broker/user-guide/oauth-2-support/oauth0-credentials-4.png b/images/pe/mqtt-broker/user-guide/oauth-2-support/oauth0-credentials-4.png new file mode 100644 index 0000000000..585a50ce18 Binary files /dev/null and b/images/pe/mqtt-broker/user-guide/oauth-2-support/oauth0-credentials-4.png differ diff --git a/images/pe/mqtt-broker/user-guide/oauth-2-support/oauth0-credentials-5-preview.png b/images/pe/mqtt-broker/user-guide/oauth-2-support/oauth0-credentials-5-preview.png new file mode 100644 index 0000000000..3566db252f Binary files /dev/null and b/images/pe/mqtt-broker/user-guide/oauth-2-support/oauth0-credentials-5-preview.png differ diff --git a/images/pe/mqtt-broker/user-guide/oauth-2-support/oauth0-credentials-5.png b/images/pe/mqtt-broker/user-guide/oauth-2-support/oauth0-credentials-5.png new file mode 100644 index 0000000000..aac7b59160 Binary files /dev/null and b/images/pe/mqtt-broker/user-guide/oauth-2-support/oauth0-credentials-5.png differ diff --git a/images/pe/mqtt-broker/user-guide/oauth-2-support/oauth0-credentials-6-preview.png b/images/pe/mqtt-broker/user-guide/oauth-2-support/oauth0-credentials-6-preview.png new file mode 100644 index 0000000000..1ea3b6a07d Binary files /dev/null and b/images/pe/mqtt-broker/user-guide/oauth-2-support/oauth0-credentials-6-preview.png differ diff --git a/images/pe/mqtt-broker/user-guide/oauth-2-support/oauth0-credentials-6.png b/images/pe/mqtt-broker/user-guide/oauth-2-support/oauth0-credentials-6.png new file mode 100644 index 0000000000..f63e825839 Binary files /dev/null and b/images/pe/mqtt-broker/user-guide/oauth-2-support/oauth0-credentials-6.png differ diff --git a/images/pe/mqtt-broker/user-guide/shared-sub-group-preview.png b/images/pe/mqtt-broker/user-guide/shared-sub-group-preview.png new file mode 100644 index 0000000000..98dc56e0d8 Binary files /dev/null and b/images/pe/mqtt-broker/user-guide/shared-sub-group-preview.png differ diff --git a/images/pe/mqtt-broker/user-guide/shared-sub-group.png b/images/pe/mqtt-broker/user-guide/shared-sub-group.png new file mode 100644 index 0000000000..8a9b03e4e1 Binary files /dev/null and b/images/pe/mqtt-broker/user-guide/shared-sub-group.png differ diff --git a/images/pe/mqtt-broker/user-guide/shared-sub-groups-preview.png b/images/pe/mqtt-broker/user-guide/shared-sub-groups-preview.png new file mode 100644 index 0000000000..1c3989cf42 Binary files /dev/null and b/images/pe/mqtt-broker/user-guide/shared-sub-groups-preview.png differ diff --git a/images/pe/mqtt-broker/user-guide/shared-sub-groups.png b/images/pe/mqtt-broker/user-guide/shared-sub-groups.png new file mode 100644 index 0000000000..57a19e962c Binary files /dev/null and b/images/pe/mqtt-broker/user-guide/shared-sub-groups.png differ diff --git a/images/pe/mqtt-broker/user-guide/ui/add-client-credentials-1-preview.png b/images/pe/mqtt-broker/user-guide/ui/add-client-credentials-1-preview.png new file mode 100644 index 0000000000..a12eedf8f9 Binary files /dev/null and b/images/pe/mqtt-broker/user-guide/ui/add-client-credentials-1-preview.png differ diff --git a/images/pe/mqtt-broker/user-guide/ui/add-client-credentials-1.png b/images/pe/mqtt-broker/user-guide/ui/add-client-credentials-1.png new file mode 100644 index 0000000000..f5eb52dd54 Binary files /dev/null and b/images/pe/mqtt-broker/user-guide/ui/add-client-credentials-1.png differ diff --git a/images/pe/mqtt-broker/user-guide/ui/add-client-credentials-2-preview.png b/images/pe/mqtt-broker/user-guide/ui/add-client-credentials-2-preview.png new file mode 100644 index 0000000000..ac0b80363b Binary files /dev/null and b/images/pe/mqtt-broker/user-guide/ui/add-client-credentials-2-preview.png differ diff --git a/images/pe/mqtt-broker/user-guide/ui/add-client-credentials-2.png b/images/pe/mqtt-broker/user-guide/ui/add-client-credentials-2.png new file mode 100644 index 0000000000..0945dd370c Binary files /dev/null and b/images/pe/mqtt-broker/user-guide/ui/add-client-credentials-2.png differ diff --git a/images/pe/mqtt-broker/user-guide/ui/add-client-credentials-3-preview.png b/images/pe/mqtt-broker/user-guide/ui/add-client-credentials-3-preview.png new file mode 100644 index 0000000000..145e6bc5f5 Binary files /dev/null and b/images/pe/mqtt-broker/user-guide/ui/add-client-credentials-3-preview.png differ diff --git a/images/pe/mqtt-broker/user-guide/ui/add-client-credentials-3.png b/images/pe/mqtt-broker/user-guide/ui/add-client-credentials-3.png new file mode 100644 index 0000000000..135f93e421 Binary files /dev/null and b/images/pe/mqtt-broker/user-guide/ui/add-client-credentials-3.png differ diff --git a/images/pe/mqtt-broker/user-guide/ui/add-client-credentials-4-preview.png b/images/pe/mqtt-broker/user-guide/ui/add-client-credentials-4-preview.png new file mode 100644 index 0000000000..ff779992a6 Binary files /dev/null and b/images/pe/mqtt-broker/user-guide/ui/add-client-credentials-4-preview.png differ diff --git a/images/pe/mqtt-broker/user-guide/ui/add-client-credentials-4.png b/images/pe/mqtt-broker/user-guide/ui/add-client-credentials-4.png new file mode 100644 index 0000000000..32dd205669 Binary files /dev/null and b/images/pe/mqtt-broker/user-guide/ui/add-client-credentials-4.png differ diff --git a/images/pe/mqtt-broker/user-guide/ui/add-http-integration-1-preview.png b/images/pe/mqtt-broker/user-guide/ui/add-http-integration-1-preview.png new file mode 100644 index 0000000000..ba04c17050 Binary files /dev/null and b/images/pe/mqtt-broker/user-guide/ui/add-http-integration-1-preview.png differ diff --git a/images/pe/mqtt-broker/user-guide/ui/add-http-integration-1.png b/images/pe/mqtt-broker/user-guide/ui/add-http-integration-1.png new file mode 100644 index 0000000000..985f044d7b Binary files /dev/null and b/images/pe/mqtt-broker/user-guide/ui/add-http-integration-1.png differ diff --git a/images/pe/mqtt-broker/user-guide/ui/add-http-integration-2-preview.png b/images/pe/mqtt-broker/user-guide/ui/add-http-integration-2-preview.png new file mode 100644 index 0000000000..ab02abce6b Binary files /dev/null and b/images/pe/mqtt-broker/user-guide/ui/add-http-integration-2-preview.png differ diff --git a/images/pe/mqtt-broker/user-guide/ui/add-http-integration-2.png b/images/pe/mqtt-broker/user-guide/ui/add-http-integration-2.png new file mode 100644 index 0000000000..f45b86f815 Binary files /dev/null and b/images/pe/mqtt-broker/user-guide/ui/add-http-integration-2.png differ diff --git a/images/pe/mqtt-broker/user-guide/ui/add-http-integration-3-preview.png b/images/pe/mqtt-broker/user-guide/ui/add-http-integration-3-preview.png new file mode 100644 index 0000000000..1f95297d97 Binary files /dev/null and b/images/pe/mqtt-broker/user-guide/ui/add-http-integration-3-preview.png differ diff --git a/images/pe/mqtt-broker/user-guide/ui/add-http-integration-3.png b/images/pe/mqtt-broker/user-guide/ui/add-http-integration-3.png new file mode 100644 index 0000000000..bfa418ad19 Binary files /dev/null and b/images/pe/mqtt-broker/user-guide/ui/add-http-integration-3.png differ diff --git a/images/pe/mqtt-broker/user-guide/ui/add-http-integration-4-preview.png b/images/pe/mqtt-broker/user-guide/ui/add-http-integration-4-preview.png new file mode 100644 index 0000000000..04219c2d8b Binary files /dev/null and b/images/pe/mqtt-broker/user-guide/ui/add-http-integration-4-preview.png differ diff --git a/images/pe/mqtt-broker/user-guide/ui/add-http-integration-4.png b/images/pe/mqtt-broker/user-guide/ui/add-http-integration-4.png new file mode 100644 index 0000000000..920018ac88 Binary files /dev/null and b/images/pe/mqtt-broker/user-guide/ui/add-http-integration-4.png differ diff --git a/images/pe/mqtt-broker/user-guide/ui/add-http-integration-5-preview.png b/images/pe/mqtt-broker/user-guide/ui/add-http-integration-5-preview.png new file mode 100644 index 0000000000..812a696783 Binary files /dev/null and b/images/pe/mqtt-broker/user-guide/ui/add-http-integration-5-preview.png differ diff --git a/images/pe/mqtt-broker/user-guide/ui/add-http-integration-5.png b/images/pe/mqtt-broker/user-guide/ui/add-http-integration-5.png new file mode 100644 index 0000000000..5add706d21 Binary files /dev/null and b/images/pe/mqtt-broker/user-guide/ui/add-http-integration-5.png differ diff --git a/images/pe/mqtt-broker/user-guide/ui/add-kafka-integration-2-preview.png b/images/pe/mqtt-broker/user-guide/ui/add-kafka-integration-2-preview.png new file mode 100644 index 0000000000..b9bcb85c66 Binary files /dev/null and b/images/pe/mqtt-broker/user-guide/ui/add-kafka-integration-2-preview.png differ diff --git a/images/pe/mqtt-broker/user-guide/ui/add-kafka-integration-2.png b/images/pe/mqtt-broker/user-guide/ui/add-kafka-integration-2.png new file mode 100644 index 0000000000..338775fa13 Binary files /dev/null and b/images/pe/mqtt-broker/user-guide/ui/add-kafka-integration-2.png differ diff --git a/images/pe/mqtt-broker/user-guide/ui/add-kafka-integration-3-preview.png b/images/pe/mqtt-broker/user-guide/ui/add-kafka-integration-3-preview.png new file mode 100644 index 0000000000..8549dd6179 Binary files /dev/null and b/images/pe/mqtt-broker/user-guide/ui/add-kafka-integration-3-preview.png differ diff --git a/images/pe/mqtt-broker/user-guide/ui/add-kafka-integration-3.png b/images/pe/mqtt-broker/user-guide/ui/add-kafka-integration-3.png new file mode 100644 index 0000000000..b2493b9a36 Binary files /dev/null and b/images/pe/mqtt-broker/user-guide/ui/add-kafka-integration-3.png differ diff --git a/images/pe/mqtt-broker/user-guide/ui/add-kafka-integration-4-preview.png b/images/pe/mqtt-broker/user-guide/ui/add-kafka-integration-4-preview.png new file mode 100644 index 0000000000..813f63c8b0 Binary files /dev/null and b/images/pe/mqtt-broker/user-guide/ui/add-kafka-integration-4-preview.png differ diff --git a/images/pe/mqtt-broker/user-guide/ui/add-kafka-integration-4.png b/images/pe/mqtt-broker/user-guide/ui/add-kafka-integration-4.png new file mode 100644 index 0000000000..2ed7d9ddf5 Binary files /dev/null and b/images/pe/mqtt-broker/user-guide/ui/add-kafka-integration-4.png differ diff --git a/images/pe/mqtt-broker/user-guide/ui/add-mqtt-integration-2-preview.png b/images/pe/mqtt-broker/user-guide/ui/add-mqtt-integration-2-preview.png new file mode 100644 index 0000000000..46ad6a36c7 Binary files /dev/null and b/images/pe/mqtt-broker/user-guide/ui/add-mqtt-integration-2-preview.png differ diff --git a/images/pe/mqtt-broker/user-guide/ui/add-mqtt-integration-2.png b/images/pe/mqtt-broker/user-guide/ui/add-mqtt-integration-2.png new file mode 100644 index 0000000000..f943be8bae Binary files /dev/null and b/images/pe/mqtt-broker/user-guide/ui/add-mqtt-integration-2.png differ diff --git a/images/pe/mqtt-broker/user-guide/ui/add-mqtt-integration-3-preview.png b/images/pe/mqtt-broker/user-guide/ui/add-mqtt-integration-3-preview.png new file mode 100644 index 0000000000..4b6fd337e6 Binary files /dev/null and b/images/pe/mqtt-broker/user-guide/ui/add-mqtt-integration-3-preview.png differ diff --git a/images/pe/mqtt-broker/user-guide/ui/add-mqtt-integration-3.png b/images/pe/mqtt-broker/user-guide/ui/add-mqtt-integration-3.png new file mode 100644 index 0000000000..de225b23cd Binary files /dev/null and b/images/pe/mqtt-broker/user-guide/ui/add-mqtt-integration-3.png differ diff --git a/images/pe/mqtt-broker/user-guide/ui/add-mqtt-integration-4-preview.png b/images/pe/mqtt-broker/user-guide/ui/add-mqtt-integration-4-preview.png new file mode 100644 index 0000000000..8ec3c39350 Binary files /dev/null and b/images/pe/mqtt-broker/user-guide/ui/add-mqtt-integration-4-preview.png differ diff --git a/images/pe/mqtt-broker/user-guide/ui/add-mqtt-integration-4.png b/images/pe/mqtt-broker/user-guide/ui/add-mqtt-integration-4.png new file mode 100644 index 0000000000..efd96fe7b4 Binary files /dev/null and b/images/pe/mqtt-broker/user-guide/ui/add-mqtt-integration-4.png differ diff --git a/images/pe/mqtt-broker/user-guide/ui/add-shared-subscriptions-1-preview.png b/images/pe/mqtt-broker/user-guide/ui/add-shared-subscriptions-1-preview.png new file mode 100644 index 0000000000..1c5064eda7 Binary files /dev/null and b/images/pe/mqtt-broker/user-guide/ui/add-shared-subscriptions-1-preview.png differ diff --git a/images/pe/mqtt-broker/user-guide/ui/add-shared-subscriptions-1.png b/images/pe/mqtt-broker/user-guide/ui/add-shared-subscriptions-1.png new file mode 100644 index 0000000000..1cb24e1cda Binary files /dev/null and b/images/pe/mqtt-broker/user-guide/ui/add-shared-subscriptions-1.png differ diff --git a/images/pe/mqtt-broker/user-guide/ui/add-shared-subscriptions-2-preview.png b/images/pe/mqtt-broker/user-guide/ui/add-shared-subscriptions-2-preview.png new file mode 100644 index 0000000000..92a5a99658 Binary files /dev/null and b/images/pe/mqtt-broker/user-guide/ui/add-shared-subscriptions-2-preview.png differ diff --git a/images/pe/mqtt-broker/user-guide/ui/add-shared-subscriptions-2.png b/images/pe/mqtt-broker/user-guide/ui/add-shared-subscriptions-2.png new file mode 100644 index 0000000000..c754ac7929 Binary files /dev/null and b/images/pe/mqtt-broker/user-guide/ui/add-shared-subscriptions-2.png differ diff --git a/images/pe/mqtt-broker/user-guide/ui/add-user-broker-1-preview.png b/images/pe/mqtt-broker/user-guide/ui/add-user-broker-1-preview.png new file mode 100644 index 0000000000..5365da7bfa Binary files /dev/null and b/images/pe/mqtt-broker/user-guide/ui/add-user-broker-1-preview.png differ diff --git a/images/pe/mqtt-broker/user-guide/ui/add-user-broker-1.png b/images/pe/mqtt-broker/user-guide/ui/add-user-broker-1.png new file mode 100644 index 0000000000..b7a305005b Binary files /dev/null and b/images/pe/mqtt-broker/user-guide/ui/add-user-broker-1.png differ diff --git a/images/pe/mqtt-broker/user-guide/ui/add-user-broker-2-preview.png b/images/pe/mqtt-broker/user-guide/ui/add-user-broker-2-preview.png new file mode 100644 index 0000000000..4e4b715597 Binary files /dev/null and b/images/pe/mqtt-broker/user-guide/ui/add-user-broker-2-preview.png differ diff --git a/images/pe/mqtt-broker/user-guide/ui/add-user-broker-2.png b/images/pe/mqtt-broker/user-guide/ui/add-user-broker-2.png new file mode 100644 index 0000000000..bf22d82834 Binary files /dev/null and b/images/pe/mqtt-broker/user-guide/ui/add-user-broker-2.png differ diff --git a/images/pe/mqtt-broker/user-guide/ui/change-password-1-preview.png b/images/pe/mqtt-broker/user-guide/ui/change-password-1-preview.png new file mode 100644 index 0000000000..641c95aad8 Binary files /dev/null and b/images/pe/mqtt-broker/user-guide/ui/change-password-1-preview.png differ diff --git a/images/pe/mqtt-broker/user-guide/ui/change-password-1.png b/images/pe/mqtt-broker/user-guide/ui/change-password-1.png new file mode 100644 index 0000000000..4bd6c89bfb Binary files /dev/null and b/images/pe/mqtt-broker/user-guide/ui/change-password-1.png differ diff --git a/images/pe/mqtt-broker/user-guide/ui/change-password-2-preview.png b/images/pe/mqtt-broker/user-guide/ui/change-password-2-preview.png new file mode 100644 index 0000000000..80da59bda0 Binary files /dev/null and b/images/pe/mqtt-broker/user-guide/ui/change-password-2-preview.png differ diff --git a/images/pe/mqtt-broker/user-guide/ui/change-password-2.png b/images/pe/mqtt-broker/user-guide/ui/change-password-2.png new file mode 100644 index 0000000000..209b77ca21 Binary files /dev/null and b/images/pe/mqtt-broker/user-guide/ui/change-password-2.png differ diff --git a/images/pe/mqtt-broker/user-guide/ui/change-password-3-preview.png b/images/pe/mqtt-broker/user-guide/ui/change-password-3-preview.png new file mode 100644 index 0000000000..f1b9d34f1b Binary files /dev/null and b/images/pe/mqtt-broker/user-guide/ui/change-password-3-preview.png differ diff --git a/images/pe/mqtt-broker/user-guide/ui/change-password-3.png b/images/pe/mqtt-broker/user-guide/ui/change-password-3.png new file mode 100644 index 0000000000..c59d9d64ff Binary files /dev/null and b/images/pe/mqtt-broker/user-guide/ui/change-password-3.png differ diff --git a/images/pe/mqtt-broker/user-guide/ui/check-connectivity-1-preview.png b/images/pe/mqtt-broker/user-guide/ui/check-connectivity-1-preview.png new file mode 100644 index 0000000000..2514d67978 Binary files /dev/null and b/images/pe/mqtt-broker/user-guide/ui/check-connectivity-1-preview.png differ diff --git a/images/pe/mqtt-broker/user-guide/ui/check-connectivity-1.png b/images/pe/mqtt-broker/user-guide/ui/check-connectivity-1.png new file mode 100644 index 0000000000..cba1277ad8 Binary files /dev/null and b/images/pe/mqtt-broker/user-guide/ui/check-connectivity-1.png differ diff --git a/images/pe/mqtt-broker/user-guide/ui/check-connectivity-2-preview.png b/images/pe/mqtt-broker/user-guide/ui/check-connectivity-2-preview.png new file mode 100644 index 0000000000..d6656f8181 Binary files /dev/null and b/images/pe/mqtt-broker/user-guide/ui/check-connectivity-2-preview.png differ diff --git a/images/pe/mqtt-broker/user-guide/ui/check-connectivity-2.png b/images/pe/mqtt-broker/user-guide/ui/check-connectivity-2.png new file mode 100644 index 0000000000..dba8fdfd8a Binary files /dev/null and b/images/pe/mqtt-broker/user-guide/ui/check-connectivity-2.png differ diff --git a/images/pe/mqtt-broker/user-guide/ui/clear-empty-retained-messages-1-preview.png b/images/pe/mqtt-broker/user-guide/ui/clear-empty-retained-messages-1-preview.png new file mode 100644 index 0000000000..b1b7241dda Binary files /dev/null and b/images/pe/mqtt-broker/user-guide/ui/clear-empty-retained-messages-1-preview.png differ diff --git a/images/pe/mqtt-broker/user-guide/ui/clear-empty-retained-messages-1.png b/images/pe/mqtt-broker/user-guide/ui/clear-empty-retained-messages-1.png new file mode 100644 index 0000000000..d06224d604 Binary files /dev/null and b/images/pe/mqtt-broker/user-guide/ui/clear-empty-retained-messages-1.png differ diff --git a/images/pe/mqtt-broker/user-guide/ui/clear-empty-subscription-nodes-1-preview.png b/images/pe/mqtt-broker/user-guide/ui/clear-empty-subscription-nodes-1-preview.png new file mode 100644 index 0000000000..88b99eeea2 Binary files /dev/null and b/images/pe/mqtt-broker/user-guide/ui/clear-empty-subscription-nodes-1-preview.png differ diff --git a/images/pe/mqtt-broker/user-guide/ui/clear-empty-subscription-nodes-1.png b/images/pe/mqtt-broker/user-guide/ui/clear-empty-subscription-nodes-1.png new file mode 100644 index 0000000000..7a6c304ed3 Binary files /dev/null and b/images/pe/mqtt-broker/user-guide/ui/clear-empty-subscription-nodes-1.png differ diff --git a/images/pe/mqtt-broker/user-guide/ui/clear-empty-subscription-nodes-2-preview.png b/images/pe/mqtt-broker/user-guide/ui/clear-empty-subscription-nodes-2-preview.png new file mode 100644 index 0000000000..0d276a2f31 Binary files /dev/null and b/images/pe/mqtt-broker/user-guide/ui/clear-empty-subscription-nodes-2-preview.png differ diff --git a/images/pe/mqtt-broker/user-guide/ui/clear-empty-subscription-nodes-2.png b/images/pe/mqtt-broker/user-guide/ui/clear-empty-subscription-nodes-2.png new file mode 100644 index 0000000000..cecadb7688 Binary files /dev/null and b/images/pe/mqtt-broker/user-guide/ui/clear-empty-subscription-nodes-2.png differ diff --git a/images/pe/mqtt-broker/user-guide/ui/delete-credentials-1-preview.png b/images/pe/mqtt-broker/user-guide/ui/delete-credentials-1-preview.png new file mode 100644 index 0000000000..f41ccfca6f Binary files /dev/null and b/images/pe/mqtt-broker/user-guide/ui/delete-credentials-1-preview.png differ diff --git a/images/pe/mqtt-broker/user-guide/ui/delete-credentials-1.png b/images/pe/mqtt-broker/user-guide/ui/delete-credentials-1.png new file mode 100644 index 0000000000..3814b1a57f Binary files /dev/null and b/images/pe/mqtt-broker/user-guide/ui/delete-credentials-1.png differ diff --git a/images/pe/mqtt-broker/user-guide/ui/delete-credentials-2-preview.png b/images/pe/mqtt-broker/user-guide/ui/delete-credentials-2-preview.png new file mode 100644 index 0000000000..d5375145c7 Binary files /dev/null and b/images/pe/mqtt-broker/user-guide/ui/delete-credentials-2-preview.png differ diff --git a/images/pe/mqtt-broker/user-guide/ui/delete-credentials-2.png b/images/pe/mqtt-broker/user-guide/ui/delete-credentials-2.png new file mode 100644 index 0000000000..2aa69abd68 Binary files /dev/null and b/images/pe/mqtt-broker/user-guide/ui/delete-credentials-2.png differ diff --git a/images/pe/mqtt-broker/user-guide/ui/delete-retained-messages-1-preview.png b/images/pe/mqtt-broker/user-guide/ui/delete-retained-messages-1-preview.png new file mode 100644 index 0000000000..2e0b3b2b30 Binary files /dev/null and b/images/pe/mqtt-broker/user-guide/ui/delete-retained-messages-1-preview.png differ diff --git a/images/pe/mqtt-broker/user-guide/ui/delete-retained-messages-1.png b/images/pe/mqtt-broker/user-guide/ui/delete-retained-messages-1.png new file mode 100644 index 0000000000..c1c1dafe78 Binary files /dev/null and b/images/pe/mqtt-broker/user-guide/ui/delete-retained-messages-1.png differ diff --git a/images/pe/mqtt-broker/user-guide/ui/delete-retained-messages-2-preview.png b/images/pe/mqtt-broker/user-guide/ui/delete-retained-messages-2-preview.png new file mode 100644 index 0000000000..d2f402e465 Binary files /dev/null and b/images/pe/mqtt-broker/user-guide/ui/delete-retained-messages-2-preview.png differ diff --git a/images/pe/mqtt-broker/user-guide/ui/delete-retained-messages-2.png b/images/pe/mqtt-broker/user-guide/ui/delete-retained-messages-2.png new file mode 100644 index 0000000000..c8500cecde Binary files /dev/null and b/images/pe/mqtt-broker/user-guide/ui/delete-retained-messages-2.png differ diff --git a/images/pe/mqtt-broker/user-guide/ui/delete-shared-subscriptions-1-preview.png b/images/pe/mqtt-broker/user-guide/ui/delete-shared-subscriptions-1-preview.png new file mode 100644 index 0000000000..265c5a56b9 Binary files /dev/null and b/images/pe/mqtt-broker/user-guide/ui/delete-shared-subscriptions-1-preview.png differ diff --git a/images/pe/mqtt-broker/user-guide/ui/delete-shared-subscriptions-1.png b/images/pe/mqtt-broker/user-guide/ui/delete-shared-subscriptions-1.png new file mode 100644 index 0000000000..d17d21d1b1 Binary files /dev/null and b/images/pe/mqtt-broker/user-guide/ui/delete-shared-subscriptions-1.png differ diff --git a/images/pe/mqtt-broker/user-guide/ui/delete-shared-subscriptions-2-preview.png b/images/pe/mqtt-broker/user-guide/ui/delete-shared-subscriptions-2-preview.png new file mode 100644 index 0000000000..2182720c25 Binary files /dev/null and b/images/pe/mqtt-broker/user-guide/ui/delete-shared-subscriptions-2-preview.png differ diff --git a/images/pe/mqtt-broker/user-guide/ui/delete-shared-subscriptions-2.png b/images/pe/mqtt-broker/user-guide/ui/delete-shared-subscriptions-2.png new file mode 100644 index 0000000000..3281dc8df8 Binary files /dev/null and b/images/pe/mqtt-broker/user-guide/ui/delete-shared-subscriptions-2.png differ diff --git a/images/pe/mqtt-broker/user-guide/ui/delete-unauthorized-client-1-preview.png b/images/pe/mqtt-broker/user-guide/ui/delete-unauthorized-client-1-preview.png new file mode 100644 index 0000000000..0790674511 Binary files /dev/null and b/images/pe/mqtt-broker/user-guide/ui/delete-unauthorized-client-1-preview.png differ diff --git a/images/pe/mqtt-broker/user-guide/ui/delete-unauthorized-client-1.png b/images/pe/mqtt-broker/user-guide/ui/delete-unauthorized-client-1.png new file mode 100644 index 0000000000..d3c9261ab6 Binary files /dev/null and b/images/pe/mqtt-broker/user-guide/ui/delete-unauthorized-client-1.png differ diff --git a/images/pe/mqtt-broker/user-guide/ui/delete-unauthorized-client-2-preview.png b/images/pe/mqtt-broker/user-guide/ui/delete-unauthorized-client-2-preview.png new file mode 100644 index 0000000000..91d5f3b78b Binary files /dev/null and b/images/pe/mqtt-broker/user-guide/ui/delete-unauthorized-client-2-preview.png differ diff --git a/images/pe/mqtt-broker/user-guide/ui/delete-unauthorized-client-2.png b/images/pe/mqtt-broker/user-guide/ui/delete-unauthorized-client-2.png new file mode 100644 index 0000000000..11811f1236 Binary files /dev/null and b/images/pe/mqtt-broker/user-guide/ui/delete-unauthorized-client-2.png differ diff --git a/images/pe/mqtt-broker/user-guide/ui/delete-user-broker-1-preview.png b/images/pe/mqtt-broker/user-guide/ui/delete-user-broker-1-preview.png new file mode 100644 index 0000000000..9e81fc1ce7 Binary files /dev/null and b/images/pe/mqtt-broker/user-guide/ui/delete-user-broker-1-preview.png differ diff --git a/images/pe/mqtt-broker/user-guide/ui/delete-user-broker-1.png b/images/pe/mqtt-broker/user-guide/ui/delete-user-broker-1.png new file mode 100644 index 0000000000..f28462cf01 Binary files /dev/null and b/images/pe/mqtt-broker/user-guide/ui/delete-user-broker-1.png differ diff --git a/images/pe/mqtt-broker/user-guide/ui/delete-user-broker-2-preview.png b/images/pe/mqtt-broker/user-guide/ui/delete-user-broker-2-preview.png new file mode 100644 index 0000000000..8affb04afe Binary files /dev/null and b/images/pe/mqtt-broker/user-guide/ui/delete-user-broker-2-preview.png differ diff --git a/images/pe/mqtt-broker/user-guide/ui/delete-user-broker-2.png b/images/pe/mqtt-broker/user-guide/ui/delete-user-broker-2.png new file mode 100644 index 0000000000..fbfb52d08a Binary files /dev/null and b/images/pe/mqtt-broker/user-guide/ui/delete-user-broker-2.png differ diff --git a/images/pe/mqtt-broker/user-guide/ui/details-retained-messages-1-preview.png b/images/pe/mqtt-broker/user-guide/ui/details-retained-messages-1-preview.png new file mode 100644 index 0000000000..520b0551df Binary files /dev/null and b/images/pe/mqtt-broker/user-guide/ui/details-retained-messages-1-preview.png differ diff --git a/images/pe/mqtt-broker/user-guide/ui/details-retained-messages-1.png b/images/pe/mqtt-broker/user-guide/ui/details-retained-messages-1.png new file mode 100644 index 0000000000..2aa71d3c91 Binary files /dev/null and b/images/pe/mqtt-broker/user-guide/ui/details-retained-messages-1.png differ diff --git a/images/pe/mqtt-broker/user-guide/ui/details-retained-messages-2-preview.png b/images/pe/mqtt-broker/user-guide/ui/details-retained-messages-2-preview.png new file mode 100644 index 0000000000..302b15c846 Binary files /dev/null and b/images/pe/mqtt-broker/user-guide/ui/details-retained-messages-2-preview.png differ diff --git a/images/pe/mqtt-broker/user-guide/ui/details-retained-messages-2.png b/images/pe/mqtt-broker/user-guide/ui/details-retained-messages-2.png new file mode 100644 index 0000000000..e3cd875211 Binary files /dev/null and b/images/pe/mqtt-broker/user-guide/ui/details-retained-messages-2.png differ diff --git a/images/pe/mqtt-broker/user-guide/ui/details-retained-messages-3-preview.png b/images/pe/mqtt-broker/user-guide/ui/details-retained-messages-3-preview.png new file mode 100644 index 0000000000..4f56fada03 Binary files /dev/null and b/images/pe/mqtt-broker/user-guide/ui/details-retained-messages-3-preview.png differ diff --git a/images/pe/mqtt-broker/user-guide/ui/details-retained-messages-3.png b/images/pe/mqtt-broker/user-guide/ui/details-retained-messages-3.png new file mode 100644 index 0000000000..f1e5dd7a9c Binary files /dev/null and b/images/pe/mqtt-broker/user-guide/ui/details-retained-messages-3.png differ diff --git a/images/pe/mqtt-broker/user-guide/ui/details-retained-messages-4-preview.png b/images/pe/mqtt-broker/user-guide/ui/details-retained-messages-4-preview.png new file mode 100644 index 0000000000..715599c514 Binary files /dev/null and b/images/pe/mqtt-broker/user-guide/ui/details-retained-messages-4-preview.png differ diff --git a/images/pe/mqtt-broker/user-guide/ui/details-retained-messages-4.png b/images/pe/mqtt-broker/user-guide/ui/details-retained-messages-4.png new file mode 100644 index 0000000000..769bf4405b Binary files /dev/null and b/images/pe/mqtt-broker/user-guide/ui/details-retained-messages-4.png differ diff --git a/images/pe/mqtt-broker/user-guide/ui/edit-user-broker-1-preview.png b/images/pe/mqtt-broker/user-guide/ui/edit-user-broker-1-preview.png new file mode 100644 index 0000000000..1dad73c1a4 Binary files /dev/null and b/images/pe/mqtt-broker/user-guide/ui/edit-user-broker-1-preview.png differ diff --git a/images/pe/mqtt-broker/user-guide/ui/edit-user-broker-1.png b/images/pe/mqtt-broker/user-guide/ui/edit-user-broker-1.png new file mode 100644 index 0000000000..908a7326ad Binary files /dev/null and b/images/pe/mqtt-broker/user-guide/ui/edit-user-broker-1.png differ diff --git a/images/pe/mqtt-broker/user-guide/ui/edit-user-broker-2-preview.png b/images/pe/mqtt-broker/user-guide/ui/edit-user-broker-2-preview.png new file mode 100644 index 0000000000..89611c6e01 Binary files /dev/null and b/images/pe/mqtt-broker/user-guide/ui/edit-user-broker-2-preview.png differ diff --git a/images/pe/mqtt-broker/user-guide/ui/edit-user-broker-2.png b/images/pe/mqtt-broker/user-guide/ui/edit-user-broker-2.png new file mode 100644 index 0000000000..b890d09ecf Binary files /dev/null and b/images/pe/mqtt-broker/user-guide/ui/edit-user-broker-2.png differ diff --git a/images/pe/mqtt-broker/user-guide/ui/edit-user-broker-3-preview.png b/images/pe/mqtt-broker/user-guide/ui/edit-user-broker-3-preview.png new file mode 100644 index 0000000000..9aa0900687 Binary files /dev/null and b/images/pe/mqtt-broker/user-guide/ui/edit-user-broker-3-preview.png differ diff --git a/images/pe/mqtt-broker/user-guide/ui/edit-user-broker-3.png b/images/pe/mqtt-broker/user-guide/ui/edit-user-broker-3.png new file mode 100644 index 0000000000..510cea0ba9 Binary files /dev/null and b/images/pe/mqtt-broker/user-guide/ui/edit-user-broker-3.png differ diff --git a/images/pe/mqtt-broker/user-guide/ui/home-page.png b/images/pe/mqtt-broker/user-guide/ui/home-page.png new file mode 100644 index 0000000000..80964466b8 Binary files /dev/null and b/images/pe/mqtt-broker/user-guide/ui/home-page.png differ diff --git a/images/pe/mqtt-broker/user-guide/ui/kafka-integration-cloud-properties-4-preview.png b/images/pe/mqtt-broker/user-guide/ui/kafka-integration-cloud-properties-4-preview.png new file mode 100644 index 0000000000..0ddbdef5c3 Binary files /dev/null and b/images/pe/mqtt-broker/user-guide/ui/kafka-integration-cloud-properties-4-preview.png differ diff --git a/images/pe/mqtt-broker/user-guide/ui/kafka-integration-cloud-properties-4.png b/images/pe/mqtt-broker/user-guide/ui/kafka-integration-cloud-properties-4.png new file mode 100644 index 0000000000..02d123c7d2 Binary files /dev/null and b/images/pe/mqtt-broker/user-guide/ui/kafka-integration-cloud-properties-4.png differ diff --git a/images/pe/mqtt-broker/user-guide/ui/kafka-integration-cloud-server-2-preview.png b/images/pe/mqtt-broker/user-guide/ui/kafka-integration-cloud-server-2-preview.png new file mode 100644 index 0000000000..31d6a5212d Binary files /dev/null and b/images/pe/mqtt-broker/user-guide/ui/kafka-integration-cloud-server-2-preview.png differ diff --git a/images/pe/mqtt-broker/user-guide/ui/kafka-integration-cloud-server-2.png b/images/pe/mqtt-broker/user-guide/ui/kafka-integration-cloud-server-2.png new file mode 100644 index 0000000000..489b6c712b Binary files /dev/null and b/images/pe/mqtt-broker/user-guide/ui/kafka-integration-cloud-server-2.png differ diff --git a/images/pe/mqtt-broker/user-guide/ui/login-as-user-preview.png b/images/pe/mqtt-broker/user-guide/ui/login-as-user-preview.png new file mode 100644 index 0000000000..a23322b66b Binary files /dev/null and b/images/pe/mqtt-broker/user-guide/ui/login-as-user-preview.png differ diff --git a/images/pe/mqtt-broker/user-guide/ui/login-as-user.png b/images/pe/mqtt-broker/user-guide/ui/login-as-user.png new file mode 100644 index 0000000000..4886322ea2 Binary files /dev/null and b/images/pe/mqtt-broker/user-guide/ui/login-as-user.png differ diff --git a/images/pe/mqtt-broker/user-guide/ui/monitoring-page.png b/images/pe/mqtt-broker/user-guide/ui/monitoring-page.png new file mode 100644 index 0000000000..225af26ae9 Binary files /dev/null and b/images/pe/mqtt-broker/user-guide/ui/monitoring-page.png differ diff --git a/images/pe/mqtt-broker/user-guide/ui/resource-usage.png b/images/pe/mqtt-broker/user-guide/ui/resource-usage.png new file mode 100644 index 0000000000..0f94e8216b Binary files /dev/null and b/images/pe/mqtt-broker/user-guide/ui/resource-usage.png differ diff --git a/images/pe/mqtt-broker/user-guide/ui/security-authentication-tls-2-preview.png b/images/pe/mqtt-broker/user-guide/ui/security-authentication-tls-2-preview.png new file mode 100644 index 0000000000..4cf72f6b16 Binary files /dev/null and b/images/pe/mqtt-broker/user-guide/ui/security-authentication-tls-2-preview.png differ diff --git a/images/pe/mqtt-broker/user-guide/ui/security-authentication-tls-2.png b/images/pe/mqtt-broker/user-guide/ui/security-authentication-tls-2.png new file mode 100644 index 0000000000..d771f71607 Binary files /dev/null and b/images/pe/mqtt-broker/user-guide/ui/security-authentication-tls-2.png differ diff --git a/images/pe/mqtt-broker/user-guide/ui/security-authentication-tls-3-preview.png b/images/pe/mqtt-broker/user-guide/ui/security-authentication-tls-3-preview.png new file mode 100644 index 0000000000..a7cbade99c Binary files /dev/null and b/images/pe/mqtt-broker/user-guide/ui/security-authentication-tls-3-preview.png differ diff --git a/images/pe/mqtt-broker/user-guide/ui/security-authentication-tls-3.png b/images/pe/mqtt-broker/user-guide/ui/security-authentication-tls-3.png new file mode 100644 index 0000000000..d1695f6fc6 Binary files /dev/null and b/images/pe/mqtt-broker/user-guide/ui/security-authentication-tls-3.png differ diff --git a/images/pe/mqtt-broker/user-guide/ui/send-mqtt-message-2-preview.png b/images/pe/mqtt-broker/user-guide/ui/send-mqtt-message-2-preview.png new file mode 100644 index 0000000000..356e75bcc7 Binary files /dev/null and b/images/pe/mqtt-broker/user-guide/ui/send-mqtt-message-2-preview.png differ diff --git a/images/pe/mqtt-broker/user-guide/ui/send-mqtt-message-2.png b/images/pe/mqtt-broker/user-guide/ui/send-mqtt-message-2.png new file mode 100644 index 0000000000..8bba932632 Binary files /dev/null and b/images/pe/mqtt-broker/user-guide/ui/send-mqtt-message-2.png differ diff --git a/images/pe/mqtt-broker/user-guide/ui/send-uplink-message-1-preview.png b/images/pe/mqtt-broker/user-guide/ui/send-uplink-message-1-preview.png new file mode 100644 index 0000000000..ea2e92307c Binary files /dev/null and b/images/pe/mqtt-broker/user-guide/ui/send-uplink-message-1-preview.png differ diff --git a/images/pe/mqtt-broker/user-guide/ui/send-uplink-message-1.png b/images/pe/mqtt-broker/user-guide/ui/send-uplink-message-1.png new file mode 100644 index 0000000000..6e52fb86f8 Binary files /dev/null and b/images/pe/mqtt-broker/user-guide/ui/send-uplink-message-1.png differ diff --git a/images/pe/mqtt-broker/user-guide/ui/send-uplink-message-2-preview.png b/images/pe/mqtt-broker/user-guide/ui/send-uplink-message-2-preview.png new file mode 100644 index 0000000000..1ed6042f52 Binary files /dev/null and b/images/pe/mqtt-broker/user-guide/ui/send-uplink-message-2-preview.png differ diff --git a/images/pe/mqtt-broker/user-guide/ui/send-uplink-message-2.png b/images/pe/mqtt-broker/user-guide/ui/send-uplink-message-2.png new file mode 100644 index 0000000000..12cc18a65a Binary files /dev/null and b/images/pe/mqtt-broker/user-guide/ui/send-uplink-message-2.png differ diff --git a/images/pe/mqtt-broker/user-guide/ui/send-uplink-message-kafka-1-preview.png b/images/pe/mqtt-broker/user-guide/ui/send-uplink-message-kafka-1-preview.png new file mode 100644 index 0000000000..b8befb9cf2 Binary files /dev/null and b/images/pe/mqtt-broker/user-guide/ui/send-uplink-message-kafka-1-preview.png differ diff --git a/images/pe/mqtt-broker/user-guide/ui/send-uplink-message-kafka-1.png b/images/pe/mqtt-broker/user-guide/ui/send-uplink-message-kafka-1.png new file mode 100644 index 0000000000..fa57f269d8 Binary files /dev/null and b/images/pe/mqtt-broker/user-guide/ui/send-uplink-message-kafka-1.png differ diff --git a/images/pe/mqtt-broker/user-guide/ui/session-details-1-preview.png b/images/pe/mqtt-broker/user-guide/ui/session-details-1-preview.png new file mode 100644 index 0000000000..1b47f6476f Binary files /dev/null and b/images/pe/mqtt-broker/user-guide/ui/session-details-1-preview.png differ diff --git a/images/pe/mqtt-broker/user-guide/ui/session-details-1.png b/images/pe/mqtt-broker/user-guide/ui/session-details-1.png new file mode 100644 index 0000000000..ded671be7a Binary files /dev/null and b/images/pe/mqtt-broker/user-guide/ui/session-details-1.png differ diff --git a/images/pe/mqtt-broker/user-guide/ui/session-disconnect-1-preview.png b/images/pe/mqtt-broker/user-guide/ui/session-disconnect-1-preview.png new file mode 100644 index 0000000000..8a77844ccf Binary files /dev/null and b/images/pe/mqtt-broker/user-guide/ui/session-disconnect-1-preview.png differ diff --git a/images/pe/mqtt-broker/user-guide/ui/session-disconnect-1.png b/images/pe/mqtt-broker/user-guide/ui/session-disconnect-1.png new file mode 100644 index 0000000000..841890cc13 Binary files /dev/null and b/images/pe/mqtt-broker/user-guide/ui/session-disconnect-1.png differ diff --git a/images/pe/mqtt-broker/user-guide/ui/session-metrics-1-preview.png b/images/pe/mqtt-broker/user-guide/ui/session-metrics-1-preview.png new file mode 100644 index 0000000000..cdc80c7b2f Binary files /dev/null and b/images/pe/mqtt-broker/user-guide/ui/session-metrics-1-preview.png differ diff --git a/images/pe/mqtt-broker/user-guide/ui/session-metrics-1.png b/images/pe/mqtt-broker/user-guide/ui/session-metrics-1.png new file mode 100644 index 0000000000..5548c4cc83 Binary files /dev/null and b/images/pe/mqtt-broker/user-guide/ui/session-metrics-1.png differ diff --git a/images/pe/mqtt-broker/user-guide/ui/session-remove-1-preview.png b/images/pe/mqtt-broker/user-guide/ui/session-remove-1-preview.png new file mode 100644 index 0000000000..146447b40e Binary files /dev/null and b/images/pe/mqtt-broker/user-guide/ui/session-remove-1-preview.png differ diff --git a/images/pe/mqtt-broker/user-guide/ui/session-remove-1.png b/images/pe/mqtt-broker/user-guide/ui/session-remove-1.png new file mode 100644 index 0000000000..b583115fef Binary files /dev/null and b/images/pe/mqtt-broker/user-guide/ui/session-remove-1.png differ diff --git a/images/pe/mqtt-broker/user-guide/ui/session-subscriptions-1-preview.png b/images/pe/mqtt-broker/user-guide/ui/session-subscriptions-1-preview.png new file mode 100644 index 0000000000..89f8706e40 Binary files /dev/null and b/images/pe/mqtt-broker/user-guide/ui/session-subscriptions-1-preview.png differ diff --git a/images/pe/mqtt-broker/user-guide/ui/session-subscriptions-1.png b/images/pe/mqtt-broker/user-guide/ui/session-subscriptions-1.png new file mode 100644 index 0000000000..10effb685c Binary files /dev/null and b/images/pe/mqtt-broker/user-guide/ui/session-subscriptions-1.png differ diff --git a/images/pe/mqtt-broker/user-guide/ui/session-subscriptions-2-preview.png b/images/pe/mqtt-broker/user-guide/ui/session-subscriptions-2-preview.png new file mode 100644 index 0000000000..adb4b01840 Binary files /dev/null and b/images/pe/mqtt-broker/user-guide/ui/session-subscriptions-2-preview.png differ diff --git a/images/pe/mqtt-broker/user-guide/ui/session-subscriptions-2.png b/images/pe/mqtt-broker/user-guide/ui/session-subscriptions-2.png new file mode 100644 index 0000000000..d00df9a2de Binary files /dev/null and b/images/pe/mqtt-broker/user-guide/ui/session-subscriptions-2.png differ diff --git a/images/pe/mqtt-broker/user-guide/ui/settings-connectivity-settings-1-preview.png b/images/pe/mqtt-broker/user-guide/ui/settings-connectivity-settings-1-preview.png new file mode 100644 index 0000000000..c1a1c57f8f Binary files /dev/null and b/images/pe/mqtt-broker/user-guide/ui/settings-connectivity-settings-1-preview.png differ diff --git a/images/pe/mqtt-broker/user-guide/ui/settings-connectivity-settings-1.png b/images/pe/mqtt-broker/user-guide/ui/settings-connectivity-settings-1.png new file mode 100644 index 0000000000..0483bf2d91 Binary files /dev/null and b/images/pe/mqtt-broker/user-guide/ui/settings-connectivity-settings-1.png differ diff --git a/images/pe/mqtt-broker/user-guide/ui/settings-connectivity-settings-2-preview.png b/images/pe/mqtt-broker/user-guide/ui/settings-connectivity-settings-2-preview.png new file mode 100644 index 0000000000..ae9da17144 Binary files /dev/null and b/images/pe/mqtt-broker/user-guide/ui/settings-connectivity-settings-2-preview.png differ diff --git a/images/pe/mqtt-broker/user-guide/ui/settings-connectivity-settings-2.png b/images/pe/mqtt-broker/user-guide/ui/settings-connectivity-settings-2.png new file mode 100644 index 0000000000..388726150f Binary files /dev/null and b/images/pe/mqtt-broker/user-guide/ui/settings-connectivity-settings-2.png differ diff --git a/images/pe/mqtt-broker/user-guide/ui/settings-connectivity-settings-3-preview.png b/images/pe/mqtt-broker/user-guide/ui/settings-connectivity-settings-3-preview.png new file mode 100644 index 0000000000..9d116ec86a Binary files /dev/null and b/images/pe/mqtt-broker/user-guide/ui/settings-connectivity-settings-3-preview.png differ diff --git a/images/pe/mqtt-broker/user-guide/ui/settings-connectivity-settings-3.png b/images/pe/mqtt-broker/user-guide/ui/settings-connectivity-settings-3.png new file mode 100644 index 0000000000..46bfa89081 Binary files /dev/null and b/images/pe/mqtt-broker/user-guide/ui/settings-connectivity-settings-3.png differ diff --git a/images/pe/mqtt-broker/user-guide/ui/settings-connectivity-settings-4-preview.png b/images/pe/mqtt-broker/user-guide/ui/settings-connectivity-settings-4-preview.png new file mode 100644 index 0000000000..b32b5a12e1 Binary files /dev/null and b/images/pe/mqtt-broker/user-guide/ui/settings-connectivity-settings-4-preview.png differ diff --git a/images/pe/mqtt-broker/user-guide/ui/settings-connectivity-settings-4.png b/images/pe/mqtt-broker/user-guide/ui/settings-connectivity-settings-4.png new file mode 100644 index 0000000000..c255371411 Binary files /dev/null and b/images/pe/mqtt-broker/user-guide/ui/settings-connectivity-settings-4.png differ diff --git a/images/pe/mqtt-broker/user-guide/ui/settings-password-policy-1-preview.png b/images/pe/mqtt-broker/user-guide/ui/settings-password-policy-1-preview.png new file mode 100644 index 0000000000..9520a5748c Binary files /dev/null and b/images/pe/mqtt-broker/user-guide/ui/settings-password-policy-1-preview.png differ diff --git a/images/pe/mqtt-broker/user-guide/ui/settings-password-policy-1.png b/images/pe/mqtt-broker/user-guide/ui/settings-password-policy-1.png new file mode 100644 index 0000000000..3cc96f30af Binary files /dev/null and b/images/pe/mqtt-broker/user-guide/ui/settings-password-policy-1.png differ diff --git a/images/pe/mqtt-broker/user-guide/ui/settings-password-policy-2-preview.png b/images/pe/mqtt-broker/user-guide/ui/settings-password-policy-2-preview.png new file mode 100644 index 0000000000..a2243507b1 Binary files /dev/null and b/images/pe/mqtt-broker/user-guide/ui/settings-password-policy-2-preview.png differ diff --git a/images/pe/mqtt-broker/user-guide/ui/settings-password-policy-2.png b/images/pe/mqtt-broker/user-guide/ui/settings-password-policy-2.png new file mode 100644 index 0000000000..b46db9e056 Binary files /dev/null and b/images/pe/mqtt-broker/user-guide/ui/settings-password-policy-2.png differ diff --git a/images/pe/mqtt-broker/user-guide/ui/ssl-credentials-authorization.png b/images/pe/mqtt-broker/user-guide/ui/ssl-credentials-authorization.png new file mode 100644 index 0000000000..6f50b497d5 Binary files /dev/null and b/images/pe/mqtt-broker/user-guide/ui/ssl-credentials-authorization.png differ diff --git a/images/pe/mqtt-broker/user-guide/ui/subscription-session-1-preview.png b/images/pe/mqtt-broker/user-guide/ui/subscription-session-1-preview.png new file mode 100644 index 0000000000..9db48fa5d1 Binary files /dev/null and b/images/pe/mqtt-broker/user-guide/ui/subscription-session-1-preview.png differ diff --git a/images/pe/mqtt-broker/user-guide/ui/subscription-session-1.png b/images/pe/mqtt-broker/user-guide/ui/subscription-session-1.png new file mode 100644 index 0000000000..a9a47d9778 Binary files /dev/null and b/images/pe/mqtt-broker/user-guide/ui/subscription-session-1.png differ diff --git a/images/pe/mqtt-broker/user-guide/ui/subscription-session-2-preview.png b/images/pe/mqtt-broker/user-guide/ui/subscription-session-2-preview.png new file mode 100644 index 0000000000..c6adead5d4 Binary files /dev/null and b/images/pe/mqtt-broker/user-guide/ui/subscription-session-2-preview.png differ diff --git a/images/pe/mqtt-broker/user-guide/ui/subscription-session-2.png b/images/pe/mqtt-broker/user-guide/ui/subscription-session-2.png new file mode 100644 index 0000000000..9efce83a43 Binary files /dev/null and b/images/pe/mqtt-broker/user-guide/ui/subscription-session-2.png differ diff --git a/images/pe/mqtt-broker/user-guide/ui/subscription-session-3-preview.png b/images/pe/mqtt-broker/user-guide/ui/subscription-session-3-preview.png new file mode 100644 index 0000000000..23eb5f8d77 Binary files /dev/null and b/images/pe/mqtt-broker/user-guide/ui/subscription-session-3-preview.png differ diff --git a/images/pe/mqtt-broker/user-guide/ui/subscription-session-3.png b/images/pe/mqtt-broker/user-guide/ui/subscription-session-3.png new file mode 100644 index 0000000000..c7d5cb2475 Binary files /dev/null and b/images/pe/mqtt-broker/user-guide/ui/subscription-session-3.png differ diff --git a/images/pe/mqtt-broker/user-guide/ui/subscription-session-4-preview.png b/images/pe/mqtt-broker/user-guide/ui/subscription-session-4-preview.png new file mode 100644 index 0000000000..80b73ee7a4 Binary files /dev/null and b/images/pe/mqtt-broker/user-guide/ui/subscription-session-4-preview.png differ diff --git a/images/pe/mqtt-broker/user-guide/ui/subscription-session-4.png b/images/pe/mqtt-broker/user-guide/ui/subscription-session-4.png new file mode 100644 index 0000000000..409365e6fe Binary files /dev/null and b/images/pe/mqtt-broker/user-guide/ui/subscription-session-4.png differ diff --git a/images/pe/mqtt-broker/user-guide/ui/subscription-session-5-preview.png b/images/pe/mqtt-broker/user-guide/ui/subscription-session-5-preview.png new file mode 100644 index 0000000000..b2929cef9d Binary files /dev/null and b/images/pe/mqtt-broker/user-guide/ui/subscription-session-5-preview.png differ diff --git a/images/pe/mqtt-broker/user-guide/ui/subscription-session-5.png b/images/pe/mqtt-broker/user-guide/ui/subscription-session-5.png new file mode 100644 index 0000000000..cbd256cc79 Binary files /dev/null and b/images/pe/mqtt-broker/user-guide/ui/subscription-session-5.png differ diff --git a/images/pe/mqtt-broker/user-guide/ui/subscriptions-table-1-preview.png b/images/pe/mqtt-broker/user-guide/ui/subscriptions-table-1-preview.png new file mode 100644 index 0000000000..15df3bc1d3 Binary files /dev/null and b/images/pe/mqtt-broker/user-guide/ui/subscriptions-table-1-preview.png differ diff --git a/images/pe/mqtt-broker/user-guide/ui/subscriptions-table-1.png b/images/pe/mqtt-broker/user-guide/ui/subscriptions-table-1.png new file mode 100644 index 0000000000..9a283410e2 Binary files /dev/null and b/images/pe/mqtt-broker/user-guide/ui/subscriptions-table-1.png differ diff --git a/images/pe/mqtt-broker/user-guide/ui/subscriptions-table-2-preview.png b/images/pe/mqtt-broker/user-guide/ui/subscriptions-table-2-preview.png new file mode 100644 index 0000000000..86fbbe613b Binary files /dev/null and b/images/pe/mqtt-broker/user-guide/ui/subscriptions-table-2-preview.png differ diff --git a/images/pe/mqtt-broker/user-guide/ui/subscriptions-table-2.png b/images/pe/mqtt-broker/user-guide/ui/subscriptions-table-2.png new file mode 100644 index 0000000000..952aac610a Binary files /dev/null and b/images/pe/mqtt-broker/user-guide/ui/subscriptions-table-2.png differ diff --git a/images/pe/mqtt-broker/user-guide/ui/unauthorized-clients-1-preview.png b/images/pe/mqtt-broker/user-guide/ui/unauthorized-clients-1-preview.png new file mode 100644 index 0000000000..17042a1e06 Binary files /dev/null and b/images/pe/mqtt-broker/user-guide/ui/unauthorized-clients-1-preview.png differ diff --git a/images/pe/mqtt-broker/user-guide/ui/unauthorized-clients-1.png b/images/pe/mqtt-broker/user-guide/ui/unauthorized-clients-1.png new file mode 100644 index 0000000000..3b6640c42e Binary files /dev/null and b/images/pe/mqtt-broker/user-guide/ui/unauthorized-clients-1.png differ diff --git a/images/pe/mqtt-broker/user-guide/ui/unauthorized-clients-2-preview.png b/images/pe/mqtt-broker/user-guide/ui/unauthorized-clients-2-preview.png new file mode 100644 index 0000000000..b8560a573a Binary files /dev/null and b/images/pe/mqtt-broker/user-guide/ui/unauthorized-clients-2-preview.png differ diff --git a/images/pe/mqtt-broker/user-guide/ui/unauthorized-clients-2.png b/images/pe/mqtt-broker/user-guide/ui/unauthorized-clients-2.png new file mode 100644 index 0000000000..1680677db0 Binary files /dev/null and b/images/pe/mqtt-broker/user-guide/ui/unauthorized-clients-2.png differ diff --git a/images/pe/mqtt-broker/user-guide/ui/ws-connection-add-1-preview.png b/images/pe/mqtt-broker/user-guide/ui/ws-connection-add-1-preview.png new file mode 100644 index 0000000000..9bfdc80e5b Binary files /dev/null and b/images/pe/mqtt-broker/user-guide/ui/ws-connection-add-1-preview.png differ diff --git a/images/pe/mqtt-broker/user-guide/ui/ws-connection-add-1.png b/images/pe/mqtt-broker/user-guide/ui/ws-connection-add-1.png new file mode 100644 index 0000000000..c7eb5f02b8 Binary files /dev/null and b/images/pe/mqtt-broker/user-guide/ui/ws-connection-add-1.png differ diff --git a/images/pe/mqtt-broker/user-guide/ui/ws-connection-add-2-preview.png b/images/pe/mqtt-broker/user-guide/ui/ws-connection-add-2-preview.png new file mode 100644 index 0000000000..25ea812079 Binary files /dev/null and b/images/pe/mqtt-broker/user-guide/ui/ws-connection-add-2-preview.png differ diff --git a/images/pe/mqtt-broker/user-guide/ui/ws-connection-add-2.png b/images/pe/mqtt-broker/user-guide/ui/ws-connection-add-2.png new file mode 100644 index 0000000000..723958acde Binary files /dev/null and b/images/pe/mqtt-broker/user-guide/ui/ws-connection-add-2.png differ diff --git a/images/pe/mqtt-broker/user-guide/ui/ws-connection-add-camera-1-preview.png b/images/pe/mqtt-broker/user-guide/ui/ws-connection-add-camera-1-preview.png new file mode 100644 index 0000000000..3671cd3375 Binary files /dev/null and b/images/pe/mqtt-broker/user-guide/ui/ws-connection-add-camera-1-preview.png differ diff --git a/images/pe/mqtt-broker/user-guide/ui/ws-connection-add-camera-1.png b/images/pe/mqtt-broker/user-guide/ui/ws-connection-add-camera-1.png new file mode 100644 index 0000000000..607a73c2dc Binary files /dev/null and b/images/pe/mqtt-broker/user-guide/ui/ws-connection-add-camera-1.png differ diff --git a/images/pe/mqtt-broker/user-guide/ui/ws-connection-add-camera-2-preview.png b/images/pe/mqtt-broker/user-guide/ui/ws-connection-add-camera-2-preview.png new file mode 100644 index 0000000000..06f70b4409 Binary files /dev/null and b/images/pe/mqtt-broker/user-guide/ui/ws-connection-add-camera-2-preview.png differ diff --git a/images/pe/mqtt-broker/user-guide/ui/ws-connection-add-camera-2.png b/images/pe/mqtt-broker/user-guide/ui/ws-connection-add-camera-2.png new file mode 100644 index 0000000000..2e1db26f43 Binary files /dev/null and b/images/pe/mqtt-broker/user-guide/ui/ws-connection-add-camera-2.png differ diff --git a/images/pe/mqtt-broker/user-guide/ui/ws-connection-add-camera-3-preview.png b/images/pe/mqtt-broker/user-guide/ui/ws-connection-add-camera-3-preview.png new file mode 100644 index 0000000000..64228e6950 Binary files /dev/null and b/images/pe/mqtt-broker/user-guide/ui/ws-connection-add-camera-3-preview.png differ diff --git a/images/pe/mqtt-broker/user-guide/ui/ws-connection-add-camera-3.png b/images/pe/mqtt-broker/user-guide/ui/ws-connection-add-camera-3.png new file mode 100644 index 0000000000..fad65dfe36 Binary files /dev/null and b/images/pe/mqtt-broker/user-guide/ui/ws-connection-add-camera-3.png differ diff --git a/images/pe/mqtt-broker/user-guide/ui/ws-connection-add-camera-4-preview.png b/images/pe/mqtt-broker/user-guide/ui/ws-connection-add-camera-4-preview.png new file mode 100644 index 0000000000..8c1fc8c131 Binary files /dev/null and b/images/pe/mqtt-broker/user-guide/ui/ws-connection-add-camera-4-preview.png differ diff --git a/images/pe/mqtt-broker/user-guide/ui/ws-connection-add-camera-4.png b/images/pe/mqtt-broker/user-guide/ui/ws-connection-add-camera-4.png new file mode 100644 index 0000000000..8e05cdf16f Binary files /dev/null and b/images/pe/mqtt-broker/user-guide/ui/ws-connection-add-camera-4.png differ diff --git a/images/pe/mqtt-broker/user-guide/ui/ws-connection-add-hub-1-preview.png b/images/pe/mqtt-broker/user-guide/ui/ws-connection-add-hub-1-preview.png new file mode 100644 index 0000000000..be432e92bb Binary files /dev/null and b/images/pe/mqtt-broker/user-guide/ui/ws-connection-add-hub-1-preview.png differ diff --git a/images/pe/mqtt-broker/user-guide/ui/ws-connection-add-hub-1.png b/images/pe/mqtt-broker/user-guide/ui/ws-connection-add-hub-1.png new file mode 100644 index 0000000000..c204e4f7f6 Binary files /dev/null and b/images/pe/mqtt-broker/user-guide/ui/ws-connection-add-hub-1.png differ diff --git a/images/pe/mqtt-broker/user-guide/ui/ws-connection-add-hub-2-preview.png b/images/pe/mqtt-broker/user-guide/ui/ws-connection-add-hub-2-preview.png new file mode 100644 index 0000000000..52807a57ed Binary files /dev/null and b/images/pe/mqtt-broker/user-guide/ui/ws-connection-add-hub-2-preview.png differ diff --git a/images/pe/mqtt-broker/user-guide/ui/ws-connection-add-hub-2.png b/images/pe/mqtt-broker/user-guide/ui/ws-connection-add-hub-2.png new file mode 100644 index 0000000000..08d79434af Binary files /dev/null and b/images/pe/mqtt-broker/user-guide/ui/ws-connection-add-hub-2.png differ diff --git a/images/pe/mqtt-broker/user-guide/ui/ws-connection-add-hub-3-preview.png b/images/pe/mqtt-broker/user-guide/ui/ws-connection-add-hub-3-preview.png new file mode 100644 index 0000000000..fdbf1d256a Binary files /dev/null and b/images/pe/mqtt-broker/user-guide/ui/ws-connection-add-hub-3-preview.png differ diff --git a/images/pe/mqtt-broker/user-guide/ui/ws-connection-add-hub-3.png b/images/pe/mqtt-broker/user-guide/ui/ws-connection-add-hub-3.png new file mode 100644 index 0000000000..1df75c36e8 Binary files /dev/null and b/images/pe/mqtt-broker/user-guide/ui/ws-connection-add-hub-3.png differ diff --git a/images/pe/mqtt-broker/user-guide/ui/ws-connection-add-hub-4-preview.png b/images/pe/mqtt-broker/user-guide/ui/ws-connection-add-hub-4-preview.png new file mode 100644 index 0000000000..854e026d9d Binary files /dev/null and b/images/pe/mqtt-broker/user-guide/ui/ws-connection-add-hub-4-preview.png differ diff --git a/images/pe/mqtt-broker/user-guide/ui/ws-connection-add-hub-4.png b/images/pe/mqtt-broker/user-guide/ui/ws-connection-add-hub-4.png new file mode 100644 index 0000000000..47d00c6452 Binary files /dev/null and b/images/pe/mqtt-broker/user-guide/ui/ws-connection-add-hub-4.png differ diff --git a/images/pe/mqtt-broker/user-guide/ui/ws-connection-advanced-1-preview.png b/images/pe/mqtt-broker/user-guide/ui/ws-connection-advanced-1-preview.png new file mode 100644 index 0000000000..f414ec9cd1 Binary files /dev/null and b/images/pe/mqtt-broker/user-guide/ui/ws-connection-advanced-1-preview.png differ diff --git a/images/pe/mqtt-broker/user-guide/ui/ws-connection-advanced-1.png b/images/pe/mqtt-broker/user-guide/ui/ws-connection-advanced-1.png new file mode 100644 index 0000000000..8533b8f346 Binary files /dev/null and b/images/pe/mqtt-broker/user-guide/ui/ws-connection-advanced-1.png differ diff --git a/images/pe/mqtt-broker/user-guide/ui/ws-connection-advanced-2-preview.png b/images/pe/mqtt-broker/user-guide/ui/ws-connection-advanced-2-preview.png new file mode 100644 index 0000000000..8f4a9b2b11 Binary files /dev/null and b/images/pe/mqtt-broker/user-guide/ui/ws-connection-advanced-2-preview.png differ diff --git a/images/pe/mqtt-broker/user-guide/ui/ws-connection-advanced-2.png b/images/pe/mqtt-broker/user-guide/ui/ws-connection-advanced-2.png new file mode 100644 index 0000000000..db21a5007c Binary files /dev/null and b/images/pe/mqtt-broker/user-guide/ui/ws-connection-advanced-2.png differ diff --git a/images/pe/mqtt-broker/user-guide/ui/ws-connection-delete-1-preview.png b/images/pe/mqtt-broker/user-guide/ui/ws-connection-delete-1-preview.png new file mode 100644 index 0000000000..637020f201 Binary files /dev/null and b/images/pe/mqtt-broker/user-guide/ui/ws-connection-delete-1-preview.png differ diff --git a/images/pe/mqtt-broker/user-guide/ui/ws-connection-delete-1.png b/images/pe/mqtt-broker/user-guide/ui/ws-connection-delete-1.png new file mode 100644 index 0000000000..c377a06288 Binary files /dev/null and b/images/pe/mqtt-broker/user-guide/ui/ws-connection-delete-1.png differ diff --git a/images/pe/mqtt-broker/user-guide/ui/ws-connection-delete-2-preview.png b/images/pe/mqtt-broker/user-guide/ui/ws-connection-delete-2-preview.png new file mode 100644 index 0000000000..654d80d154 Binary files /dev/null and b/images/pe/mqtt-broker/user-guide/ui/ws-connection-delete-2-preview.png differ diff --git a/images/pe/mqtt-broker/user-guide/ui/ws-connection-delete-2.png b/images/pe/mqtt-broker/user-guide/ui/ws-connection-delete-2.png new file mode 100644 index 0000000000..b5de1f37b0 Binary files /dev/null and b/images/pe/mqtt-broker/user-guide/ui/ws-connection-delete-2.png differ diff --git a/images/pe/mqtt-broker/user-guide/ui/ws-connection-details-1-preview.png b/images/pe/mqtt-broker/user-guide/ui/ws-connection-details-1-preview.png new file mode 100644 index 0000000000..235cce38ad Binary files /dev/null and b/images/pe/mqtt-broker/user-guide/ui/ws-connection-details-1-preview.png differ diff --git a/images/pe/mqtt-broker/user-guide/ui/ws-connection-details-1.png b/images/pe/mqtt-broker/user-guide/ui/ws-connection-details-1.png new file mode 100644 index 0000000000..683d1efa0c Binary files /dev/null and b/images/pe/mqtt-broker/user-guide/ui/ws-connection-details-1.png differ diff --git a/images/pe/mqtt-broker/user-guide/ui/ws-connection-details-2-preview.png b/images/pe/mqtt-broker/user-guide/ui/ws-connection-details-2-preview.png new file mode 100644 index 0000000000..3153773dd4 Binary files /dev/null and b/images/pe/mqtt-broker/user-guide/ui/ws-connection-details-2-preview.png differ diff --git a/images/pe/mqtt-broker/user-guide/ui/ws-connection-details-2.png b/images/pe/mqtt-broker/user-guide/ui/ws-connection-details-2.png new file mode 100644 index 0000000000..f814fed9bf Binary files /dev/null and b/images/pe/mqtt-broker/user-guide/ui/ws-connection-details-2.png differ diff --git a/images/pe/mqtt-broker/user-guide/ui/ws-connection-details-3-preview.png b/images/pe/mqtt-broker/user-guide/ui/ws-connection-details-3-preview.png new file mode 100644 index 0000000000..6091048e68 Binary files /dev/null and b/images/pe/mqtt-broker/user-guide/ui/ws-connection-details-3-preview.png differ diff --git a/images/pe/mqtt-broker/user-guide/ui/ws-connection-details-3.png b/images/pe/mqtt-broker/user-guide/ui/ws-connection-details-3.png new file mode 100644 index 0000000000..f52ea5ed4d Binary files /dev/null and b/images/pe/mqtt-broker/user-guide/ui/ws-connection-details-3.png differ diff --git a/images/pe/mqtt-broker/user-guide/ui/ws-connection-edit-1-preview.png b/images/pe/mqtt-broker/user-guide/ui/ws-connection-edit-1-preview.png new file mode 100644 index 0000000000..a78690b6f0 Binary files /dev/null and b/images/pe/mqtt-broker/user-guide/ui/ws-connection-edit-1-preview.png differ diff --git a/images/pe/mqtt-broker/user-guide/ui/ws-connection-edit-1.png b/images/pe/mqtt-broker/user-guide/ui/ws-connection-edit-1.png new file mode 100644 index 0000000000..fd6b262ebe Binary files /dev/null and b/images/pe/mqtt-broker/user-guide/ui/ws-connection-edit-1.png differ diff --git a/images/pe/mqtt-broker/user-guide/ui/ws-connection-edit-2-preview.png b/images/pe/mqtt-broker/user-guide/ui/ws-connection-edit-2-preview.png new file mode 100644 index 0000000000..7fb937db67 Binary files /dev/null and b/images/pe/mqtt-broker/user-guide/ui/ws-connection-edit-2-preview.png differ diff --git a/images/pe/mqtt-broker/user-guide/ui/ws-connection-edit-2.png b/images/pe/mqtt-broker/user-guide/ui/ws-connection-edit-2.png new file mode 100644 index 0000000000..4fd82cf296 Binary files /dev/null and b/images/pe/mqtt-broker/user-guide/ui/ws-connection-edit-2.png differ diff --git a/images/pe/mqtt-broker/user-guide/ui/ws-connection-ungraceful-disconnect-1-preview.png b/images/pe/mqtt-broker/user-guide/ui/ws-connection-ungraceful-disconnect-1-preview.png new file mode 100644 index 0000000000..753d2180a6 Binary files /dev/null and b/images/pe/mqtt-broker/user-guide/ui/ws-connection-ungraceful-disconnect-1-preview.png differ diff --git a/images/pe/mqtt-broker/user-guide/ui/ws-connection-ungraceful-disconnect-1.png b/images/pe/mqtt-broker/user-guide/ui/ws-connection-ungraceful-disconnect-1.png new file mode 100644 index 0000000000..75b8b00795 Binary files /dev/null and b/images/pe/mqtt-broker/user-guide/ui/ws-connection-ungraceful-disconnect-1.png differ diff --git a/images/pe/mqtt-broker/user-guide/ui/ws-connection-ungraceful-disconnect-2-preview.png b/images/pe/mqtt-broker/user-guide/ui/ws-connection-ungraceful-disconnect-2-preview.png new file mode 100644 index 0000000000..73adda0134 Binary files /dev/null and b/images/pe/mqtt-broker/user-guide/ui/ws-connection-ungraceful-disconnect-2-preview.png differ diff --git a/images/pe/mqtt-broker/user-guide/ui/ws-connection-ungraceful-disconnect-2.png b/images/pe/mqtt-broker/user-guide/ui/ws-connection-ungraceful-disconnect-2.png new file mode 100644 index 0000000000..708828d9d0 Binary files /dev/null and b/images/pe/mqtt-broker/user-guide/ui/ws-connection-ungraceful-disconnect-2.png differ diff --git a/images/pe/mqtt-broker/user-guide/ui/ws-connection-ungraceful-disconnect-3-preview.png b/images/pe/mqtt-broker/user-guide/ui/ws-connection-ungraceful-disconnect-3-preview.png new file mode 100644 index 0000000000..00f85e4d71 Binary files /dev/null and b/images/pe/mqtt-broker/user-guide/ui/ws-connection-ungraceful-disconnect-3-preview.png differ diff --git a/images/pe/mqtt-broker/user-guide/ui/ws-connection-ungraceful-disconnect-3.png b/images/pe/mqtt-broker/user-guide/ui/ws-connection-ungraceful-disconnect-3.png new file mode 100644 index 0000000000..11548f79b9 Binary files /dev/null and b/images/pe/mqtt-broker/user-guide/ui/ws-connection-ungraceful-disconnect-3.png differ diff --git a/images/pe/mqtt-broker/user-guide/ui/ws-connection-will-1-preview.png b/images/pe/mqtt-broker/user-guide/ui/ws-connection-will-1-preview.png new file mode 100644 index 0000000000..f77332f789 Binary files /dev/null and b/images/pe/mqtt-broker/user-guide/ui/ws-connection-will-1-preview.png differ diff --git a/images/pe/mqtt-broker/user-guide/ui/ws-connection-will-1.png b/images/pe/mqtt-broker/user-guide/ui/ws-connection-will-1.png new file mode 100644 index 0000000000..953695e962 Binary files /dev/null and b/images/pe/mqtt-broker/user-guide/ui/ws-connection-will-1.png differ diff --git a/images/pe/mqtt-broker/user-guide/ui/ws-connection-will-2-preview.png b/images/pe/mqtt-broker/user-guide/ui/ws-connection-will-2-preview.png new file mode 100644 index 0000000000..29432d607d Binary files /dev/null and b/images/pe/mqtt-broker/user-guide/ui/ws-connection-will-2-preview.png differ diff --git a/images/pe/mqtt-broker/user-guide/ui/ws-connection-will-2.png b/images/pe/mqtt-broker/user-guide/ui/ws-connection-will-2.png new file mode 100644 index 0000000000..71cfee5544 Binary files /dev/null and b/images/pe/mqtt-broker/user-guide/ui/ws-connection-will-2.png differ diff --git a/images/pe/mqtt-broker/user-guide/ui/ws-logs.png b/images/pe/mqtt-broker/user-guide/ui/ws-logs.png new file mode 100644 index 0000000000..50090e9e05 Binary files /dev/null and b/images/pe/mqtt-broker/user-guide/ui/ws-logs.png differ diff --git a/images/pe/mqtt-broker/user-guide/ui/ws-overview.png b/images/pe/mqtt-broker/user-guide/ui/ws-overview.png new file mode 100644 index 0000000000..5acefe4b65 Binary files /dev/null and b/images/pe/mqtt-broker/user-guide/ui/ws-overview.png differ diff --git a/images/pe/mqtt-broker/user-guide/ui/ws-publish-advanced-params.png b/images/pe/mqtt-broker/user-guide/ui/ws-publish-advanced-params.png new file mode 100644 index 0000000000..16d27c51ae Binary files /dev/null and b/images/pe/mqtt-broker/user-guide/ui/ws-publish-advanced-params.png differ diff --git a/images/pe/mqtt-broker/user-guide/ui/ws-publish-msg.png b/images/pe/mqtt-broker/user-guide/ui/ws-publish-msg.png new file mode 100644 index 0000000000..11b14faa71 Binary files /dev/null and b/images/pe/mqtt-broker/user-guide/ui/ws-publish-msg.png differ diff --git a/images/pe/mqtt-broker/user-guide/ui/ws-subscription-add-1-preview.png b/images/pe/mqtt-broker/user-guide/ui/ws-subscription-add-1-preview.png new file mode 100644 index 0000000000..aca5f5ebc1 Binary files /dev/null and b/images/pe/mqtt-broker/user-guide/ui/ws-subscription-add-1-preview.png differ diff --git a/images/pe/mqtt-broker/user-guide/ui/ws-subscription-add-1.png b/images/pe/mqtt-broker/user-guide/ui/ws-subscription-add-1.png new file mode 100644 index 0000000000..2de8aad81e Binary files /dev/null and b/images/pe/mqtt-broker/user-guide/ui/ws-subscription-add-1.png differ diff --git a/images/pe/mqtt-broker/user-guide/ui/ws-subscription-add-2-preview.png b/images/pe/mqtt-broker/user-guide/ui/ws-subscription-add-2-preview.png new file mode 100644 index 0000000000..2439586f7b Binary files /dev/null and b/images/pe/mqtt-broker/user-guide/ui/ws-subscription-add-2-preview.png differ diff --git a/images/pe/mqtt-broker/user-guide/ui/ws-subscription-add-2.png b/images/pe/mqtt-broker/user-guide/ui/ws-subscription-add-2.png new file mode 100644 index 0000000000..27c11d85e5 Binary files /dev/null and b/images/pe/mqtt-broker/user-guide/ui/ws-subscription-add-2.png differ diff --git a/images/pe/mqtt-broker/user-guide/ui/ws-subscription-delete-1-preview.png b/images/pe/mqtt-broker/user-guide/ui/ws-subscription-delete-1-preview.png new file mode 100644 index 0000000000..b8308a07a3 Binary files /dev/null and b/images/pe/mqtt-broker/user-guide/ui/ws-subscription-delete-1-preview.png differ diff --git a/images/pe/mqtt-broker/user-guide/ui/ws-subscription-delete-1.png b/images/pe/mqtt-broker/user-guide/ui/ws-subscription-delete-1.png new file mode 100644 index 0000000000..b7700401db Binary files /dev/null and b/images/pe/mqtt-broker/user-guide/ui/ws-subscription-delete-1.png differ diff --git a/images/pe/mqtt-broker/user-guide/ui/ws-subscription-delete-2-preview.png b/images/pe/mqtt-broker/user-guide/ui/ws-subscription-delete-2-preview.png new file mode 100644 index 0000000000..53a0bdb30f Binary files /dev/null and b/images/pe/mqtt-broker/user-guide/ui/ws-subscription-delete-2-preview.png differ diff --git a/images/pe/mqtt-broker/user-guide/ui/ws-subscription-delete-2.png b/images/pe/mqtt-broker/user-guide/ui/ws-subscription-delete-2.png new file mode 100644 index 0000000000..569b23404a Binary files /dev/null and b/images/pe/mqtt-broker/user-guide/ui/ws-subscription-delete-2.png differ diff --git a/images/pe/mqtt-broker/user-guide/ui/ws-subscription-edit-1-preview.png b/images/pe/mqtt-broker/user-guide/ui/ws-subscription-edit-1-preview.png new file mode 100644 index 0000000000..37cc66301b Binary files /dev/null and b/images/pe/mqtt-broker/user-guide/ui/ws-subscription-edit-1-preview.png differ diff --git a/images/pe/mqtt-broker/user-guide/ui/ws-subscription-edit-1.png b/images/pe/mqtt-broker/user-guide/ui/ws-subscription-edit-1.png new file mode 100644 index 0000000000..10976eccb1 Binary files /dev/null and b/images/pe/mqtt-broker/user-guide/ui/ws-subscription-edit-1.png differ diff --git a/images/pe/mqtt-broker/user-guide/ui/ws-subscription-edit-2-preview.png b/images/pe/mqtt-broker/user-guide/ui/ws-subscription-edit-2-preview.png new file mode 100644 index 0000000000..676e264ff6 Binary files /dev/null and b/images/pe/mqtt-broker/user-guide/ui/ws-subscription-edit-2-preview.png differ diff --git a/images/pe/mqtt-broker/user-guide/ui/ws-subscription-edit-2.png b/images/pe/mqtt-broker/user-guide/ui/ws-subscription-edit-2.png new file mode 100644 index 0000000000..87c6433773 Binary files /dev/null and b/images/pe/mqtt-broker/user-guide/ui/ws-subscription-edit-2.png differ diff --git a/images/pe/mqtt-broker/user-guide/ui/ws-subscription-overview-1-preview.png b/images/pe/mqtt-broker/user-guide/ui/ws-subscription-overview-1-preview.png new file mode 100644 index 0000000000..58b562245c Binary files /dev/null and b/images/pe/mqtt-broker/user-guide/ui/ws-subscription-overview-1-preview.png differ diff --git a/images/pe/mqtt-broker/user-guide/ui/ws-subscription-overview-1.png b/images/pe/mqtt-broker/user-guide/ui/ws-subscription-overview-1.png new file mode 100644 index 0000000000..19e8654b2f Binary files /dev/null and b/images/pe/mqtt-broker/user-guide/ui/ws-subscription-overview-1.png differ diff --git a/images/pe/mqtt-broker/user-guide/ui/ws-table-filter.png b/images/pe/mqtt-broker/user-guide/ui/ws-table-filter.png new file mode 100644 index 0000000000..ca38f3fde1 Binary files /dev/null and b/images/pe/mqtt-broker/user-guide/ui/ws-table-filter.png differ diff --git a/images/pe/mqtt-broker/user-guide/ui/ws-table-msg-1-preview.png b/images/pe/mqtt-broker/user-guide/ui/ws-table-msg-1-preview.png new file mode 100644 index 0000000000..9b6821680d Binary files /dev/null and b/images/pe/mqtt-broker/user-guide/ui/ws-table-msg-1-preview.png differ diff --git a/images/pe/mqtt-broker/user-guide/ui/ws-table-msg-1.png b/images/pe/mqtt-broker/user-guide/ui/ws-table-msg-1.png new file mode 100644 index 0000000000..b3a21f4a52 Binary files /dev/null and b/images/pe/mqtt-broker/user-guide/ui/ws-table-msg-1.png differ diff --git a/images/pe/mqtt-broker/user-guide/ui/ws-table-msg-2-preview.png b/images/pe/mqtt-broker/user-guide/ui/ws-table-msg-2-preview.png new file mode 100644 index 0000000000..78fa213ade Binary files /dev/null and b/images/pe/mqtt-broker/user-guide/ui/ws-table-msg-2-preview.png differ diff --git a/images/pe/mqtt-broker/user-guide/ui/ws-table-msg-2.png b/images/pe/mqtt-broker/user-guide/ui/ws-table-msg-2.png new file mode 100644 index 0000000000..b0b1b98ed2 Binary files /dev/null and b/images/pe/mqtt-broker/user-guide/ui/ws-table-msg-2.png differ diff --git a/images/pe/mqtt-broker/user-guide/ui/ws-table-msg-3-preview.png b/images/pe/mqtt-broker/user-guide/ui/ws-table-msg-3-preview.png new file mode 100644 index 0000000000..ff9f721613 Binary files /dev/null and b/images/pe/mqtt-broker/user-guide/ui/ws-table-msg-3-preview.png differ diff --git a/images/pe/mqtt-broker/user-guide/ui/ws-table-msg-3.png b/images/pe/mqtt-broker/user-guide/ui/ws-table-msg-3.png new file mode 100644 index 0000000000..6b8fcf2c93 Binary files /dev/null and b/images/pe/mqtt-broker/user-guide/ui/ws-table-msg-3.png differ diff --git a/images/pe/mqtt-broker/user-guide/white-labeling/delete-image-1-preview.png b/images/pe/mqtt-broker/user-guide/white-labeling/delete-image-1-preview.png new file mode 100644 index 0000000000..22d8e8aa8f Binary files /dev/null and b/images/pe/mqtt-broker/user-guide/white-labeling/delete-image-1-preview.png differ diff --git a/images/pe/mqtt-broker/user-guide/white-labeling/delete-image-1.png b/images/pe/mqtt-broker/user-guide/white-labeling/delete-image-1.png new file mode 100644 index 0000000000..58fcb1c933 Binary files /dev/null and b/images/pe/mqtt-broker/user-guide/white-labeling/delete-image-1.png differ diff --git a/images/pe/mqtt-broker/user-guide/white-labeling/delete-image-2-preview.png b/images/pe/mqtt-broker/user-guide/white-labeling/delete-image-2-preview.png new file mode 100644 index 0000000000..c1c685b78c Binary files /dev/null and b/images/pe/mqtt-broker/user-guide/white-labeling/delete-image-2-preview.png differ diff --git a/images/pe/mqtt-broker/user-guide/white-labeling/delete-image-2.png b/images/pe/mqtt-broker/user-guide/white-labeling/delete-image-2.png new file mode 100644 index 0000000000..4980d793f6 Binary files /dev/null and b/images/pe/mqtt-broker/user-guide/white-labeling/delete-image-2.png differ diff --git a/images/pe/mqtt-broker/user-guide/white-labeling/delete-image-3-preview.png b/images/pe/mqtt-broker/user-guide/white-labeling/delete-image-3-preview.png new file mode 100644 index 0000000000..039209afd3 Binary files /dev/null and b/images/pe/mqtt-broker/user-guide/white-labeling/delete-image-3-preview.png differ diff --git a/images/pe/mqtt-broker/user-guide/white-labeling/delete-image-3.png b/images/pe/mqtt-broker/user-guide/white-labeling/delete-image-3.png new file mode 100644 index 0000000000..b8580b92a2 Binary files /dev/null and b/images/pe/mqtt-broker/user-guide/white-labeling/delete-image-3.png differ diff --git a/images/pe/mqtt-broker/user-guide/white-labeling/delete-image-4-preview.png b/images/pe/mqtt-broker/user-guide/white-labeling/delete-image-4-preview.png new file mode 100644 index 0000000000..effe002d70 Binary files /dev/null and b/images/pe/mqtt-broker/user-guide/white-labeling/delete-image-4-preview.png differ diff --git a/images/pe/mqtt-broker/user-guide/white-labeling/delete-image-4.png b/images/pe/mqtt-broker/user-guide/white-labeling/delete-image-4.png new file mode 100644 index 0000000000..1200a1522f Binary files /dev/null and b/images/pe/mqtt-broker/user-guide/white-labeling/delete-image-4.png differ diff --git a/images/pe/mqtt-broker/user-guide/white-labeling/delete-image-5-preview.png b/images/pe/mqtt-broker/user-guide/white-labeling/delete-image-5-preview.png new file mode 100644 index 0000000000..06e3c64f79 Binary files /dev/null and b/images/pe/mqtt-broker/user-guide/white-labeling/delete-image-5-preview.png differ diff --git a/images/pe/mqtt-broker/user-guide/white-labeling/delete-image-5.png b/images/pe/mqtt-broker/user-guide/white-labeling/delete-image-5.png new file mode 100644 index 0000000000..01e0eee73c Binary files /dev/null and b/images/pe/mqtt-broker/user-guide/white-labeling/delete-image-5.png differ diff --git a/images/pe/mqtt-broker/user-guide/white-labeling/delete-image-6-preview.png b/images/pe/mqtt-broker/user-guide/white-labeling/delete-image-6-preview.png new file mode 100644 index 0000000000..5cb61c2c96 Binary files /dev/null and b/images/pe/mqtt-broker/user-guide/white-labeling/delete-image-6-preview.png differ diff --git a/images/pe/mqtt-broker/user-guide/white-labeling/delete-image-6.png b/images/pe/mqtt-broker/user-guide/white-labeling/delete-image-6.png new file mode 100644 index 0000000000..44e4b25b1b Binary files /dev/null and b/images/pe/mqtt-broker/user-guide/white-labeling/delete-image-6.png differ diff --git a/images/pe/mqtt-broker/user-guide/white-labeling/download-image-1-preview.png b/images/pe/mqtt-broker/user-guide/white-labeling/download-image-1-preview.png new file mode 100644 index 0000000000..bb51594767 Binary files /dev/null and b/images/pe/mqtt-broker/user-guide/white-labeling/download-image-1-preview.png differ diff --git a/images/pe/mqtt-broker/user-guide/white-labeling/download-image-1.png b/images/pe/mqtt-broker/user-guide/white-labeling/download-image-1.png new file mode 100644 index 0000000000..f95402eeb5 Binary files /dev/null and b/images/pe/mqtt-broker/user-guide/white-labeling/download-image-1.png differ diff --git a/images/pe/mqtt-broker/user-guide/white-labeling/download-image-2-preview.png b/images/pe/mqtt-broker/user-guide/white-labeling/download-image-2-preview.png new file mode 100644 index 0000000000..344b4b2d52 Binary files /dev/null and b/images/pe/mqtt-broker/user-guide/white-labeling/download-image-2-preview.png differ diff --git a/images/pe/mqtt-broker/user-guide/white-labeling/download-image-2.png b/images/pe/mqtt-broker/user-guide/white-labeling/download-image-2.png new file mode 100644 index 0000000000..6615f05e7d Binary files /dev/null and b/images/pe/mqtt-broker/user-guide/white-labeling/download-image-2.png differ diff --git a/images/pe/mqtt-broker/user-guide/white-labeling/edit-image-1-preview.png b/images/pe/mqtt-broker/user-guide/white-labeling/edit-image-1-preview.png new file mode 100644 index 0000000000..be0bc65d19 Binary files /dev/null and b/images/pe/mqtt-broker/user-guide/white-labeling/edit-image-1-preview.png differ diff --git a/images/pe/mqtt-broker/user-guide/white-labeling/edit-image-1.png b/images/pe/mqtt-broker/user-guide/white-labeling/edit-image-1.png new file mode 100644 index 0000000000..2353021eee Binary files /dev/null and b/images/pe/mqtt-broker/user-guide/white-labeling/edit-image-1.png differ diff --git a/images/pe/mqtt-broker/user-guide/white-labeling/edit-image-2-preview.png b/images/pe/mqtt-broker/user-guide/white-labeling/edit-image-2-preview.png new file mode 100644 index 0000000000..0e74310a3a Binary files /dev/null and b/images/pe/mqtt-broker/user-guide/white-labeling/edit-image-2-preview.png differ diff --git a/images/pe/mqtt-broker/user-guide/white-labeling/edit-image-2.png b/images/pe/mqtt-broker/user-guide/white-labeling/edit-image-2.png new file mode 100644 index 0000000000..91b9708358 Binary files /dev/null and b/images/pe/mqtt-broker/user-guide/white-labeling/edit-image-2.png differ diff --git a/images/pe/mqtt-broker/user-guide/white-labeling/edit-image-3-preview.png b/images/pe/mqtt-broker/user-guide/white-labeling/edit-image-3-preview.png new file mode 100644 index 0000000000..55c72d6745 Binary files /dev/null and b/images/pe/mqtt-broker/user-guide/white-labeling/edit-image-3-preview.png differ diff --git a/images/pe/mqtt-broker/user-guide/white-labeling/edit-image-3.png b/images/pe/mqtt-broker/user-guide/white-labeling/edit-image-3.png new file mode 100644 index 0000000000..a4da81929c Binary files /dev/null and b/images/pe/mqtt-broker/user-guide/white-labeling/edit-image-3.png differ diff --git a/images/pe/mqtt-broker/user-guide/white-labeling/export-image-1-preview.png b/images/pe/mqtt-broker/user-guide/white-labeling/export-image-1-preview.png new file mode 100644 index 0000000000..ed2c9f1853 Binary files /dev/null and b/images/pe/mqtt-broker/user-guide/white-labeling/export-image-1-preview.png differ diff --git a/images/pe/mqtt-broker/user-guide/white-labeling/export-image-1.png b/images/pe/mqtt-broker/user-guide/white-labeling/export-image-1.png new file mode 100644 index 0000000000..24cd06ed9f Binary files /dev/null and b/images/pe/mqtt-broker/user-guide/white-labeling/export-image-1.png differ diff --git a/images/pe/mqtt-broker/user-guide/white-labeling/export-image-2-preview.png b/images/pe/mqtt-broker/user-guide/white-labeling/export-image-2-preview.png new file mode 100644 index 0000000000..612dfb8c92 Binary files /dev/null and b/images/pe/mqtt-broker/user-guide/white-labeling/export-image-2-preview.png differ diff --git a/images/pe/mqtt-broker/user-guide/white-labeling/export-image-2.png b/images/pe/mqtt-broker/user-guide/white-labeling/export-image-2.png new file mode 100644 index 0000000000..7ae3271b81 Binary files /dev/null and b/images/pe/mqtt-broker/user-guide/white-labeling/export-image-2.png differ diff --git a/images/pe/mqtt-broker/user-guide/white-labeling/image-gallery.png b/images/pe/mqtt-broker/user-guide/white-labeling/image-gallery.png new file mode 100644 index 0000000000..dba05c5dd1 Binary files /dev/null and b/images/pe/mqtt-broker/user-guide/white-labeling/image-gallery.png differ diff --git a/images/pe/mqtt-broker/user-guide/white-labeling/image-viewing-mode-1-preview.png b/images/pe/mqtt-broker/user-guide/white-labeling/image-viewing-mode-1-preview.png new file mode 100644 index 0000000000..d9f1796097 Binary files /dev/null and b/images/pe/mqtt-broker/user-guide/white-labeling/image-viewing-mode-1-preview.png differ diff --git a/images/pe/mqtt-broker/user-guide/white-labeling/image-viewing-mode-1.png b/images/pe/mqtt-broker/user-guide/white-labeling/image-viewing-mode-1.png new file mode 100644 index 0000000000..259d50d734 Binary files /dev/null and b/images/pe/mqtt-broker/user-guide/white-labeling/image-viewing-mode-1.png differ diff --git a/images/pe/mqtt-broker/user-guide/white-labeling/image-viewing-mode-2-preview.png b/images/pe/mqtt-broker/user-guide/white-labeling/image-viewing-mode-2-preview.png new file mode 100644 index 0000000000..40046efb90 Binary files /dev/null and b/images/pe/mqtt-broker/user-guide/white-labeling/image-viewing-mode-2-preview.png differ diff --git a/images/pe/mqtt-broker/user-guide/white-labeling/image-viewing-mode-2.png b/images/pe/mqtt-broker/user-guide/white-labeling/image-viewing-mode-2.png new file mode 100644 index 0000000000..7561ad8fc7 Binary files /dev/null and b/images/pe/mqtt-broker/user-guide/white-labeling/image-viewing-mode-2.png differ diff --git a/images/pe/mqtt-broker/user-guide/white-labeling/primary-accent-palette.png b/images/pe/mqtt-broker/user-guide/white-labeling/primary-accent-palette.png new file mode 100644 index 0000000000..88f81a38fd Binary files /dev/null and b/images/pe/mqtt-broker/user-guide/white-labeling/primary-accent-palette.png differ diff --git a/images/pe/mqtt-broker/user-guide/white-labeling/show-platform-name-and-version.png b/images/pe/mqtt-broker/user-guide/white-labeling/show-platform-name-and-version.png new file mode 100644 index 0000000000..724bba5ac3 Binary files /dev/null and b/images/pe/mqtt-broker/user-guide/white-labeling/show-platform-name-and-version.png differ diff --git a/images/pe/mqtt-broker/user-guide/white-labeling/update-image-1-preview.png b/images/pe/mqtt-broker/user-guide/white-labeling/update-image-1-preview.png new file mode 100644 index 0000000000..dda374593a Binary files /dev/null and b/images/pe/mqtt-broker/user-guide/white-labeling/update-image-1-preview.png differ diff --git a/images/pe/mqtt-broker/user-guide/white-labeling/update-image-1.png b/images/pe/mqtt-broker/user-guide/white-labeling/update-image-1.png new file mode 100644 index 0000000000..f8e536a117 Binary files /dev/null and b/images/pe/mqtt-broker/user-guide/white-labeling/update-image-1.png differ diff --git a/images/pe/mqtt-broker/user-guide/white-labeling/update-image-2-preview.png b/images/pe/mqtt-broker/user-guide/white-labeling/update-image-2-preview.png new file mode 100644 index 0000000000..72e3841569 Binary files /dev/null and b/images/pe/mqtt-broker/user-guide/white-labeling/update-image-2-preview.png differ diff --git a/images/pe/mqtt-broker/user-guide/white-labeling/update-image-2.png b/images/pe/mqtt-broker/user-guide/white-labeling/update-image-2.png new file mode 100644 index 0000000000..8bbc30c7a9 Binary files /dev/null and b/images/pe/mqtt-broker/user-guide/white-labeling/update-image-2.png differ diff --git a/images/pe/mqtt-broker/user-guide/white-labeling/update-image-3-preview.png b/images/pe/mqtt-broker/user-guide/white-labeling/update-image-3-preview.png new file mode 100644 index 0000000000..da9cbf09cb Binary files /dev/null and b/images/pe/mqtt-broker/user-guide/white-labeling/update-image-3-preview.png differ diff --git a/images/pe/mqtt-broker/user-guide/white-labeling/update-image-3.png b/images/pe/mqtt-broker/user-guide/white-labeling/update-image-3.png new file mode 100644 index 0000000000..9e56c8d3d2 Binary files /dev/null and b/images/pe/mqtt-broker/user-guide/white-labeling/update-image-3.png differ diff --git a/images/pe/mqtt-broker/user-guide/white-labeling/upload-image-1-preview.png b/images/pe/mqtt-broker/user-guide/white-labeling/upload-image-1-preview.png new file mode 100644 index 0000000000..baa40750d8 Binary files /dev/null and b/images/pe/mqtt-broker/user-guide/white-labeling/upload-image-1-preview.png differ diff --git a/images/pe/mqtt-broker/user-guide/white-labeling/upload-image-1.png b/images/pe/mqtt-broker/user-guide/white-labeling/upload-image-1.png new file mode 100644 index 0000000000..a9cfe84104 Binary files /dev/null and b/images/pe/mqtt-broker/user-guide/white-labeling/upload-image-1.png differ diff --git a/images/pe/mqtt-broker/user-guide/white-labeling/upload-image-2-preview.png b/images/pe/mqtt-broker/user-guide/white-labeling/upload-image-2-preview.png new file mode 100644 index 0000000000..642aa4dd4d Binary files /dev/null and b/images/pe/mqtt-broker/user-guide/white-labeling/upload-image-2-preview.png differ diff --git a/images/pe/mqtt-broker/user-guide/white-labeling/upload-image-2.png b/images/pe/mqtt-broker/user-guide/white-labeling/upload-image-2.png new file mode 100644 index 0000000000..f898230b79 Binary files /dev/null and b/images/pe/mqtt-broker/user-guide/white-labeling/upload-image-2.png differ diff --git a/images/pe/mqtt-broker/user-guide/white-labeling/upload-image-3-preview.png b/images/pe/mqtt-broker/user-guide/white-labeling/upload-image-3-preview.png new file mode 100644 index 0000000000..649f621299 Binary files /dev/null and b/images/pe/mqtt-broker/user-guide/white-labeling/upload-image-3-preview.png differ diff --git a/images/pe/mqtt-broker/user-guide/white-labeling/upload-image-3.png b/images/pe/mqtt-broker/user-guide/white-labeling/upload-image-3.png new file mode 100644 index 0000000000..26404ec755 Binary files /dev/null and b/images/pe/mqtt-broker/user-guide/white-labeling/upload-image-3.png differ diff --git a/images/pe/mqtt-broker/user-guide/white-labeling/upload-image-4-preview.png b/images/pe/mqtt-broker/user-guide/white-labeling/upload-image-4-preview.png new file mode 100644 index 0000000000..28064e0de0 Binary files /dev/null and b/images/pe/mqtt-broker/user-guide/white-labeling/upload-image-4-preview.png differ diff --git a/images/pe/mqtt-broker/user-guide/white-labeling/upload-image-4.png b/images/pe/mqtt-broker/user-guide/white-labeling/upload-image-4.png new file mode 100644 index 0000000000..837438a728 Binary files /dev/null and b/images/pe/mqtt-broker/user-guide/white-labeling/upload-image-4.png differ diff --git a/images/pe/mqtt-broker/user-guide/white-labeling/upload-image-5-preview.png b/images/pe/mqtt-broker/user-guide/white-labeling/upload-image-5-preview.png new file mode 100644 index 0000000000..660267c37f Binary files /dev/null and b/images/pe/mqtt-broker/user-guide/white-labeling/upload-image-5-preview.png differ diff --git a/images/pe/mqtt-broker/user-guide/white-labeling/upload-image-5.png b/images/pe/mqtt-broker/user-guide/white-labeling/upload-image-5.png new file mode 100644 index 0000000000..61c4ed0697 Binary files /dev/null and b/images/pe/mqtt-broker/user-guide/white-labeling/upload-image-5.png differ diff --git a/images/pe/mqtt-broker/user-guide/white-labeling/upload-image-6-preview.png b/images/pe/mqtt-broker/user-guide/white-labeling/upload-image-6-preview.png new file mode 100644 index 0000000000..3d7d80903a Binary files /dev/null and b/images/pe/mqtt-broker/user-guide/white-labeling/upload-image-6-preview.png differ diff --git a/images/pe/mqtt-broker/user-guide/white-labeling/upload-image-6.png b/images/pe/mqtt-broker/user-guide/white-labeling/upload-image-6.png new file mode 100644 index 0000000000..a5578fc17c Binary files /dev/null and b/images/pe/mqtt-broker/user-guide/white-labeling/upload-image-6.png differ diff --git a/images/pe/mqtt-broker/user-guide/white-labeling/white-labeling-advanced-css-1-preview.png b/images/pe/mqtt-broker/user-guide/white-labeling/white-labeling-advanced-css-1-preview.png new file mode 100644 index 0000000000..09f7fc781a Binary files /dev/null and b/images/pe/mqtt-broker/user-guide/white-labeling/white-labeling-advanced-css-1-preview.png differ diff --git a/images/pe/mqtt-broker/user-guide/white-labeling/white-labeling-advanced-css-1.png b/images/pe/mqtt-broker/user-guide/white-labeling/white-labeling-advanced-css-1.png new file mode 100644 index 0000000000..a538ebf5a3 Binary files /dev/null and b/images/pe/mqtt-broker/user-guide/white-labeling/white-labeling-advanced-css-1.png differ diff --git a/images/pe/mqtt-broker/user-guide/white-labeling/white-labeling-advanced-css-2-preview.png b/images/pe/mqtt-broker/user-guide/white-labeling/white-labeling-advanced-css-2-preview.png new file mode 100644 index 0000000000..cf9e372966 Binary files /dev/null and b/images/pe/mqtt-broker/user-guide/white-labeling/white-labeling-advanced-css-2-preview.png differ diff --git a/images/pe/mqtt-broker/user-guide/white-labeling/white-labeling-advanced-css-2.png b/images/pe/mqtt-broker/user-guide/white-labeling/white-labeling-advanced-css-2.png new file mode 100644 index 0000000000..cf7c0fce1e Binary files /dev/null and b/images/pe/mqtt-broker/user-guide/white-labeling/white-labeling-advanced-css-2.png differ diff --git a/images/pe/mqtt-broker/user-guide/white-labeling/white-labeling-advanced-css-3-preview.png b/images/pe/mqtt-broker/user-guide/white-labeling/white-labeling-advanced-css-3-preview.png new file mode 100644 index 0000000000..6d4cabab63 Binary files /dev/null and b/images/pe/mqtt-broker/user-guide/white-labeling/white-labeling-advanced-css-3-preview.png differ diff --git a/images/pe/mqtt-broker/user-guide/white-labeling/white-labeling-advanced-css-3.png b/images/pe/mqtt-broker/user-guide/white-labeling/white-labeling-advanced-css-3.png new file mode 100644 index 0000000000..265c86b17e Binary files /dev/null and b/images/pe/mqtt-broker/user-guide/white-labeling/white-labeling-advanced-css-3.png differ diff --git a/images/pe/mqtt-broker/user-guide/white-labeling/white-labeling-custom.png b/images/pe/mqtt-broker/user-guide/white-labeling/white-labeling-custom.png new file mode 100644 index 0000000000..9b0bca0164 Binary files /dev/null and b/images/pe/mqtt-broker/user-guide/white-labeling/white-labeling-custom.png differ diff --git a/images/pe/mqtt-broker/user-guide/white-labeling/white-labeling-default-preview.png b/images/pe/mqtt-broker/user-guide/white-labeling/white-labeling-default-preview.png new file mode 100644 index 0000000000..faf35f35e7 Binary files /dev/null and b/images/pe/mqtt-broker/user-guide/white-labeling/white-labeling-default-preview.png differ diff --git a/images/pe/mqtt-broker/user-guide/white-labeling/white-labeling-default.png b/images/pe/mqtt-broker/user-guide/white-labeling/white-labeling-default.png new file mode 100644 index 0000000000..61557a57c7 Binary files /dev/null and b/images/pe/mqtt-broker/user-guide/white-labeling/white-labeling-default.png differ diff --git a/images/pe/mqtt-broker/user-guide/white-labeling/white-labeling-login-1-preview.png b/images/pe/mqtt-broker/user-guide/white-labeling/white-labeling-login-1-preview.png new file mode 100644 index 0000000000..85c9b6e624 Binary files /dev/null and b/images/pe/mqtt-broker/user-guide/white-labeling/white-labeling-login-1-preview.png differ diff --git a/images/pe/mqtt-broker/user-guide/white-labeling/white-labeling-login-1.png b/images/pe/mqtt-broker/user-guide/white-labeling/white-labeling-login-1.png new file mode 100644 index 0000000000..3649ec09c9 Binary files /dev/null and b/images/pe/mqtt-broker/user-guide/white-labeling/white-labeling-login-1.png differ diff --git a/images/pe/mqtt-broker/user-guide/white-labeling/white-labeling-login-2-preview.png b/images/pe/mqtt-broker/user-guide/white-labeling/white-labeling-login-2-preview.png new file mode 100644 index 0000000000..d07f24a052 Binary files /dev/null and b/images/pe/mqtt-broker/user-guide/white-labeling/white-labeling-login-2-preview.png differ diff --git a/images/pe/mqtt-broker/user-guide/white-labeling/white-labeling-login-2.png b/images/pe/mqtt-broker/user-guide/white-labeling/white-labeling-login-2.png new file mode 100644 index 0000000000..245685fa19 Binary files /dev/null and b/images/pe/mqtt-broker/user-guide/white-labeling/white-labeling-login-2.png differ diff --git a/images/pe/mqtt-broker/user-guide/white-labeling/white-labeling-login-3-preview.png b/images/pe/mqtt-broker/user-guide/white-labeling/white-labeling-login-3-preview.png new file mode 100644 index 0000000000..6827f0b103 Binary files /dev/null and b/images/pe/mqtt-broker/user-guide/white-labeling/white-labeling-login-3-preview.png differ diff --git a/images/pe/mqtt-broker/user-guide/white-labeling/white-labeling-login-3.png b/images/pe/mqtt-broker/user-guide/white-labeling/white-labeling-login-3.png new file mode 100644 index 0000000000..91fbde238c Binary files /dev/null and b/images/pe/mqtt-broker/user-guide/white-labeling/white-labeling-login-3.png differ diff --git a/images/pe/mqtt-broker/user-guide/white-labeling/white-labeling-title-logo-favicon.png b/images/pe/mqtt-broker/user-guide/white-labeling/white-labeling-title-logo-favicon.png new file mode 100644 index 0000000000..5dff9573ce Binary files /dev/null and b/images/pe/mqtt-broker/user-guide/white-labeling/white-labeling-title-logo-favicon.png differ diff --git a/images/pe/mqtt-broker/ws/ws_example.png b/images/pe/mqtt-broker/ws/ws_example.png new file mode 100644 index 0000000000..059dd6461d Binary files /dev/null and b/images/pe/mqtt-broker/ws/ws_example.png differ diff --git a/installations/index.html b/installations/index.html index ce1200e4a6..ebd528cfc6 100644 --- a/installations/index.html +++ b/installations/index.html @@ -668,13 +668,16 @@

Docker (Linux or Mac OS)

MQTT Broker

-

TBMQ represents an open-source MQTT message broker. It has the capacity to handle more than 4M concurrent client connections, supporting a minimum of 3M messages per second throughput 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. Read More.

+

TBMQ is a highly scalable and durable MQTT message broker built for real-time data processing across IoT ecosystems of any scale. It efficiently handles millions of concurrent client connections and processes millions of messages per second while maintaining low latency and reliable delivery. Designed for horizontal scalability, TBMQ seamlessly expands across cluster nodes to support massive deployments with millions of connected devices. Read More.

diff --git a/products/mqtt-broker/index.md b/products/mqtt-broker/index.md index f66ae06581..d7d769aeff 100644 --- a/products/mqtt-broker/index.md +++ b/products/mqtt-broker/index.md @@ -132,7 +132,10 @@ description: Deliver 3M+ MQTT messages/sec with TBMQ — a fault-tolerant open-s

Diverse installation options

Select the perfect fit for your infrastructure with our Docker-based or K8s-based deployments, crafted for seamless integration in both on-premise and cloud environments.

- Install TBMQ +
@@ -156,6 +159,8 @@ description: Deliver 3M+ MQTT messages/sec with TBMQ — a fault-tolerant open-s

Administer client sessions

Gain full visibility over your IoT ecosystem with the user-friendly session management dashboard, enabling you to monitor vital session attributes. Seamlessly administer your device subscriptions for efficient data communication.

+ TBMQ CEarrow firstarrow secondarrow third + TBMQ PEarrow firstarrow secondarrow third
@@ -167,8 +172,10 @@ description: Deliver 3M+ MQTT messages/sec with TBMQ — a fault-tolerant open-s
-

Administer client subscriptions

+

Administer client subscriptions

Efficiently manage subscriptions with a powerful and intuitive interface, ensuring optimal client communication and data flow across your IoT network.

+ TBMQ CEarrow firstarrow secondarrow third + TBMQ PEarrow firstarrow secondarrow third
@@ -180,8 +187,10 @@ description: Deliver 3M+ MQTT messages/sec with TBMQ — a fault-tolerant open-s
-

MQTT client credentials management

+

MQTT client credentials management

Strengthen your IoT security using the MQTT client credentials management system, crafted to handle both Basic and X.509 Certificate Chain authentication options effortlessly.

+ TBMQ CEarrow firstarrow secondarrow third + TBMQ PEarrow firstarrow secondarrow third
@@ -193,8 +202,10 @@ description: Deliver 3M+ MQTT messages/sec with TBMQ — a fault-tolerant open-s
-

MQTT websocket connectivity

+

MQTT websocket connectivity

Interact with your IoT devices in real-time through the WebSocket client, offering a streamlined and responsive interface for device messaging and monitoring.

+ TBMQ CEarrow firstarrow secondarrow third + TBMQ PEarrow firstarrow secondarrow third
@@ -206,8 +217,10 @@ description: Deliver 3M+ MQTT messages/sec with TBMQ — a fault-tolerant open-s
-

Real-time MQTT monitoring

+

Real-time MQTT monitoring

Keep a pulse on your IoT environment by tracking key metrics in real-time, ensuring your network's health and performance are always at their peak.

+ TBMQ CEarrow firstarrow secondarrow third + TBMQ PEarrow firstarrow secondarrow third
@@ -219,8 +232,10 @@ description: Deliver 3M+ MQTT messages/sec with TBMQ — a fault-tolerant open-s
-

External system integrations

+

External system integrations

Enable smooth data transmission between IoT devices, the broker, and external platforms with a reliable and scalable solution — all without impacting core broker performance.

+ TBMQ CEarrow firstarrow secondarrow third + TBMQ PEarrow firstarrow secondarrow third
@@ -229,6 +244,207 @@ description: Deliver 3M+ MQTT messages/sec with TBMQ — a fault-tolerant open-s
+
+
+
+

White labeling

+ PE only +

Rebrand the TBMQ broker web interface with your company or product logo and color scheme in 2 minutes. No coding or service restart required.

+ Read morearrow firstarrow secondarrow third +
+
+
+
+ White labeling +
+
+
+
+
+
+

RBAC

+ PE only +

Advanced user access control with role-based permissions. Manage broker operations with two predefined roles: Admin for full control, and Viewer for read-only access.

+ Read morearrow firstarrow secondarrow third +
+
+
+
+ RBAC +
+
+
+
+
+
+

Single sign-on

+ PE only +

Single Sign-On (SSO) integration for simplified and secure access. Seamlessly authenticate users through your organization’s identity provider, reducing password management and strengthening security.

+ Read morearrow firstarrow secondarrow third +
+
+
+
+ Single sign-on +
+
+
+ +
+ +
+
+
+
+
+
+

TBMQ feature comparison

+
+

Features

+

Community EditionCE

+

Professional EditionPE

+
+ + + +
+
+

Extensibility & Customization

+
+
+

System integrations

+

Basic

+

Advanced (coming soon)

+
+ +

White labeling

+
 
+
Green checkmark
+
+
+ +
+
+

Support

+
+
+

Support Model

+

Community

+

Advanced + SLA

+
+
+
@@ -281,6 +497,15 @@ description: Deliver 3M+ MQTT messages/sec with TBMQ — a fault-tolerant open-s
+
+
+ Blocked MQTT clients +
+

Blocked MQTT clients

+

Restrict access with rule-based blocking by Client ID, Username, IP address, or Regex. Ensures malicious clients are rejected early, conserves system resources, and keeps your MQTT broker secure.

+
+
+
Client session metrics @@ -290,6 +515,15 @@ description: Deliver 3M+ MQTT messages/sec with TBMQ — a fault-tolerant open-s
+
+
+ MQTT channel backpressure +
+

MQTT channel backpressure

+

Protect broker performance with smart handling of slow subscribers. TBMQ pauses delivery when clients can’t keep up and resumes once they recover, ensuring reliability and stability under load.

+
+
+
@@ -315,6 +549,22 @@ description: Deliver 3M+ MQTT messages/sec with TBMQ — a fault-tolerant open-s

TBMQ news

+
+
+
+ + TBMQ 2.2: Strengthening MQTT security with JWT and Client Blocking + +
+
+
+ Updates +
+ TBMQ 2.2: Strengthening MQTT security with JWT and Client Blocking +

We’re excited to announce the release of TBMQ 2.2.0! This release brings powerful new features that make TBMQ more secure, resilient, and easier to operate in production at scale.

+
+
+
@@ -363,22 +613,6 @@ description: Deliver 3M+ MQTT messages/sec with TBMQ — a fault-tolerant open-s
-
-
-
- - TBMQ 1.3.0 release - -
-
-
- Updates -
- TBMQ 1.3.0 release: WebSocket client, advanced MQTT 5 features, and more -

We’re delighted to introduce TBMQ version 1.3.0! This update improves MQTT over WebSocket functionality by introducing a new WebSocket client. It also broadens the scope of supported MQTT 5 features. Here’s an overview of the features and updates included in this release

-
-
-
diff --git a/products/mqtt-broker/mqtt-broker.sass b/products/mqtt-broker/mqtt-broker.sass index 73166228f2..9c127cad30 100644 --- a/products/mqtt-broker/mqtt-broker.sass +++ b/products/mqtt-broker/mqtt-broker.sass @@ -128,6 +128,19 @@ right: 22px filter: brightness(0) saturate(100%) invert(97%) sepia(63%) saturate(13%) hue-rotate(226deg) brightness(102%) contrast(100%) + .pe-only-banner + position: absolute + margin-left: 12px + padding: 4px 8px + font-size: 12px + font-weight: 500 + line-height: 20px + border-radius: 6px + color: #FFF + width: 61px + height: 28px + background: #1F8B4D + border: 1px solid #1A7340 #top-features h2 text-align: center @@ -248,15 +261,48 @@ order: 2 .block h4, h3 + display: inline-flex + width: max-content font-size: 28px padding-bottom: 20px line-height: 44px font-weight: 500 p - font-size: 18px + font-size: 16px text-align: justify + padding-bottom: 30px img width: 100% + &.shadow + border-radius: 12px + box-shadow: 0 2px 12px 0 rgba(0, 0, 0, 0.12) + a.read-more-button + position: relative + transition-duration: 0.3s + outline: none + font-size: 18px + line-height: 30xp + .arrow + transform: translate(0px) + transition-duration: 0.3s + filter: invert(38%) sepia(52%) saturate(993%) hue-rotate(131deg) brightness(103%) contrast(101%) + box-shadow: none !important + width: 12px !important + margin-left: 12px + position: absolute + top: 7px + &.first + opacity: 0.2 + &.second + opacity: 0.5 + &:hover + transition-duration: 0.3s + .first + transform: translate(10px) + .second + transform: translate(20px) + .third + transform: translate(30px) #installation-options margin-bottom: 24px @@ -298,7 +344,7 @@ font-size: 18px text-align: justify a - width: 189px + width: 196px line-height: 40px padding: 3px 24px 3px 24px border-radius: 8px @@ -310,9 +356,141 @@ background-color: rgba(0,0,0,.12) .button background: #1F8B4D !important - + .installation-options-buttons + display: flex + gap: 32px + #comparison-features + .comparison-table + padding: 100px + h2 + font-size: 36px + font-weight: 500 + line-height: 48px + color: #202020 + margin-bottom: 32px + @media (max-width: 900px) + font-size: 28px + line-height: 44px + .header + display: flex + justify-content: space-between + align-items: center + background-color: white + border-radius: 4px + height: 84px + margin-bottom: 4px + p + flex: 1 + font-size: 24px + font-weight: 500 + line-height: 36px + text-align: center + &:first-child + color: #3B3C3C + text-align: left + padding-left: 20px + &:nth-child(2) + color: #0D417B + &:nth-child(3) + color: #1F8B4D + span:last-child + display: none + @media (max-width: 900px) + &:nth-child(1) + margin-left: 20px + text-align: left + &:nth-child(2) + flex: 0.3 + &:nth-child(3) + flex: 0.3 + span:first-child + display: none + span:last-child + display: inline-block + @media (max-width: 500px) + &:nth-child(2) + flex: 0.2 + &:nth-child(3) + flex: 0.2 + .block + padding: 4px + background-color: white + border-radius: 4px + margin-bottom: 4px + .comparison-row + @media (max-width: 900px) + padding-right: 0 + display: flex + justify-content: space-between + align-items: center + padding: 12px 20px + max-height: 50px + border-bottom: 2px solid #E0E0E0 + text-decoration-color: #212121 + position: relative + &:not(:first-child) + &:hover + &:before + content: "" + height: 44px + display: block + border: 1px solid #00695C + position: absolute + left: 0 + background-color: #F9F9F9 + p + font-size: 15px + line-height: 28px + div + &.hidden-space + visibility: hidden + img + width: 24px + &:first-child + background-color: #F5F9F8 + border-bottom: none + p + flex: 1 + font-size: 18px + font-weight: 500 + line-height: 30px + color: #3B3C3C + &:last-child + border-bottom: none + max-height: 48px + p:nth-child(2) + text-align: center + a + color: #0D417B + p:nth-child(3) + text-align: center + a + color: #1F8B4D + p + flex: 1 + font-size: 14px + font-weight: 400 + line-height: 24px + color: #212121 + transition: font-size .3s + @media (max-width: 500px) + font-size: 12px + div + text-align: center + flex: 1 + @media (max-width: 900px) + flex: 0.3 + @media (max-width: 500px) + flex: 0.17 + &:last-child + .comparison-row:last-child + @media (max-width: 500px) + p + font-size: 11px #bottom-features margin-bottom: 24px + padding-left: 0 + padding-right: 0 h2 font-size: 36px font-weight: 500 @@ -490,6 +668,12 @@ height: 650px left: -1280px background-color: #00240F + &.main5 + top: 10px + width: 2560px + height: 1850px + left: -1280px + background-color: #F2F8F4 .header-animation max-width: 100% @@ -557,7 +741,7 @@ .tbmq-title font-size: 36px font-weight: 500 - line-height: 70px + line-height: 90px .tbmq-description font-weight: 500 margin-top: 40px @@ -653,7 +837,7 @@ .tbmq-title font-size: 64px font-weight: 500 - line-height: 70px + line-height: 90px .tbmq-description font-weight: 500 font-size: 28px @@ -709,10 +893,8 @@ #hero #hero-content .tbmq-title - line-height: 70px + line-height: 90px font-size: 64px - .tbmq-title:first-child - margin-bottom: 20px .tbmq-description font-size: 28px margin-top: 40px @@ -725,7 +907,7 @@ padding-top: 100px #bottom-features h2 - padding-top: 150px + padding-top: 100px text-align: center #background div