Skip to content

Commit

Permalink
* MDF [docs] update for multi-listeners
Browse files Browse the repository at this point in the history
Signed-off-by: wayne <yukang.wei@emqx.io>
  • Loading branch information
StargazerWayne committed May 21, 2024
1 parent 6bc7bbd commit f49c9f8
Show file tree
Hide file tree
Showing 2 changed files with 31 additions and 7 deletions.
18 changes: 15 additions & 3 deletions docs/en_US/config-description/listener.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ listeners.tcp.tcp_listener_1 = {
### **Example Configuration**

```hcl
listeners.ssl.<listener-name> = {
listeners.ssl {
bind = "0.0.0.0:8883" # Bind to all network interfaces on port 8883
# key_password = <yourpass> # String with the password to decrypt private keyfile
keyfile = "/etc/certs/key.pem" # Key file path
Expand Down Expand Up @@ -51,7 +51,7 @@ listeners.ssl.<listener-name> = {
### **Example Configuration**

```hcl
listeners.ws.<listener-name> = {
listeners.ws {
bind = "0.0.0.0:8083/mqtt" # Bind to all network interfaces on port 8083
}
```
Expand All @@ -65,7 +65,7 @@ listeners.ws.<listener-name> = {
### **Example Configuration**

```hcl
listeners.wss.<listener-name> = {
listeners.wss {
bind = "0.0.0.0:8084" # Bind to all network interfaces on port 8084
}
```
Expand All @@ -84,4 +84,16 @@ The secure WebSocket listener utilizes the same `keyfile`, `certfile`, and `cace

:::

## Upcoming Features

**TLS**

NanoMQ will support multi-listeners in upcoming releases.

```hcl
listeners.tcp.tcp_listener_1 = {
bind = "0.0.0.0:1883" # The listener binds to all network interfaces on port 1883
}
```

<!--@jaylin can we add multiple listeners, if yes, it's good if we could give some examples.-->
20 changes: 16 additions & 4 deletions docs/zh_CN/config-description/listener.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ NanoMQ 支持四种监听器类型:TCP 监听器,SSL 监听器,WebSocket
### **配置示例**

```hcl
listeners.tcp.tcp_listener_1 = {
listeners.tcp {
bind = "0.0.0.0:1883" # 绑定 1883 端口
}
```
Expand All @@ -21,7 +21,7 @@ listeners.tcp.tcp_listener_1 = {
### **配置示例**

```hcl
listeners.ssl.<listener-name> = {
listeners.ssl {
bind = "0.0.0.0:8883" # 绑定 8883 端口
# key_password = <yourpass> # 解密私钥文件所需的密码字符串
keyfile = "/etc/certs/key.pem" # 密钥文件路径
Expand Down Expand Up @@ -51,7 +51,7 @@ listeners.ssl.<listener-name> = {
### **配置示例**

```hcl
listeners.ws.<listener-name> = {
listeners.ws {
bind = "0.0.0.0:8083/mqtt" # 绑定 8083 端口
}
```
Expand All @@ -65,7 +65,7 @@ listeners.ws.<listener-name> = {
### **配置示例**

```hcl
listeners.wss.<listener-name> = {
listeners.wss {
bind = "0.0.0.0:8084" # 绑定 8084 端口
}
```
Expand All @@ -84,5 +84,17 @@ Secure WebSocket 监听器与 SSL 监听器共用 `keyfile`、`certfile` 和 `ca

:::

## 功能预告

**TLS**

接下来的版本中NanoMQ将会支持多监听器的配置。

```hcl
listeners.tcp.tcp_listener_1 = {
bind = "0.0.0.0:1883" # 绑定 1883 端口
}
```

<!--@jaylin can we add multiple listeners, if yes, it's good if we could give some examples.-->

0 comments on commit f49c9f8

Please sign in to comment.