Libp2p gossipsub wildcard subscription

How to create a subscription on all topics (wildcard)? Is it possible?
Have an idea to create own implementation of MessageCache (this implementation can passed through the gossipsub config options) and intercept messages with topics inside this class. Maybe exists more simple way?

what are you trying to do?

I want to persist messages and re-publish them later (in the configured time frame) to those peers who will subscribe to associated topics “with delay”.
These messages will be persisted only on the one master-node which will be used as bootstrap node by others.

You will need a side protocol to do the catchup.

do you mean I need implement my own version of pubsub?

Something like it, yes. Just for the catchup mechanism.

You use the pubsub lib still, but add your own additional protocol for catch up in your application.

This has come up a lot, see for example how ipns pubsub works in ipfs.

Thank you for the advice. When I implement my use case I will publish it here for others.

1 Like