You can set the buffer in RViz for that specific display. It will keep the last n elements. However, if you want a big buffer I would use the MarkerArray.