I got this question on an interview and I\'m trying to learn from this.
Assuming that this repository is used in a concurrent context with billions of messages i