Generate time tag amount messages
if timeTagPolicies is "5m", "20m", "1h", "3h", is mean create a tag in 5min, 20min, 1hour and 3 hour,
timeTagPolicies support {s,m,h,d}
after that 3hours, create a time tag each 3 hours
Add addedMsgs into messages and remove duplicated messages
Generate time tag amount addedMsgs (keep time tag in messages not to change)
if timeTagPolicies is "5m", "20m", "1h", "3h", is mean create a tag in 5min, 20min, 1hour and 3 hour,
after that 3hours, create a time tag each 3 hours
Notice, messsages and addedMsgs should be already ordered by time dasc. It mean the function will not sort again