Overview
This node manages a message stack (or queue) allowing users to store, retrieve, and manipulate messages with various operations such as push, pop, peek, flush, size, and clear. It supports multiple independent stacks identified by stack names and offers options for delayed processing and different return formats. This node is useful for scenarios where message batching, delayed processing, or queue management is needed, such as accumulating messages before processing or clearing all messages at once.
Use Case Examples
- Push messages to a named stack and later pop a specific number of messages for processing.
- Flush all messages from a stack and return them either individually or as an array.
- Use push with delay to accumulate messages over a time period before processing them all at once.
Properties
| Name | Meaning |
|---|---|
| Stack Name | The name of the stack to operate on, allowing multiple independent stacks. |
| Return Format | How to return the messages, either as individual items or as a single array. |
Output
JSON
jsonsuccess- Indicates if the operation was successful.operation- The operation performed on the stack.stackName- The name of the stack operated on.messagesPushed- Number of messages pushed to the stack (for push operations).totalMessages- Total number of messages currently in the stack.messages- Array of messages returned from the stack (for pop, peek, flush operations).count- Count of messages returned or affected by the operation.messagesPopped- Number of messages popped from the stack.messagesPeeked- Number of messages peeked at in the stack.messagesFlushed- Number of messages flushed from the stack.size- Current size of the stack (number of messages).lastActivity- Timestamp of the last activity on the stack.hasPendingTimeout- Indicates if there is a pending timeout for delayed operations.messagesCleared- Number of messages cleared from the stack.message- Additional informational messages, e.g., when the stack is empty.delaySeconds- Delay time in seconds for delayed push operations.autoFlush- Indicates if auto flush is enabled after delay.willFlushAt- Timestamp when the stack will auto flush after delay.actualWaitTimeSeconds- Actual wait time elapsed during delayed operations.
Troubleshooting
- Ensure the stack name is provided and consistent to avoid operating on unintended stacks.
- If using delayed operations, verify that the delaySeconds parameter is set correctly and that the node is not interrupted before the delay completes.
- When using return formats, ensure the chosen format matches the expected downstream processing (individual items vs array).
Common error: "The operation \"\" is not supported!" indicates an invalid or unsupported operation parameter; verify the operation name is correct.