Skip to content

Instantly share code, notes, and snippets.

@ozomer

ozomer/README.md Secret

Last active August 29, 2015 14:17
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ozomer/63d6565c5aeb48242994 to your computer and use it in GitHub Desktop.
Save ozomer/63d6565c5aeb48242994 to your computer and use it in GitHub Desktop.
node-red-contrib-batcher example

Example usage of node-red-contrib-batcher.

The batcher node is configured to cache up to 2 topics with 5 payloads each. Each payload can stay in the batcher up to 10 seconds (10000ms).

Play with the injection nodes to see the results.

[{"id":"be30613.f41cfa","type":"debug","name":"","active":true,"console":"false","complete":"true","x":447,"y":386,"z":"9edd4545.6122b8","wires":[]},{"id":"4ba942f.fb456bc","type":"batcher","name":"","maxTopics":"2","maxMessagesPerTopic":"5","maxDelay":"10000","x":287,"y":379,"z":"9edd4545.6122b8","wires":[["be30613.f41cfa"]]},{"id":"6db7595b.9248a8","type":"inject","name":"","topic":"Topic1","payload":"","payloadType":"date","repeat":"","crontab":"","once":false,"x":119,"y":328,"z":"9edd4545.6122b8","wires":[["4ba942f.fb456bc"]]},{"id":"6833fe61.97cc","type":"inject","name":"Topic1 blank","topic":"Topic1","payload":"","payloadType":"none","repeat":"","crontab":"","once":false,"x":103,"y":367,"z":"9edd4545.6122b8","wires":[["4ba942f.fb456bc"]]},{"id":"15a77ff6.ea588","type":"inject","name":"","topic":"Topic2","payload":"","payloadType":"date","repeat":"","crontab":"","once":false,"x":115,"y":407,"z":"9edd4545.6122b8","wires":[["4ba942f.fb456bc"]]},{"id":"25593e62.daa6c2","type":"inject","name":"","topic":"Topic3","payload":"","payloadType":"date","repeat":"","crontab":"","once":false,"x":113,"y":460,"z":"9edd4545.6122b8","wires":[["4ba942f.fb456bc"]]}]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment