I receive current day transactional data which I dump into a collection called 'collA'. The data will be reportable for max of 4 days, after this the data becomes useless to me.
Are the below two possible in mongoDB?
Auto swap collections - when clock turns 12 AM, create new collection. At this point the old collection should be renamed to 'collA1'. So at the end of day 4, I'll be having collA, collA1, collA2, collA3 and collA4
WRITE queries should be directed only to the new collection collA
Read queries should be directed to all collA1 - 4 and collA