Skip to content

Commit 1f6f11c

Browse files
committed
Add Dashboard operation and restructure contents
1 parent 2f5b3af commit 1f6f11c

File tree

4 files changed

+234
-54
lines changed

4 files changed

+234
-54
lines changed

en_US/dashboard/cluster_settings.md

+5
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
EMQX provides hot configuration capabilities, which can dynamically modify the configuration at runtime without restarting the EMQX node. The EMQX Dashboard provides a visual configuration page for the hot configuration function, allowing you to easily modify the configuration of EMQX. The following configuration items are currently provided:
44

55
- MQTT Settings
6+
- Namespace
67
- Listeners
78
- Logging
89
- Monitoring
@@ -44,6 +45,10 @@ You can configure settings for the following fields in the **Force Shutdown** ta
4445
- **Max Heap Size**: Specifies the maximum allowed heap size for the system. If the heap size surpasses this limit, the system will initiate a forced shutdown to maintain stability. The default value is `32 MB`.
4546
- **Max Mailbox Size**: Defines the maximum allowed length for the mailbox message queue. If the queue exceeds this length, a forced shutdown will be triggered to prevent system overload. The default value is `1000`.
4647

48+
## Namespace
49+
50+
The Namespace feature in EMQX provides logical isolation for different client groups within a single cluster. You can manage namespaces on the **Namespace **page. For more detailed guidance on how to manage and configure namespaces, refer to the [Namespace](../multi-tenancy/namespace.md).
51+
4752
## Listeners
4853

4954
Click on **Management** -> **Listeners** in the left menu to enter the listeners page. This page displays a list of listeners by default. EMQX provides four common listeners:

en_US/multi-tenancy/namespace.md

+115-27
Original file line numberDiff line numberDiff line change
@@ -33,35 +33,27 @@ For example, to use the client's username as the namespace identifier, you can u
3333
mqtt.client_attrs_init = [{expression = username, set_as_attr = tns}]
3434
```
3535

36-
## Manage Namespace
37-
38-
Most of the namespace features are only configurable via the [REST API](../admin/api.md).
39-
40-
::: tip
41-
42-
Always check the corresponding Swagger API documentation for detailed and up-to-date request and response endpoint schemas. These are served by the Dashboard listeners at `/api-docs`.
43-
44-
:::
45-
46-
### Create a Namespace
36+
### Methods for Creating a Namespace
4737

48-
Before applying namespace-specific configuration, the namespace must be explicitly created using the `POST /mt/ns/<namespace>` API. Replace `<namespace>` with the desired namespace ID. No request body is required.
38+
There are two methods for creating namespaces: explicit creation and automatic creation.
4939

50-
### Configure Namespace
40+
1. **Explicit Namespace Creation**
41+
You can manually create a namespace through the Dashboard or REST API. Explicitly created namespaces can be directly managed, edited, and deleted.
5142

52-
After the namespace is created, it can be configured using the `PUT /mt/ns/<namespace>/config` API.
43+
**Use Case**: This method is ideal when you need full control over which namespaces exist and wish to manage them individually.
5344

54-
Use this endpoint to set rate limits, session limits, and other namespace-specific settings. For example configurations, see the [Quick Start](#configure-rate-limiter-per-namespace) section below.
45+
2. **Automatic Namespace Creation via EMQX Extracting `client_attrs.tns`**
46+
When clients connect, EMQX can automatically create namespaces based on the client’s `client_attrs.tns` attribute. This method is usually used in scenarios where manual namespace creation is not necessary and is suitable for large-scale automated deployments.
5547

56-
### Delete a Namespace
48+
**Use Case**: This approach works best for environments where clients connect dynamically, and each tenant or client requires an automatically generated, independent namespace.
5749

58-
To remove a namespace and its associated configuration, you can use the `DELETE /mt/ns/<namespace>` API.
50+
::: tip Note
5951

60-
::: tip Note
52+
Automatically created namespaces cannot be edited in the Dashboard. They are generated either through configuration files or automatically based on client metadata.
6153

62-
Before deleting a namespace, ensure that all active clients associated with the namespace are properly disconnected. EMQX provides an API to bulk kick all sessions under a namespace, and this process should be triggered automatically when deleting a managed namespace.
54+
:::
6355

64-
:::
56+
With these two methods, you can choose the most appropriate way to create namespaces based on your needs. Explicit creation is ideal for environments requiring strict control, while automatic creation is suitable for dynamic environments with reduced manual intervention.
6557

6658
## Quick Start: Configure Rate Limiter per Namespace
6759

@@ -87,13 +79,13 @@ For more details, refer to the [Rate Limit](../rate-limit/rate-limit.md) documen
8779

8880
:::
8981

90-
## Configuration Example
82+
### Example of Configuring a Namespace via REST API
9183

92-
Suppose you want to configure some specific rate limits for clients in the `ns1` namespace. You also want to limit the maximum number of concurrent sessions allowed in this namespace.
84+
This example configures a namespace using the [REST API](../admin/api.md). Suppose you want to configure some specific rate limits for clients in the `ns1` namespace. You also want to limit the maximum number of concurrent sessions allowed in this namespace.
9385

94-
### Create the Namespace
86+
#### Create the Namespace
9587

96-
Before applying any configuration, ensure the namespace is explicitly managed:
88+
Before applying any configuration, ensure the namespace is explicitly created:
9789

9890
```bash
9991
# No request body is needed
@@ -102,11 +94,11 @@ POST /mt/ns/ns1
10294

10395
::: tip Important Notice
10496

105-
If clients connect to a namespace before it is explicitly managed, they will not inherit configurations such as rate limiters applied later. To enforce new settings, those clients must be manually disconnected and reconnected.
97+
If clients connect to a namespace before it is explicitly created, they will not inherit configurations such as rate limiters applied later. To enforce new settings, those clients must be manually disconnected and reconnected.
10698

10799
:::
108100

109-
### Configure Rate Limits and Session Limits
101+
#### Configure Rate Limits and Session Limits
110102

111103
Once the namespace is created, apply the configuration using:
112104

@@ -148,7 +140,7 @@ PUT /mt/ns/ns1/config
148140

149141
This configuration applies both client-specific and shared tenant-wide rate limits and sets a maximum of 100 sessions for the namespace.
150142

151-
### Disable Namespace Rate Limiters
143+
#### Disable Namespace Rate Limiters
152144

153145
If you want to remove rate limiting entirely, you can update the configuration again and set the limiter types to `"disabled"`:
154146

@@ -166,3 +158,99 @@ PUT /mt/ns/ns1/config
166158
}
167159
}
168160
```
161+
162+
## Manage Namespace
163+
164+
You can configure and manage namespaces through the Dashboard and REST API.
165+
166+
### Manage Namespaces via Dashboard
167+
168+
In the Dashboard, click **Manage** -> **Namespace** in the left menu. On the **Namespaces** page, you can view, create, edit, and delete namespaces, as well as manage clients connected to namespaces.
169+
170+
By default, the namespace list only shows explicitly created namespaces. You can toggle the switch at the top left of the page to show both explicitly created namespaces and those automatically created by EMQX from the `client_attrs.tns` attribute.
171+
172+
::: tip
173+
174+
Automatically created namespaces cannot be edited in the Dashboard.
175+
176+
:::
177+
178+
#### Create a Namespace
179+
180+
1. Click **Create** in the top right corner of the **Namespaces** page.
181+
182+
2. In the **Create Namespace** dialog, complete the following configuration:
183+
184+
- **Namespace**: Enter the namespace name.
185+
186+
- **Max Sessions**: By default, this is set to `infinity` (unlimited). If enabled, you can set a specific number to limit the maximum number of sessions, preventing too many clients from occupying resources in a single namespace. When setting the max sessions, ensure it aligns with your cluster capacity to avoid rejected connections due to a low limit.
187+
188+
- **Tenant Limiter**: This configuration controls the traffic for all clients within the namespace. For instance, when multiple clients share the same infrastructure, tenant rate limits ensure fair bandwidth distribution. By default, this is disabled. If enabled, you can configure the following rate limits:
189+
190+
::: tip
191+
192+
For more details on this configuration, refer to the tooltips in the Dashboard.
193+
194+
:::
195+
196+
- **Data Publish Rate**: Limits the bytes the current tenant can send to EMQX per second.
197+
- **Data Publish Burst**: Allows additional bytes to be sent during bursts.
198+
- **Messages Publish Rate**: Limits the maximum number of messages a tenant can send per second.
199+
- **Messages Publish Burst**: Allows additional messages to be sent during bursts.
200+
201+
- **Client Limiter**: This configuration controls traffic for individual clients. Client rate limiters are exclusive to each client, meaning the rate limit for one client won’t affect others. By default, this is disabled. If enabled, you can configure the following rate limits:
202+
203+
::: tip
204+
205+
For more details on this configuration, refer to the tooltips in the Dashboard.
206+
207+
:::
208+
209+
- **Data Publish Rate**: Limits the bytes a client can send to EMQX per second.
210+
- **Data Publish Burst**: Allows additional bytes to be sent during bursts.
211+
- **Messages Publish Rate**: Limits the maximum number of messages a client can send per second.
212+
- **Messages Publish Burst**: Allows additional messages to be sent during bursts.
213+
214+
3. After completing the configuration, click **Create**. The new namespace will appear in the list.
215+
216+
#### Manage Namespaces
217+
218+
To edit the settings for a specific namespace, click **Edit** in the **Actions** column for that namespace.
219+
220+
To delete a namespace, click **Delete** in the **Actions** column. After confirming, the namespace will be permanently deleted.
221+
222+
::: tip Note
223+
224+
Before deleting a namespace, ensure that all active clients associated with the namespace are properly disconnected.
225+
226+
:::
227+
228+
To view clients connected to a specific namespace, click **Clients** in the **Actions** column. You can also choose to bulk disconnect clients.
229+
230+
### Manage Namespaces via REST API
231+
232+
::: tip
233+
234+
Always check the corresponding Swagger API documentation for detailed and up-to-date request and response endpoint schemas. These are served by the Dashboard listeners at `/api-docs`.
235+
236+
:::
237+
238+
### Create a Namespace
239+
240+
Before applying namespace-specific configuration, the namespace must be explicitly created using the `POST /mt/ns/<namespace>` API. Replace `<namespace>` with the desired namespace ID. No request body is required.
241+
242+
### Configure Namespace
243+
244+
After the namespace is created, it can be configured using the `PUT /mt/ns/<namespace>/config` API.
245+
246+
Use this endpoint to set rate limits, session limits, and other namespace-specific settings. For example configurations, see the [Quick Start](#quick-start-configure-rate-limiter-per-namespace) section below.
247+
248+
### Delete a Namespace
249+
250+
To remove a namespace and its associated configuration, you can use the `DELETE /mt/ns/<namespace>` API.
251+
252+
::: tip Note
253+
254+
Before deleting a namespace, ensure that all active clients associated with the namespace are properly disconnected. EMQX provides an API to bulk kick all sessions under a namespace, and this process should be triggered automatically when deleting a managed namespace.
255+
256+
:::

zh_CN/dashboard/cluster_settings.md

+5
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
EMQX 提供了热配置能力,可以在运行时动态修改配置,无需重启 EMQX 节点。EMQX Dashboard 针对热配置功能,提供了一个可视化配置页面。通过该页面,可以方便的修改 EMQX 的配置。目前提供了以下配置项:
44

55
- MQTT 配置
6+
- 命名空间
67
- 监听器
78
- 日志
89
- 监控
@@ -44,6 +45,10 @@ EMQX 提供了热配置能力,可以在运行时动态修改配置,无需重
4445
- **最大堆内存**:指定系统允许的最大堆内存大小。如果堆内存超出此限制,系统将启动强制关闭,以保持稳定性。默认为`32 MB`
4546
- **最大邮箱大小**:定义邮箱消息队列的最大允许长度。如果队列长度超过此限制,系统将触发强制关闭以防止系统过载。默认为`1000`
4647

48+
## 命名空间
49+
50+
EMQX 中的命名空间功能为单个集群内的不同客户端组提供逻辑隔离。您可以在**命名空间**页面管理命名空间。有关如何管理和配置命名空间的详细指导,参阅[命名空间](../multi-tenancy/namespace.md)
51+
4752
## 监听器
4853

4954
点击左侧菜单中的**管理** -> **监听器**进入监听器页面。该页面默认是一个监听器的列表页。EMQX 默认提供了四个常用的监听器:

0 commit comments

Comments
 (0)