-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
386b102
commit 76437c9
Showing
574 changed files
with
10,411 additions
and
55 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
website/i18n/zh-Hans/docusaurus-plugin-content-docs/current.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
13 changes: 13 additions & 0 deletions
13
.../docusaurus-plugin-content-docs/version-3.1.x/01_get_started/1_quick_install.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
--- | ||
sidebar_position: 1 | ||
title: "快速安装" | ||
--- | ||
|
||
推荐使用Docker,快速开启BifroMQ。 | ||
``` | ||
docker run -d --name bifromq -p 1883:1883 bifromq/bifromq:latest | ||
``` | ||
|
||
## 其他安装选项 | ||
|
||
有关更多安装替代方案,请参阅:[安装](../02_installation/intro.md)。 |
30 changes: 30 additions & 0 deletions
30
...s/docusaurus-plugin-content-docs/version-3.1.x/01_get_started/2_quick_verify.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
--- | ||
sidebar_position: 2 | ||
title: "快速验证" | ||
--- | ||
|
||
以下是使用客户端工具MQTTX 快速验证 BifroMQ 基本 MQTT 功能的步骤。 | ||
|
||
1. 访问 https://mqttx.app/ 下载并安装 MQTTX。 | ||
2. 打开 MQTTX 并点击左侧边栏的“新建连接”或“+”号以创建新的连接配置。 | ||
|
||
![newconn](./images/newconn.jpg) | ||
|
||
3. 填写所需字段: | ||
* Name:此配置的名称。您可以选择任意名称。 | ||
* Client ID:客户端 ID,您可以手动设置或使用右侧的按钮随机生成。它必须包含字符“a-z”、“0-9”、“_”、“-”,并且不能超过 128 字节。使用 UTF8 编码且必须是唯一的。 | ||
* Host: 连接地址。以协议前缀开始(对于 TCP 使用 mqtt://,对于 TLS/SSL 使用 mqtts://,或对于 WSS 使用 wss://),后跟可以访问 BifroMQ 服务器的域名。 | ||
* Port: 连接端口。根据协议前缀选择适当的端口。默认端口是 TCP:1883,TLS/SSL:1884,WSS:443。 | ||
* Username & Password: 输入您拥有的用户名和密码,或者如果您的BifroMQ安装仅用于测试,则留空。 | ||
* MQTT Version: 选择 3.1、3.1.1、5.0 | ||
|
||
4. 正确输入连接配置后,点击右上角的'连接'以连接到服务器。 | ||
5. 订阅一个主题:点击左上角的“新建订阅”按钮,并在弹出的对话框中输入主题。 | ||
|
||
![subscribe](./images/subscribe.jpg) | ||
|
||
6. 发布消息:在消息发送/接收界面,输入您在右下角订阅的相同主题。选择默认 QoS 0,输入消息内容,并点击发送按钮发布。 | ||
|
||
![publish](./images/publish.jpg) | ||
|
||
7. 消息成功发送后,您应该能在界面的右侧看到发送的消息。 |
44 changes: 44 additions & 0 deletions
44
...8n/zh-Hans/docusaurus-plugin-content-docs/version-3.1.x/01_get_started/3_faq.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
--- | ||
sidebar_position: 3 | ||
title: "常见问题" | ||
--- | ||
|
||
## BifroMQ支持哪些版本的MQTT协议? | ||
BifroMQ全面支持以下MQTT协议版本:v3.1、v3.1.1 和 v5.0。这种多样性确保了BifroMQ能够适应广泛的IoT设备和应用程序,遵循不同的协议标准。此外,BifroMQ允许在运行时动态控制租户级别的协议能力,提供定制的连接选项以满足特定租户的需求。 | ||
|
||
## BifroMQ的Java版本要求是什么? | ||
|
||
BifroMQ的Java版本要求可以分为两个方面: | ||
- **BifroMQ运行环境**: BifroMQ本身需要JDK 17或更高版本才能运行。 | ||
- **BifroMQ插件开发**: 对于开发BifroMQ插件,没有强制要求特定的Java语言版本或JDK版本。然而,插件开发者需要确保他们的插件在更高的Java环境中能够正常工作。为了防止兼容性问题,我们建议将插件的运行环境与BifroMQ的保持一致。 | ||
|
||
## BifroMQ包含内置规则引擎吗? | ||
|
||
与提供MQTT协议能力的其他产品或项目不同,BifroMQ的主要目标是作为一个高性能、多租户、分布式中间件,实现标准MQTT协议。"规则引擎"不是MQTT协议规范的一部分,因此不包含在BifroMQ中。BifroMQ更多地关注与上游和下游系统的以标准的方式集成。从这个角度看,"规则引擎"只是与BifroMQ集成的一种功能形式(甚至在不同的规则引擎项目中,还存在功能差异)。我们希望这种需求可以在BifroMQ开发者社区中以开放的方式得到满足。 | ||
|
||
## 如何使用BifroMQ进行数据集成? | ||
|
||
使用BifroMQ进行数据集成的方法在很大程度上取决于您的业务场景: | ||
|
||
- **单租户系统**: 对于逻辑上的单租户系统,其他系统可以直接使用MQTT协议与BifroMQ[集成](../05_user_guide/2_integration/intro.md)。例如,可以利用共享订阅并行订阅消息,或MQTT客户端可以直接向BifroMQ发布消息。这种方法完全解耦了上游和下游系统,便于比较不同的MQTT中间件。大多数专有企业应用属于此类。 | ||
|
||
- **多租户系统**: 对于共享资源架构的多租户业务场景,BifroMQ作为该类系统内的一个子系统,与其他多租户子系统共享同一个租户管理控制面。在这种情况下,系统集成需要采用BifroMQ的插件机制(目前还未开放)。下游系统将在插件级别与BifroMQ有一定程度的耦合,使得实现变得有些复杂。这通常用于构建Serverless云服务的业务场景。 | ||
|
||
## BifroMQ内置存储引擎主要用于哪些数据持久化? | ||
|
||
BifroMQ的内置存储引擎主要用于持久化MQTT协议要求的SessionState(参见: [MQTT v3.1.1 3.1.2.4](http://docs.oasis-open.org/mqtt/mqtt/v3.1.1/os/mqtt-v3.1.1-os.html#_Toc398718028))和Retain消息。这有助于防止Broker重启或崩溃时丢失会话状态。需要注意的是,持久化引擎大多数情况下与消息的QoS没有直接关系。例如,当一个MQTT连接开始一个持久会话时,离线QoS0订阅消息仍将被持久化,直到会话恢复并完成推送。 | ||
|
||
## 为什么BifroMQ没有管理控制台/UI界面? | ||
|
||
BifroMQ强调在各种类型的业务系统中的集成,因此它不在中间件级别定义更高级别的管理模式和概念。然而,BifroMQ确实提供了以下能力用于运行时控制集成和监控: | ||
- **[API](../05_user_guide/3_api/intro.md)**: 代理端控制逻辑,如强制断开连接。 | ||
- **[Metrics](../07_admin_guide/03_observability/metrics/intro.md)**: BifroMQ的运行时指标,可以与现有监控系统集成。 | ||
- **[EventCollector Plugin](../06_plugin/2_event_collector.md)**: BifroMQ操作过程中产生的各种事件,启用不同的事件溯源业务逻辑,如连接计数、在线/离线事件等。 | ||
- **[ResourceThrottler Plugin](../06_plugin/3_resource_throttler.md)**: 用于控制租户级资源使用。 | ||
- **[SettingProvider Plugin](../06_plugin/4_setting_provider/intro.md)**: 用于调整租户级运行时设置。 | ||
|
||
我们也鼓励社区开发者参与满足这些需求,并构建多样化的UI管理界面。 | ||
|
||
## BifroMQ和IoT Core之间的关系是什么? | ||
|
||
IoT Core是百度智能云提供的一套物联网核心套件,支持预付费和按量付费计费模式的公有云服务。BifroMQ和IoT Core有着密切的关系,因为BifroMQ是IoT Core的底层技术。BifroMQ的多租户、高性能和分布式能力为构建大规模的IoT Core设备连接和消息系统提供了强大支持。 |
8 changes: 8 additions & 0 deletions
8
.../i18n/zh-Hans/docusaurus-plugin-content-docs/version-3.1.x/01_get_started/_category_.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
{ | ||
"label": "快速开始", | ||
"position": 1, | ||
"link": { | ||
"type": "doc", | ||
"id": "get_started/intro" | ||
} | ||
} |
Binary file added
BIN
+305 KB
.../docusaurus-plugin-content-docs/version-3.1.x/01_get_started/images/newconn.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+292 KB
.../docusaurus-plugin-content-docs/version-3.1.x/01_get_started/images/publish.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+206 KB
...ocusaurus-plugin-content-docs/version-3.1.x/01_get_started/images/subscribe.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
43 changes: 43 additions & 0 deletions
43
...8n/zh-Hans/docusaurus-plugin-content-docs/version-3.1.x/01_get_started/intro.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
--- | ||
id: intro | ||
sidebar_position: 0 | ||
title: "介绍" | ||
--- | ||
|
||
BifroMQ是一个Java实现的高性能、分布式MQTT Broker,无缝集成了原生的多租户支持。它旨在促进大规模 IoT 设备连接和消息系统的构建。目前,BifroMQ 作为基础技术,服务于百度公有云服务[IoTCore](https://cloud.baidu.com/product/iot.html)。 | ||
|
||
## 名称由来 | ||
|
||
BifroMQ 的名字来源于北欧神话中的 `Bifröst`——一座连接 Midgard(人类的世界)和 Asgard(神的领域)的彩虹桥。如同 Bifröst,BifroMQ 作为一个灵活而坚固的桥梁,连接不同的系统或应用程序,以实现通过消息交换进行通信。这与 MQTT 中间件的核心功能相符,即管理和加速分布式系统中的消息传递。 | ||
|
||
Bifröst 的坚固象征着 BifroMQ 的稳定性和可靠性,其灵活性则标志着 BifroMQ 的可扩展性和适应性。简而言之,“BifroMQ”体现了一个连接各种系统或应用程序的、坚韧、可适应的 MQTT 中间件。 | ||
|
||
## 功能列表 | ||
|
||
* 完全支持 MQTT 3.1、3.1.1 和 5.0 版本的特性,覆盖 TCP、TLS、WS、WSS。 | ||
* 原生支持多租户、资源共享和工作负载隔离。 | ||
* 内置的分布式存储引擎,为 MQTT 工作负载优化,无需第三方中间件依赖。 | ||
* 扩展机制支持: | ||
* 认证/授权。 | ||
* 租户级运行时设置。 | ||
* 租户级资源限制。 | ||
* 事件。 | ||
* 系统/租户级监控。 | ||
|
||
## 社区 | ||
|
||
#### **问题跟踪** | ||
|
||
我们使用 GitHub [Issues](https://github.com/bifromqio/bifromq/issues) 来跟踪请求和错误。如果您有任何问题或遇到问题,随时开启一个 issue。 | ||
|
||
#### **Discord** | ||
|
||
<a href="https://discord.gg/Pfs3QRadRB"><img src="https://img.shields.io/discord/1115542029531885599?logo=discord&logoColor=white" alt="BifroMQ Discord 服务器" /></a> | ||
|
||
#### **微信群组** | ||
|
||
[通过电子邮件](mailto:[email protected]) 向我们发送您的微信 ID,以及为什么您对 BifroMQ 感兴趣的更多信息(我们很乐意听到),我们将尽快邀请您加入我们的群组。 | ||
|
||
## 专业服务 | ||
|
||
欢迎 [通过电子邮件](mailto:[email protected]) 联系我们。 |
35 changes: 35 additions & 0 deletions
35
...h-Hans/docusaurus-plugin-content-docs/version-3.1.x/02_installation/1_docker.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
--- | ||
sidebar_position: 1 | ||
title: "Docker" | ||
--- | ||
|
||
## 安装前提 | ||
|
||
* 已安装 [Docker](https://www.docker.com/)。 | ||
* 使用1883端口的权限,并且该端口可用。如果您没有权限,请更改为相应的端口。 | ||
|
||
## Docker命令 | ||
|
||
运行以下命令,在容器中以Linux用户 `bifromq` 的身份运行BifroMQ。 | ||
|
||
``` | ||
docker run -d --name bifromq -p 1883:1883 bifromq/bifromq:latest | ||
``` | ||
|
||
## 内存限制 | ||
|
||
默认情况下,BifroMQ进程启动时,会根据服务器的物理内存动态计算相关的JVM参数。然而,在容器化环境中启动时,它会内省主机机器的物理内存,可能会与Docker或容器施加的内存限制产生冲突,从而导致容器过早终止。 | ||
|
||
为了规避此类挑战,建议主动限制容器的内存消耗,并通过环境变量将这些限制传达给容器运行时。在BifroMQ启动时,会优先根据 `MEM_LIMIT` 环境变量计算JVM参数。下面提供了一个具体示例: | ||
|
||
``` | ||
docker run -d -m 10G -e MEM_LIMIT='10737418240' --name bifromq -p 1883:1883 bifromq/bifromq:latest | ||
``` | ||
|
||
***注意:MEM_LIMIT的单位是字节。*** | ||
|
||
进一步地,可以主动配置JVM堆内存,并直接将其传递给容器运行时,供BifroMQ使用。下面提供了一个具体示例: | ||
|
||
``` | ||
docker run -d -m 10G -e JVM_HEAP_OPTS='-Xms2G -Xmx4G -XX:MetaspaceSize=128m -XX:MaxMetaspaceSize=500m -XX:MaxDirectMemorySize=1G' --name bifromq -p 1883:1883 bifromq/bifromq:latest | ||
``` |
16 changes: 16 additions & 0 deletions
16
...zh-Hans/docusaurus-plugin-content-docs/version-3.1.x/02_installation/2_linux.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
--- | ||
sidebar_position: 2 | ||
title: "Linux" | ||
--- | ||
|
||
## 安装前提 | ||
|
||
* 运行环境已安装Java17或更高版本 | ||
* 获取BifroMQ最新[发布版](https://github.com/bifromqio/bifromq/releases) | ||
|
||
## 执行命令 | ||
|
||
``` | ||
tar -zxvf bifromq-*-standalone.tar.gz --strip-components 1 -C /usr/share/bifromq/ | ||
cd /usr/share/bifromq && ./bin/standalone.sh start | ||
``` |
17 changes: 17 additions & 0 deletions
17
...-Hans/docusaurus-plugin-content-docs/version-3.1.x/02_installation/3_windows.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
--- | ||
sidebar_position: 3 | ||
title: "Windows" | ||
--- | ||
|
||
## 安装前提 | ||
|
||
* 运行环境已安装Java17或更高版本 | ||
* 获取BifroMQ最新[发布版](https://github.com/bifromqio/bifromq/releases) | ||
|
||
## 执行命令 | ||
|
||
``` | ||
unzip -zxvf bifromq-*-standalone-windows.zip | ||
cd bifromq\bin | ||
standalone.bat start | ||
``` |
Oops, something went wrong.