Hi, i want to safe key-value pairs in a database. Because i dont found some options i integrated sqlite in my flow. My problem is the function node doesn´t send all topics. When i inject i should have 111 entries but it is always like 20 random entries from the pool. I have to inject like 30 times to get the whole pool of key-value pairs in my sqlite table. I think the messages are sent to fast, so it cant be safed. Can someone tell me how i can fix this issue?
This is my funcion node:
var b= Buffer.from(msg.payload);
if(b[0]== 0x7c && b[1]== 0x4 && b[2]== 0x4 && b[3] == 0x60){ return null;
}else{
for(i =0; i< b.length ; i++){
if(b[i] == 0x7c && b[i+1] == 0x06){
var busnummer = b[i+4];
var wert = b[i+5];
var topic="INSERT INTO BUS(BUSNUMMER,WERT) values("+"\'"+busnummer+"\'"+","+"\'"+wert+"\'"+")";
msg.topic=topic;
return msg
}
}