Logstash read new data in elasticsearch as input?

I did not find a filter that let me save in-memory a line per device to compute the delta at each new line and after saving in-memory this new line, and so on...

But how would this be different if you were to perform the delta computation in the second Logstash instance? You might be able to use the aggregate filter for this. A custom plugin would also do.