ozomer / node-red-contrib-batcher Goto Github PK
View Code? Open in Web Editor NEWLicense: Apache License 2.0
License: Apache License 2.0
Batcher works the exactly way I think it should be with one exception, the msg object is not beeing fully keept.
Seens Batcher is preserving only topic and payload, but I guess it should keep all the msg.
Maybe you could use something like RED.util.cloneMessage(..) : safely clones a message object so it can be reused
to pass along each msg as is in the array output.
To keep compatibility, it could be a new option: "Preserve full msg object" (or something like that).
Something I would use if batcher has support to it is a way to clear the batch queue and flush it when needed.
Maybe it could accept msg.reset
to clean up without send anything and msg.flush
to send all is queued right away.
My use case right now is that I'm setting batcher to 20 slots and 10 seconds, but most of the time I have less then 20 messages and I know wich is the last one, so I could add the flush command to it so we don't need to wait for all the 10 seconds.
Just my 2c - Thank you.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.