Buffer tcp requests

I have an application where I am listening for messages on tcp request nodes, the messages are delimited by \n characters and I use this to close the connection and reopen after 100ms, ready for the next message.
This has been working fine until recently, when I have found that we are sometimes receiving multiple messages simultaneously, which is causing the app to miss the subsequent messages until we have reconnected.
My question, is if I use the node option to never return (ie. keep the connection open), how can I parse the message stream such that I can still pass individual messages at the \n delimiter to the next node?

If the messages are strings then the tcp request node can be set to return strings, and then the keep open option then has a split option eg

If they really are buffers then you could use a split node after the tcp request node

Thanks Dave, that does look like exactly what I require, however, I assume this feature is not available in NodeRed v2.x?
I have an installed base using 2.x and Electron 15, we are running on Node 14.18, so we probably satisfy the pre-requisites for Node-Red 3, what gotchas should I look out for if we were to try and upgrade?

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