Why use a processor to do the filtering work ? Why filter at all ? What if you just kept flowing and updating ?
Why not just store the value into SQL or some database and perform an Update using the device_id in the where clause ? Choosing a database that supports JSON natively will let you query and get JSON output from it, like PostgreSQL, MySQL, MongoDB, SQL Server, etc. (Or you could also explore storing the last 100 receives into the DB, using a sequence generator that gets reset every X, and built with Groovy and ExecuteScript processor, essentially having a rolling Last 100 that gets continuously updated) Thad +ThadGuidry <https://www.google.com/+ThadGuidry>
