libp2p / go-libp2p-pubsub

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

Remove support for multi-topic messages #388

Closed vyzo closed 3 years ago

vyzo commented 3 years ago

This was a fringe / half-baked feature in the wire protocol that has no direct users or API exposure.

Not only we didn't provide an API to do multi-topic publishing, but also the recent introduction of the topic handle abstraction created impedance mismatch.

So this feature adds bloat with no visible gain, and this PR proposes simplification by removal.

Migration path

There is no visible consequence for go-libp2p-pubsub users. At the wire level, due to the way that Protobuf serialises repeated fields, this causes no breakage. If direct wire protocol users (e.g. other libp2p implementations) were using the variadic topics field, this patch will make Protobuf pick the last topic in the list.