mirror of
https://github.com/node-red/node-red.git
synced 2023-10-10 13:36:53 +02:00
Updated Design: Enhancements to Split Join nodes (markdown)
parent
1e0737a302
commit
5cef3dd402
@ -39,23 +39,6 @@ In addition if a msg does arrive with a `msg.completed` property - then the accu
|
||||
### Proposal 2 - Accumulate name/value pairs mode
|
||||
Similar in thinking to proposal 1, this should also be a sub mode of the **key/value** mode of operation - ie allow use of a msg property (like the topic) to create the properties - this would be even simpler than Proposal 1 above for use with UI nodes.
|
||||
|
||||
### Proposal 3 - Topic mode
|
||||
Join messages based on the topic. It should be optional to join messages with the same topic, or to join only messages with different topics (diff mode). The count attribute defines how many messages are joined.
|
||||
|
||||
In "same mode", the join node creates an array for each different topic.
|
||||
In "diff mode", a new msg with an already existing topic would overwrite the old message.
|
||||
|
||||
A special message "reset" (topic or property) clears all queues.
|
||||
|
||||
The result message should contain the whole received messages in the payload (in "same mode" as array in chronological order and in "diff mode" as object with the original msg topic as key).
|
||||
|
||||
Possible enhancements:
|
||||
filter duplicates: discard msg in "same mode" if the identical payload exists already.
|
||||
age queue: discard oldest msg from the join queue after a certain time
|
||||
|
||||
For a more detailed description and sample implementation please see: [Join node idea](https://github.com/node-red/node-red/wiki/Dreambox:-node-red-ideas-2.0)
|
||||
|
||||
|
||||
### Potential implementation
|
||||
These could be implemented,
|
||||
- either as stand alone modes of operation. IE Accumulate objects and Accumulate name/value pairs.
|
||||
|
Loading…
Reference in New Issue
Block a user