At a glance
Collects raw usage from the network, cleans and enriches it, and passes billable events to rating.
Key data
Receives from
- Network elements
- Partner networks
Sends to
- Rating
- Reporting
- Fraud & assurance
Supported Usage Event Types
Categories of usage records ingested and processed through the mediation pipeline
End-to-End Processing Pipeline
Eight-stage pipeline from network source to rated billing events
Async Event Bus — Channel Flow
Each stage communicates through dedicated channels — no direct service-to-service coupling
Component Responsibilities
Detailed function of each service in the pipeline
Ingest Service
- Polls secure file server on a scheduled interval
- Downloads usage files to shared network storage
- Publishes file-ready notification to event bus
- Tracks file sequence numbers to prevent re-processing
- Organises files: incoming / processed / corrupted
Collector Service
- Reads file-ready notifications from event bus
- Fetches binary-encoded usage file from shared storage
- Validates for duplicate files using search store
- Decodes binary format to structured records
- Segregates records by subscriber type (Consumer / Enterprise / Partner)
- Publishes decoded records to event bus channels
Loader Service
- Normalises timestamps and number formats
- Rejects invalid records (test, zero-duration, overlap)
- Enriches records with billing identifiers and event metadata
- Detects duplicates over a configurable time window
- Routes records to valid, data, invalid and duplicate channels
Mapper Service
- Consumes valid voice and messaging records from Loader
- Reshapes record schema to billing event format
- Aligns field names and nested structures for downstream
- Stateless service — no own data store
- Publishes mapped billing events to event bus
Bill Event Processor
- Consumes billing events from Mapper channel
- Validates subscriber status with billing account service
- Sends chargeable events to Rating Engine for pricing
- Stores monthly voice, messaging and data usage summaries
- Handles late-arriving records in overflow documents
- Publishes rated, failed and duplicate events downstream
Rating Engine
- Receives rating requests from Bill Event Processor
- Fetches subscriber profile and current plan
- Applies centralised rate table (loaded in memory)
- Matches tariff by plan, charge type and event category
- Calculates charge: standard or flexible billing formula
- Applies applicable discounts and returns rated response
Index Processor
- Generic event-bus to search-store writer
- Bulk-inserts data usage events from Loader channels
- Bulk-inserts rated events from Bill Event Processor channels
- Monthly index rotation for efficient time-range queries
- Routes duplicates and invalids to separate indices
- Updates data usage aggregation documents
Usage API Gateway
- REST APIs for self-care and care portal applications
- Itemized usage — per-record usage and charge details
- Aggregated usage — monthly totals by usage category
- Validates access via subscriber identity service
- Resolves subscriber details via service inventory
- Queries search store for usage and charge data
Storage & Persistence
How and where each component stores its data
Document Data Store
- File sequence tracking
- Monthly voice usage summaries
- Monthly messaging usage summaries
- Monthly data usage aggregates
- Subscriber profile & rate table
- Late-arrival overflow documents
Search & Analytics Store
- File processing statistics & dedup
- Invalid / unparseable records
- Unresolved subscriber records
- Data usage events (monthly rotation)
- Rated voice and messaging events
- Duplicate records for audit trail
Async Event Bus
- File ready notification channel
- Decoded record channels (per segment)
- Valid / Invalid / Duplicate output channels
- Billing event channels
- Rated / Failed / Missed event channels
- Threshold monitoring alerts
Relational Store
- Collector operational configuration
- Loader enrichment rule tables
- Mapper schema configuration
- Usage API configuration data
- Shared across mediation services
Shared File Storage
- Incoming usage files (binary)
- Processed files folder
- Corrupted / decode-failed files
- Periodic folder rotation
- Shared mount across Ingest & Collector
Design Principles
Key architectural decisions behind the Mediation module
Event-driven & Decoupled
Each stage communicates exclusively through the async event bus. Services scale independently, can fail without blocking downstream stages, and can be replaced without disrupting the pipeline.
Multi-layer Deduplication
Duplicate detection runs at both the file level in the Collector (via search store) and at the record level in the Loader over a configurable long-window. Duplicates are routed to a dedicated audit channel rather than silently discarded.
Segment-aware Routing
From the Collector stage onward, records are segregated by subscriber segment (Consumer, Enterprise, Partner) into dedicated event bus channels, enabling independent scaling and billing logic per segment.
Spot missing or delayed usage files per network element before revenue is lost.
Learn patterns of duplicate and partial records beyond simple key matching.
More in 30 AI & ML use cases and AIOps for BSS.