libp2p / go-libp2p-pubsub

The PubSub implementation for go-libp2p
https://github.com/libp2p/specs/tree/master/pubsub
Other
323 stars 187 forks source link

Option to enable local only publishing on a topic #480

Closed Wondertan closed 2 years ago

Wondertan commented 2 years ago

There are use cases where it becomes handy to publish msgs only to local subscribers, e.g. some edge cases where the outdated payload needs processing through the local pipeline but is irrelevant to the network under certain conditions.

This can be simply implemented using PubOpt and by setting the new Local bool field to Message, so that it is not Router.Published