Finding last N messages go-libp2p pubsub topic

Let me know if this is the right place to ask about this.

I’m playing around with go-libp2p, specifically pubsub, and I want every node that subscribes to a topic to receive the last N messages that were published to that topic Apart from streaming these message from some bootstrap node which has a copy of the messages, is there a better way to do this without relying on a single node?

Any help is greatly appreciated.

I’m pretty sure there’s no way to go back in history, back thru the pubsub events. If there were any way to go back it would become actually a miniature blockchain wouldn’t it. At least a linked list. So I think the answer is no.