feature: 新增ack逻辑、presence服务放到redis统一执行
This commit is contained in:
@@ -64,6 +64,7 @@ services:
|
||||
volumes:
|
||||
- ./rocketmq/broker/logs:/home/rocketmq/logs
|
||||
- ./rocketmq/broker/store:/home/rocketmq/store
|
||||
- ./rocketmq/timerwheel:/home/rocketmq/timerwheel
|
||||
- ./rocketmq/broker/conf/broker.conf:/home/rocketmq/rocketmq-5.3.2/conf/broker.conf
|
||||
- ./rocketmq/broker/conf/plain_acl.yml:/home/rocketmq/rocketmq-5.3.2/conf/plain_acl.yml
|
||||
depends_on:
|
||||
@@ -94,4 +95,24 @@ services:
|
||||
volumes:
|
||||
- /home/jenkins/work:/var/jenkins_home # 数据持久化
|
||||
- /var/run/docker.sock:/var/run/docker.sock # 宿主机 Docker 控制
|
||||
- /usr/bin/docker:/usr/bin/docker # 宿主机 Docker 命令
|
||||
- /usr/bin/docker:/usr/bin/docker # 宿主机 Docker 命令
|
||||
srs:
|
||||
image: ossrs/srs:5
|
||||
container_name: srs
|
||||
restart: always
|
||||
ports:
|
||||
- "1935:1935/tcp" # RTMP 推流
|
||||
- "1985:1985/tcp" # HTTP API
|
||||
- "7088:7088/tcp" # H5播放器/信令
|
||||
- "8000:8000/udp" # WebRTC媒体传输
|
||||
- "1989:1989/tcp" # WebRTC信令
|
||||
- "8443:8443/tcp" # HTTPS/WSS
|
||||
- "61100-61200:61100-61200/udp" # WebRTC动态端口范围
|
||||
environment:
|
||||
- CANDIDATE=192.168.1.37 # 公网ip
|
||||
- SRS_LISTEN=8000 # WebRTC监听端口
|
||||
- SRS_HTTP_SERVER_PORT=7088
|
||||
- SRS_HTTP_API_PORT=1985
|
||||
volumes:
|
||||
- "/home/docker/srs:/usr/local/srs/conf"
|
||||
command: [ "./objs/srs", "-c", "conf/srs_conf_7088.conf" ]
|
||||
@@ -2,10 +2,20 @@
|
||||
|
||||
上传目录下的docker文件夹到服务器/home/docker下面, 需要修改env文件夹rocketmq文件夹里面的配置, 特别是[broker.conf](docker/rocketmq/broker/conf/broker.conf)里面brokerIP1的值
|
||||
|
||||
```bash
|
||||
# 授权目录
|
||||
|
||||
mkdir /home/docker/rocketmq/broker/conf/ /home/docker/rocketmq/broker/logs/ /home/docker/rocketmq/broker/store/ -p
|
||||
|
||||
chmod 777 /home/docker/rocketmq/broker/conf/
|
||||
chmod 777 /home/docker/rocketmq/broker/logs/
|
||||
chmod 777 /home/docker/rocketmq/broker/store/
|
||||
chmod 777 /home/docker/rocketmq/timerwheel/
|
||||
```
|
||||
|
||||
## 🛠️ 启动命令
|
||||
- **仔细阅读**: docker-compose.yml 的内容(redis的密码也在这里面设置的)、./env 文件夹下面的内容,里面包含了账号密码等信息
|
||||
- **打开目录**: 当前文件夹下输入 cmd 回车
|
||||
- **执行命令**: docker-compose up -d
|
||||
- **导入nacos数据库**: [mysql-schema.sql](../mysql-schema.sql)
|
||||
- **导入nacos命名空间数据**: [nacos_config_export_20250816090745.zip](../../nacos/nacos_config_export_20250816090745.zip)
|
||||
- **导入nacos命名空间数据**: [nacos_config_export_20251019194635.zip](../nacos/nacos_config_export_20251019194635.zip)
|
||||
@@ -20,7 +20,7 @@ namesrvAddr=rocketmq-namesrv:9876
|
||||
|
||||
#启动IP,如果 docker 报 com.alibaba.rocketmq.remoting.exception.RemotingConnectException: connect to <192.168.0.120:10909> failed
|
||||
# 解决方式1 加上一句producer.setVipChannelEnabled(false);,解决方式2 brokerIP1 设置宿主机IP,不要使用docker 内部IP
|
||||
brokerIP1=rocketmq-broker
|
||||
brokerIP1=192.168.1.37
|
||||
#在发送消息时,自动创建服务器不存在的topic,默认创建的队列数
|
||||
defaultTopicQueueNums=4
|
||||
|
||||
@@ -71,14 +71,19 @@ abortFile=/home/rocketmq/store/abort
|
||||
maxMessageSize=65536
|
||||
|
||||
# 延迟消息配置
|
||||
#timerWheelEnable=false
|
||||
#enableScheduleMessage=false
|
||||
|
||||
timerWheelEnable=true
|
||||
# 启用延迟消息功能
|
||||
enableScheduleMessage=true
|
||||
# 定义延迟级别
|
||||
messageDelayLevel=1s 3s 5s 10s 30s 1m 2m 3m 4m 5m 6m 7m 8m 9m 10m 20m 30m 1h 2h
|
||||
# 确保此目录存在且可写
|
||||
#timerStorePath=/home/rocketmq/store/timerwheel
|
||||
#timerFlushIntervalMs=1000
|
||||
#timerPrecisionMs=1000
|
||||
#scheduleMessageServiceThreadPoolNums=4
|
||||
timerStorePath=/home/docker/rocketmq/timerwheel
|
||||
# 时间轮刷新间隔
|
||||
timerFlushIntervalMs=1000
|
||||
# 时间轮精度
|
||||
timerPrecisionMs=1000
|
||||
# 调度消息服务线程数
|
||||
scheduleMessageServiceThreadPoolNums=4
|
||||
|
||||
#flushCommitLogLeastPages=4
|
||||
#flushConsumeQueueLeastPages=2
|
||||
|
||||
@@ -1,33 +1,64 @@
|
||||
# 基础运行配置
|
||||
listen 1935;
|
||||
max_connections 1000;
|
||||
daemon off;
|
||||
srs_log_tank console;
|
||||
|
||||
# 低延迟优化
|
||||
vhost __defaultVhost__ {
|
||||
tcp_nodelay on;
|
||||
min_latency on;
|
||||
}
|
||||
|
||||
# HTTP API 服务(用于服务器状态管理)
|
||||
http_api {
|
||||
enabled on;
|
||||
listen 1985;
|
||||
crossdomain on;
|
||||
}
|
||||
|
||||
# HTTP 服务器(用于H5播放器拉流)
|
||||
http_server {
|
||||
enabled on;
|
||||
listen 7088;
|
||||
dir ./objs/nginx/html;
|
||||
}
|
||||
|
||||
# WebRTC 信令服务器配置
|
||||
rtc_server {
|
||||
enabled on;
|
||||
listen 8000;
|
||||
candidate 公网ip;
|
||||
listen 8000; # WebRTC信令端口
|
||||
candidate 192.168.1.37; # 公网IP
|
||||
}
|
||||
|
||||
# 虚拟主机配置
|
||||
vhost __defaultVhost__ {
|
||||
# WebRTC 模式配置
|
||||
rtc {
|
||||
enabled on;
|
||||
rtmp_to_rtc on;
|
||||
rtc_to_rtmp on;
|
||||
# 关闭 RTMP 转 WebRTC(避免强制中转,因为要实现P2P打视频)
|
||||
rtmp_to_rtc off; # on:表示支持RTMP推流转WebRTC播放
|
||||
rtc_to_rtmp off; # on:表示支持WebRTC推流转RTMP播放
|
||||
# P2P模式必须开启NACK
|
||||
nack on;
|
||||
# 开启TWCC带宽估计
|
||||
twcc on;
|
||||
}
|
||||
|
||||
# HTTP-FLV 流配置
|
||||
http_remux {
|
||||
enabled on;
|
||||
mount [vhost]/[app]/[stream].flv;
|
||||
mount [vhost]/webrtc/;
|
||||
}
|
||||
|
||||
# HLS 流配置(用于兼容性)
|
||||
hls {
|
||||
enabled off;
|
||||
}
|
||||
|
||||
# 低延迟播放配置
|
||||
play {
|
||||
gop_cache off; # 关闭GOP缓存降低延迟
|
||||
queue_length 10; # 减小播放队列长度
|
||||
}
|
||||
}
|
||||
@@ -20,6 +20,12 @@ no-tcp6
|
||||
cert=/etc/turn_server_cert.pem
|
||||
pkey=/etc/turn_server_pkey.pem
|
||||
dh-file=/etc/coturn/dhparam.pem
|
||||
|
||||
# 认证配置(使用长期凭证)
|
||||
verbose
|
||||
fingerprint
|
||||
lt-cred-mech
|
||||
|
||||
# Coturn TURN SERVER configuration file
|
||||
#
|
||||
# Boolean values note: where boolean value is supposed to be used,
|
||||
|
||||
@@ -77,7 +77,12 @@ turnserver -a -o -f -r hulaspark.com
|
||||
```
|
||||
|
||||
### 6. 测试服务
|
||||
测试地址:https://webrtc.github.io/samples/src/content/peerconnection/trickle-ice/
|
||||
|
||||
https://webrtc.github.io/samples/src/content/peerconnection/trickle-ice/
|
||||
host: 本地直连测试,用在局域网
|
||||
|
||||
srflx:公网直连也叫打洞测试,不过图中只有一个srflx返回,正常应该有两个
|
||||
|
||||
relay:是中继测试,我们这次测试意思就是我们所在网络使用中继模式才能成功
|
||||
|
||||

|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 10 KiB After Width: | Height: | Size: 8.9 KiB |
Binary file not shown.
|
Before Width: | Height: | Size: 18 KiB After Width: | Height: | Size: 28 KiB |
BIN
docs/install/image/login.png
Normal file
BIN
docs/install/image/login.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 112 KiB |
BIN
docs/install/nacos/nacos_config_export_20251019194635.zip
Normal file
BIN
docs/install/nacos/nacos_config_export_20251019194635.zip
Normal file
Binary file not shown.
@@ -25,6 +25,7 @@ services:
|
||||
volumes:
|
||||
- ./rocketmq/broker/logs:/home/rocketmq/logs
|
||||
- ./rocketmq/broker/store:/home/rocketmq/store
|
||||
- ./rocketmq/timerwheel:/home/rocketmq/timerwheel
|
||||
- ./rocketmq/broker/conf/broker.conf:/home/rocketmq/rocketmq-5.3.2/conf/broker.conf
|
||||
- ./rocketmq/broker/conf/plain_acl.yml:/home/rocketmq/rocketmq-5.3.2/conf/plain_acl.yml
|
||||
depends_on:
|
||||
|
||||
@@ -71,14 +71,19 @@ abortFile=/home/rocketmq/store/abort
|
||||
maxMessageSize=65536
|
||||
|
||||
# 延迟消息配置
|
||||
#timerWheelEnable=false
|
||||
#enableScheduleMessage=false
|
||||
|
||||
timerWheelEnable=true
|
||||
# 启用延迟消息功能
|
||||
enableScheduleMessage=true
|
||||
# 定义延迟级别
|
||||
messageDelayLevel=1s 3s 5s 10s 30s 1m 2m 3m 4m 5m 6m 7m 8m 9m 10m 20m 30m 1h 2h
|
||||
# 确保此目录存在且可写
|
||||
#timerStorePath=/home/rocketmq/store/timerwheel
|
||||
#timerFlushIntervalMs=1000
|
||||
#timerPrecisionMs=1000
|
||||
#scheduleMessageServiceThreadPoolNums=4
|
||||
timerStorePath=/home/docker/rocketmq/timerwheel
|
||||
# 时间轮刷新间隔
|
||||
timerFlushIntervalMs=1000
|
||||
# 时间轮精度
|
||||
timerPrecisionMs=1000
|
||||
# 调度消息服务线程数
|
||||
scheduleMessageServiceThreadPoolNums=4
|
||||
|
||||
#flushCommitLogLeastPages=4
|
||||
#flushConsumeQueueLeastPages=2
|
||||
|
||||
2101
docs/install/sql/luohuo_dev.sql
Normal file
2101
docs/install/sql/luohuo_dev.sql
Normal file
File diff suppressed because it is too large
Load Diff
1270
docs/install/sql/luohuo_im_01.sql
Normal file
1270
docs/install/sql/luohuo_im_01.sql
Normal file
File diff suppressed because one or more lines are too long
@@ -2,6 +2,8 @@
|
||||
|
||||
上传目录下的docker文件夹到服务器/home/docker下面, 需要修改env文件夹rocketmq文件夹里面的配置, 特别是[broker.conf](docker/rocketmq/broker/conf/broker.conf)里面brokerIP1的值
|
||||
|
||||
## 🛠️ 注册时需要的邮箱功能
|
||||
- **配置邮箱密钥**: 
|
||||
|
||||
## 🛠️ 启动命令
|
||||
- **提高权限**: sudo chmod -R 777 /home/docker/rocketmq
|
||||
|
||||
Reference in New Issue
Block a user