Beanstalkd Endpoint
Beanstalk Endpoint v0.29.0+ provides Beanstalkd message subscription capabilities, supporting connections to Beanstalkd Server to subscribe to messages from multiple Tubes and pass the messages to the next node for processing.
TIP
This component is an extension component and requires the additional extension library: rulego-components (opens new window).
This component requires configuration of component connection reuse (opens new window). Different nodes reuse the connection through component connection reuse to maintain a consistent client instance (after a Beanstalkd client subscribes to a message, it locks the current client, preventing other clients from operating on the message).
# Type
endpoint/beanstalkdTubeset
# Configuration Parameters
Field | Type | Description | Default Value |
---|---|---|---|
server | string | Beanstalkd server address | 127.0.0.1:9000 |
tubesets | []string | List of tubes | default |
timeout | string | Timeout for fetching a job | 5m |
# Configuration Example
{
"ruleChain": {
"id": "TCh3Jts0IroQ",
"name": "Beastalkd Enpoint Test",
"debugMode": false,
"root": true,
"disabled": false,
"additionalInfo": {
"createTime": "2025/01/16 09:34:19",
"description": "",
"layoutX": "280",
"layoutY": "280",
"message": "the rule chain has been disabled",
"updateTime": "2025/01/16 21:47:46",
"username": "admin"
}
},
"metadata": {
"endpoints": [
{
"id": "node_2",
"additionalInfo": {
"layoutX": 480,
"layoutY": 380
},
"type": "endpoint/beanstalkdTubeset",
"name": "Pop Job",
"debugMode": false,
"configuration": {
"server": "ref://local_beanstalkdWorker",
"timeout": "5m",
"tubesets": [
"foo",
"bar"
]
},
"processors": null,
"routers": [
{
"id": "5XCMosX5GVY3",
"params": [],
"from": {
"path": "*",
"configuration": null,
"processors": []
},
"to": {
"path": "TCh3Jts0IroQ:node_4",
"configuration": null,
"wait": false,
"processors": []
}
}
]
}
],
"nodes": [
{
"id": "node_4",
"additionalInfo": {
"layoutX": 780,
"layoutY": 320
},
"type": "log",
"name": "Log",
"debugMode": true,
"configuration": {
"jsScript": "return 'Incoming message:\n' + JSON.stringify(msg) + '\nIncoming metadata:\n' + JSON.stringify(metadata);"
}
},
{
"id": "node_9",
"additionalInfo": {
"layoutX": 1040,
"layoutY": 240
},
"type": "x/beanstalkdWorker",
"name": "Del",
"debugMode": true,
"configuration": {
"cmd": "Delete",
"jobId": "${id}",
"server": "ref://local_beanstalkdWorker",
"tube": "${tube}"
}
}
],
"connections": [
{
"fromId": "node_4",
"toId": "node_9",
"type": "Success"
}
]
}
}
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
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
# Output Parameters
Messages received from the Beanstalkd server are converted to the RuleMsg format and sent to the rule chain: data: Message content dataType: JSON type: Default is empty metadata: Message metadata, including information such as id, tube, etc.