# Getting 'Last 5' Readings - Ring Circle Buffers with Topic-awareness

**URL:** <https://discourse.nodered.org/t/getting-last-5-readings-ring-circle-buffers-with-topic-awareness/12335>\
**Category:** General\
**Created:** [17 June 2019 18:34 UTC](https://discourse.nodered.org/t/getting-last-5-readings-ring-circle-buffers-with-topic-awareness/12335 "2019-06-17T18:34:19Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![PJMcL](https://avatars.discourse-cdn.com/v4/letter/p/a88e57/32.png) [@PJMcL](https://discourse.nodered.org/u/PJMcL)\
**Post date:** [17 June 2019 18:34 UTC](https://discourse.nodered.org/t/getting-last-5-readings-ring-circle-buffers-with-topic-awareness/12335/1 "2019-06-17T18:34:19Z")

</div>

I'm trying to create analysis based upon 'Last 5' payloads per Device.  
The Last 5 payloads can be documents, not just numbers.

There are many **Buffers** ( **Ring** , **Circle** and **Array** ) and not all of these are numeric only.  
But I cannot find anything that is Topic-aware.

Although **Smooth** internally implements buffering for numerics that is Topic-aware, but it is no good for documents, and cannot be generalized as it is sending on numbers.

Before I write something from scratch, based upon code of the above, can anyone suggest a pre-built buffer that matches my need?
