# Batch node operation clarification

**URL:** <https://discourse.nodered.org/t/batch-node-operation-clarification/31930>\
**Category:** General\
**Created:** [24 August 2020 06:03 UTC](https://discourse.nodered.org/t/batch-node-operation-clarification/31930 "2020-08-24T06:03:10Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![skoumo01](https://avatars.discourse-cdn.com/v4/letter/s/e47774/32.png) [@skoumo01](https://discourse.nodered.org/u/skoumo01)\
**Post date:** [24 August 2020 06:03 UTC](https://discourse.nodered.org/t/batch-node-operation-clarification/31930/1 "2020-08-24T06:03:11Z")

</div>

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 🙂

---

<div class="post-metadata">

**Author:** ![dceejay](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/dceejay/32/38_2.png) [@dceejay](https://discourse.nodered.org/u/dceejay)\
**Post date:** [24 August 2020 06:22 UTC](https://discourse.nodered.org/t/batch-node-operation-clarification/31930/2 "2020-08-24T06:22:03Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/1X/d073cd938eafa2e558d7c2cd59003b3ef4963033.png) [@system](https://discourse.nodered.org/u/system)\
**Post date:** [7 September 2020 06:22 UTC](https://discourse.nodered.org/t/batch-node-operation-clarification/31930/3 "2020-09-07T06:22:07Z")

</div>

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