Expand description
Shared Kafka librdkafka configuration profiles, merge helper, and file loader.
This module is always available (no feature gate). The core profile constants
and merge helper have zero external dependencies. File loading supports
.properties without any feature gate; YAML and JSON require the
directory-config and config features respectively.
§Loading from Config Git Directory
Services store librdkafka settings in their config git directory and load
them with config_from_file:
ⓘ
use hyperi_rustlib::kafka_config::{config_from_file, merge_with_overrides, CONSUMER_PRODUCTION};
let overrides = config_from_file("/config/kafka.properties")?;
let rdkafka_config = merge_with_overrides(CONSUMER_PRODUCTION, &overrides);Structs§
- DfeSource
- DFE source-aware topic naming for transform services.
Enums§
- Kafka
Config Error - Error loading librdkafka configuration from a file.
- Service
Role - DFE service role — determines consumer group naming convention.
Constants§
- CONSUMER_
DEVTEST - Development/test consumer baseline — fast iteration, low memory.
- CONSUMER_
LOW_ LATENCY - Low-latency consumer — minimal fetch delay.
- CONSUMER_
PRODUCTION - Production consumer baseline — lean, only non-defaults.
- PRODUCER_
DEVTEST - DevTest producer — fast acks, no compression.
- PRODUCER_
EXACTLY_ ONCE - Exactly-once producer — idempotence + ordering.
- PRODUCER_
LOW_ LATENCY - Low-latency producer — minimal delay, leader-ack only.
- PRODUCER_
PRODUCTION - Production producer baseline — high throughput, zstd compression.
- TOPIC_
SUFFIX_ LAND - Default topic suffix for landing zone (raw ingest).
- TOPIC_
SUFFIX_ LOAD - Default topic suffix for load-ready data (post-transform).
Functions§
- config_
from_ file - Load librdkafka configuration from a file in the config git directory.
- config_
from_ properties_ str - Parse Java-style
.propertiescontent into a librdkafka config map. - merge_
with_ overrides - Merge profile defaults with user overrides.
Type Aliases§
- Kafka
Config Result - Result type for kafka config file operations.