Expand description
TopicRouter — Intelligent GossipSub topic management with priority-based message queuing.
This module provides a production-grade topic router that sits above the raw GossipSub layer and adds:
- Per-topic configuration (queue depth, priority threshold, TTL)
- Lock-free per-topic message counters via
Arc<AtomicU64> - Priority queues backed by
BinaryHeap— highest-priority messages dequeued first - Automatic drop of messages below a topic’s
priority_threshold - Bounded queues — messages rejected with
QueueFullwhenmax_queue_depthis exceeded - Aggregate statistics with atomic accumulators and a
snapshot()API
Structs§
- Prioritized
Message - A message that can be stored in a per-topic
BinaryHeap. - Topic
Config - Per-topic routing configuration.
- Topic
Router - Intelligent GossipSub topic manager with priority-based message queuing.
- Topic
Router Stats - Atomic accumulator for aggregate router statistics.
- Topic
Router Stats Snapshot - A point-in-time snapshot of aggregate router statistics.
Enums§
- Topic
Error - Errors that can occur in
TopicRouteroperations.