代码拉取完成,页面将自动刷新
同步操作将从 iresty/Apache APISIX 强制同步,此操作会覆盖自 Fork 仓库以来所做的任何修改,且无法恢复!!!
确定后同步将在后台操作,完成时将刷新页面,请耐心等待。
docs
(#3685)
title |
---|
mqtt-proxy |
The plugin mqtt-proxy
only works in stream model, it help you to dynamic load
balance by client_id
of MQTT.
And this plugin both support MQTT protocol 3.1.* and 5.0.
Name | Type | Requirement | Default | Valid | Description |
---|---|---|---|---|---|
protocol_name | string | required | Name of protocol, should be MQTT in normal. |
||
protocol_level | integer | required | Level of protocol, it should be 4 for MQTT 3.1.* . it should be 5 for MQTT 5.0 . |
||
upstream.ip | string | required | IP address of upstream, will forward current request to. | ||
upstream.port | number | required | Port of upstream, will forward current request to. |
To enable this plugin, we need to enable the stream_proxy configuration in conf/config.yaml
first.
For example, the following configuration represents listening on the 9100 TCP port.
...
router:
http: 'radixtree_uri'
ssl: 'radixtree_sni'
stream_proxy: # TCP/UDP proxy
tcp: # TCP proxy port list
- 9100
dns_resolver:
...
Then send the MQTT request to port 9100.
Creates a stream route, and enable plugin mqtt-proxy
.
curl http://127.0.0.1:9080/apisix/admin/stream_routes/1 -H 'X-API-KEY: edd1c9f034335f136f87ad84b625c8f1' -X PUT -d '
{
"remote_addr": "127.0.0.1",
"plugins": {
"mqtt-proxy": {
"protocol_name": "MQTT",
"protocol_level": 4,
"upstream": {
"ip": "127.0.0.1",
"port": 1980
}
}
}
}'
$ curl http://127.0.0.1:2379/v2/keys/apisix/stream_routes/1 -X DELETE
The mqtt-proxy
plugin has been deleted now.
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。