You will need to implement this functionality in code, not in MongoDB.
I do not think that Capped Collections is the right solution for your use case.
You can paste into a limited collection and at the same time paste into a โregularโ collection and combine them into hourly / daily, weekly, monthly, etc .... by reducing the map.
source share