pub fn config_from_file(
path: impl AsRef<Path>,
) -> KafkaConfigResult<HashMap<String, String>>Expand description
Load librdkafka configuration from a file in the config git directory.
Detects format from file extension:
| Extension | Format | Requires |
|---|---|---|
.properties | Java-style key=value | nothing (always available) |
.yaml, .yml | YAML flat mapping | directory-config feature |
.json | JSON object | config feature |
The returned map passes directly to merge_with_overrides or as
librdkafka_overrides in KafkaConfig.
ยงErrors
Returns KafkaConfigError if the file is missing, the format is
unsupported, or parsing fails.