WukongimSender
x/wukongimSender
组件:v0.29.0+ Wukongim消息发送端。
需要额外引入扩展库:rulego-components (opens new window)
# 配置
字段 | 类型 | 说明 | 默认值 |
---|---|---|---|
Server | string | 服务器地址 | tcp://175.27.245.108:15100 |
UID | string | 用户UID | test1 |
Token | string | 登录密码 | test1 |
ConnectTimeout | int64 | 连接超时(单位:秒) | 5 |
ProtoVersion | int | Proto版本 | wkproto.LatestVersion |
PingInterval | int64 | 心跳间隔(单位:秒) | 30 |
Reconnect | bool | 是否自动重连 | true |
AutoAck | bool | 是否自动确认消息 | true |
ChannelID | string | 频道ID(允许使用 ${} 占位符) | ${channelId} |
ChannelType | string | 频道类型(允许使用 ${} 占位符) | ${channelType} |
NoPersist | bool | 是否持久化 | false |
SyncOnce | bool | 是否同步一次(写模式) | false |
RedDot | bool | 是否显示红点 | true |
NoEncrypt | bool | 是否需要加密 | false |
# 配置示例
{
"ruleChain": {
"id": "j-VTV0NZgtgA",
"name": "悟空IM发送测试",
"root": true,
"additionalInfo": {
"description": "",
"layoutX": "670",
"layoutY": "330"
},
"configuration": {},
"disabled": false
},
"metadata": {
"endpoints": [],
"nodes": [
{
"id": "node_2",
"type": "x/wukongimSender",
"name": "发送节点",
"configuration": {
"server": "tcp://127.0.0.1:5100",
"uID": "test1",
"token": "test1",
"connectTimeout": "50",
"protoVersion": 3,
"pingInterval": "300",
"reconnect": true,
"autoAck": true,
"channelID": "test2",
"channelType": 1,
"redDot": true
},
"debugMode": true,
"additionalInfo": {
"layoutX": 990,
"layoutY": 330
}
}
],
"connections": []
}
}
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
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
# Relation Type
- Success: 执行成功,把消息发送到
Success
链 - Failure: 执行失败,把消息发送到
Failure
链
# 执行结果
参考Wukongim执行SendMessage返回值,被转换为 RuleMsg
格式并发送到规则链:
- data:SendMessage返回内容
- dataType:JSON
- type:默认为空
在 GitHub 上编辑此页 (opens new window)
上次更新: 2025/01/20, 08:24:31