Expand description
GossipSub - Topic-based pub/sub messaging
This module provides efficient topic-based publish/subscribe messaging using the GossipSub protocol from libp2p.
§Features
- Topic Subscription: Subscribe to topics of interest
- Message Publishing: Publish messages to topics
- Mesh Formation: Automatic peer mesh formation for topic propagation
- Message Deduplication: Seen message tracking to prevent duplicates
- Peer Scoring: Score-based peer selection for mesh quality
- Content Announcements: Broadcast new content availability
§Design
GossipSub maintains a mesh of peers for each topic, ensuring:
- Low latency message delivery
- High reliability through redundancy
- Efficient bandwidth usage through mesh optimization
- Resistance to spam and malicious peers through scoring
Structs§
- Gossip
SubConfig - GossipSub configuration
- Gossip
SubManager - GossipSub manager
- Gossip
SubMessage - GossipSub message
- Gossip
SubStats - GossipSub statistics
- Message
Id - Message identifier
- Peer
Score - Peer score for mesh quality
- TopicId
- Topic identifier
- Topic
Subscription - Topic subscription information
Enums§
- Gossip
SubError - Errors that can occur in GossipSub operations