How to prevent duplicates in mongodb timeseries collection

I’m wondering the same thing, has anyone found a solution?