Skip to main content

Module pre_route

Module pre_route 

Source
Available on crate feature worker-batch and (crate features worker-batch or worker-pool or worker) only.
Expand description

Pre-route phase: extract a routing field from raw JSON bytes using sonic_rs::get_from_slice (SIMD-accelerated), then apply filters to decide whether the message continues, is dropped, or goes to DLQ.

Hot path: ~50-100 ns per message.

Enums§

PreRouteExtraction
Result of extracting the routing field from raw bytes.
PreRouteFilter
Runtime filter derived from PreRouteFilterConfig.
PreRouteOutcome
Outcome after applying filters to a pre-route extraction.

Functions§

apply_filters
Apply a list of runtime filters to a pre-route extraction result.
extract_routing_field
Extract a routing field from raw JSON bytes using SIMD.
filters_from_config
Convert config-layer filter definitions to runtime filters.