node-red-contrib-msg-aggregator 0.0.4

Node Red Node to aggregate messages from multiple nodes according to the EIP Aggregator pattern

npm install node-red-contrib-msg-aggregator

Node-Red Node to aggregate 2 or more messages onto either one master message or else an aggregated message containing an array of matching input messages

Messages belonging to a transaction are received and stored until all messages belonging to the transaction are received. If one of the message is identified as a "master" message then this message is forwarded with data from the other messages stored in a configurable field of the payload. Otherwise a new message is created containing an array of all received message data. By default, only the message payload is stored but the messages can be stored in their entirety if required.

example inputs:
{
    "payload":{
        "param1": "value1",
        "param2": 99
    },
    _msgid: 999999
}
{
    "payload":{
        "userid": "9871",
        "userval": 77
    },
    _msgid: 999999
}

example output:

{
    "payload":{
        "param1": "value1",
        "param2": 99,
        "addedData":{
            "userid": "9871",
            "userval": 77
        },
    },
    _msgid: 999999
}

Author

Kieran Dolan (@kierandol)

Copyright 2014, 2016 IBM Corp. under the Apache 2.0 license.

Node Info

Version: 0.0.4
Updated 8 years, 7 months ago
License: Apache
Rating: not yet rated

Actions

Rate:

Downloads

0 in the last week

Nodes

  • msgAggregator

Keywords

  • node-red
  • aggregator
  • pattern
  • join
  • combine

Maintainers