-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathconfig.toml
75 lines (59 loc) · 2.81 KB
/
config.toml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
[server]
# 服务启动端口
# Port for the server to start on
port = 8080
# 请求access日志路径,相对目录,相对于启动目录;也可以是绝对路径
# Path for access log, relative to the startup directory or an absolute path
access_log_path = "logs/access.log"
# 请求error日志路径,相对目录,相对于启动目录;也可以是绝对路径
# Path for error log, relative to the startup directory or an absolute path
error_log_path = "logs/error.log"
# 业务日志路径,相对目录,相对于启动目录;也可以是绝对路径
# Path for application log, relative to the startup directory or an absolute path
broker_log_path = "logs/broker.log"
[jwt]
# 多个broker节点,必须保持一致;
# In a multi-broker environment, the configuration must be consistent
# 生成token的密钥
# Secret key for generating JWT tokens
secret = "JWT_queoreibesh8waS6"
# token默认过期时间,单位秒
# Default token expiration time, in seconds
expire = 3600
[redis]
# 多个broker节点,必须保持一致;
# In a multi-broker environment, the configuration must be consistent
# redis地址, 单地址为单例模式, 多地址为集群模式;单例模式下,db必须设置;
# Redis addresses, a single address for standalone mode, multiple addresses for cluster mode; in standalone mode, 'db' must be set;
addrs = ["114.116.222.136:6379"]
# redis密码;
# Redis password;
password = "Yfw68Test2019"
# redis数据库;
# Redis database (used in standalone mode);
db = 5
# redis连接池大小,0表示默认值 cpu核数*10
# Size of the Redis connection pool, 0 indicates the default value (10 * number of CPU cores)
pool_size = 0
[sse]
# 多个broker节点,必须保持一致;
# In a multi-broker environment, the configuration must be consistent
# 每个sse连接,服务端发送心跳的间隔时间
# Heartbeat interval for each SSE connection, in seconds
heartbeat_interval = 30
# 每个设备,缓存的最大消息帧数
# Maximum number of message frames cached per device
device_frame_cache_size = 10
# 每个设备,缓存的消息帧过期时间
# Expiration time for cached message frames per device, in seconds
device_frame_cache_expire = 604800
[callback]
# 多个broker节点,必须保持一致;
# In a multi-broker environment, the configuration must be consistent
# 默认向指定的redis频道发送消息,可以自定义回调地址,系统向该地址Post一个json数据
# By default, messages are sent to the specified Redis channel.
# You can customize the callback address, and the system will post a JSON data to that address
user_online = "http://127.0.0.1:8080/callback/user_online"
user_offline = "http://127.0.0.1:8080/callback/user_offline"
device_online = "http://127.0.0.1:8080/callback/device_online"
device_offline = "http://127.0.1.1:8080/callback/device_offline"