Node Function
The Message Queue Node enables connection to custom message queues and provides message publishing functionality. Message Queue Node belongs to Basic Node.
Note:
The Message Queue Node is designed only for message publishing. Subscribing to queues and consuming messages requires custom service development by the user.
Directions
Input Variables
The input variable only takes effect inside the node and cannot be used cross-node. Click "Add" to configure as follows and add an input variable.
|
Variable Name | The variable name can only contain letters, digits, or underscores, must start with a letter or underscore, and is mandatory. |
Data source | The data source of this variable supports two options: "refer" and "input". "Refer" allows selecting output variables from all preceding nodes, while "input" supports manually filling in a fixed value. |
Type | The data type of this variable cannot be selected and defaults to the variable type of "refer" or the string type of "input". |
Message Queue Type
Message Queue Node supports interfacing with Kafka (for details, please refer to Kafka introduction) and RocketMQ (for details, please refer to RocketMQ introduction). These two commonly used message queues have different detailed settings. Users can choose appropriate message queues according to their use case requirements. Connection Settings
Configure the connection method according to the selected message queue type. The current node supports common connection configuration information for Kafka and RocketMQ.
Message content
The message content is the information sent to the message queue, supporting references to the node's input variable or manual entry of message content.
Output Variable
The output variables of the message publishing action after execution. Includes the message queue's send status SendStatus, error info ErrorMsg, timestamp Timestamp, message size MessageSize, and runtime error info Error (data type is object, this field is empty when running normally).
Handling error
Exception handling can be enabled manually, supporting exception retry and output content configuration for anomalies. The configuration content is as follows.
|
Max Retry Attempts | The maximum number of retries when a node is running exceptionally. If retries exceed the set number of times, the node is considered to have a call failed and returns the "Exception Output Variable" content, defaulting to 3 times. |
Retry Interval | Interval between each rerun, default is 1 second. |
Exception Output Variable | The output variable returned when retries exceed the maximum number. |
Application Example
Batch analyze social media articles and tag them accordingly. Use the Message Queue node to send the analysis results to the message queue. Other services can subscribe to the message queue and consume the article analysis results. Example workflow as follows:
FAQs
1. Is the message processing order important? How to control it in the workflow?
For approval, order processing, and other stateful dependent scenarios, message sequence is very important. In the workflow, orchestrate the order of Message Queue nodes to control the sending order.
2. Are there any requirements for the message format or content?
The workflow Message Queue Node provides a message configuration text box, supporting users to output any message content with no mandatory requirements for the message format.