Skip to main content

Module subscription_router

Module subscription_router 

Source
Expand description

SubscriptionRouter — topic/type-based message routing with subscription management, filter evaluation, and delivery tracking.

Routes incoming RoutingMessages to registered Subscriptions using topic matching and filter evaluation. Deliveries are tracked in a bounded VecDeque-backed log.

§Design highlights

  • Topic matching: exact match or wildcard (*).
  • Filter evaluation: composable SubscriptionFilter predicates.
  • Delivery log: bounded at a configurable capacity; oldest entries are evicted when full.
  • No unwrap(): all fallible operations surface errors explicitly.

Structs§

DeliveryRecord
Audit record written whenever the router attempts delivery.
MessageTopic
Newtype wrapper for topic identifiers used by SubscriptionRouter.
RoutingMessage
A message travelling through SubscriptionRouter.
SubRouterStats
Point-in-time statistics snapshot for SubscriptionRouter.
Subscription
A subscriber registration in SubscriptionRouter.
SubscriptionRouter
Topic/type-based message routing engine.

Enums§

SubscriptionFilter
A composable predicate for filtering RoutingMessages.

Functions§

fnv1a_64
Compute an FNV-1a 64-bit hash over an arbitrary byte slice.