Batch node operation clarification

Hello,

I would like to ask a couple of clarifying questions concerning how the Batch node works internally (i.e. how it is implemented), as I haven't found any related answered questions on the forum (or it seemed like it to my current level of Node-RED expertise; beginner).

My question is the following:

Does the Batch node internally buffer the messages it receives, or does it just add the necessary metadata to them (so that other nodes can interpret them as a message sequence) and immediately dispatches them?
If there is indeed some internal buffering carried out by the Batch node, is the node's context used for the implementation? In other words, if Node-RED crashes, do I lose the buffered data, or is there a similar scheme to the context variables that helps with failures (e.g. disk flush every 30s)? Moreover, for the context scheme, can I tune the disk flushing to an interval of preference, or is it fixed on 30s?

Thank you in advance :slight_smile:

Short answer. Yes it buffers them internally, and no there is no persistence mechanism.

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.