node-red-contrib-msg-aggregator

0.0.4 • Public • Published

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 and license

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

Package Sidebar

Install

npm i node-red-contrib-msg-aggregator

Weekly Downloads

13

Version

0.0.4

License

Apache

Last publish

Collaborators

  • kierandol