Skip to main content

Module registry

Module registry 

Source
Expand description

The bus capture allow-list.

EncoderRegistry is the allow-list the crate::capture::BusCaptureAdapter consults at every dispatch boundary. A message whose Rust type has no registered encoder is not captured: the SPEC names a closed list of state-affecting topics, and silent capture of out-of-allow-list types would produce entries the verifier process cannot decode.

Registration binds three things:

  1. The Rust type the encoder consumes (used as the std::any::TypeId lookup key).
  2. The canonical crate::PayloadType tag stamped on every entry the encoder produces.
  3. The encoder closure that produces the payload bytes plus sidecar crate::IndexKeys.

A registration may additionally carry an identity extractor: production dispatch pushes the same typed message through multiple tap-visible boundaries (an order event is sent to the portfolio endpoint and published on its strategy topic), and the adapter uses the extracted identity to capture each logical message exactly once.

Structs§

EncoderRegistry
Allow-list of capturable Rust message types and their encoders.
TypedHeadersExtractor
Typed adapter that downcasts to T and forwards to a Fn(&T) -> Headers closure.
TypedIdentityExtractor
Typed adapter that downcasts to T and forwards to a Fn(&T) -> Option<UUID4> closure.

Traits§

HeadersExtractor
Extracts correlation Headers from a captured message at the dispatch boundary.
IdentityExtractor
Extracts the logical message identity (event id, command id) from a captured message.