krabka-client-admin
Operator-side admin client for Krabka and Kafka-compatible clusters.
Part of Krabka, a Rust implementation of Apache Kafka-compatible infrastructure and clients.
Overview
Operators and automation use krabka-client-admin as their control-plane
client. It builds on krabka-client-core for typed Kafka protocol dispatch and
tracks the active controller for controller-routed RPCs. It retries selected
requests when a broker returns NOT_CONTROLLER.
Use this crate when a program must create topics, change topic config, manage users or ACLs, or inspect log directories. It sends these Kafka admin RPCs without a dependency on broker internals.
Capabilities
- Read topic metadata, create and delete topics, and expand partitions.
- Describe dynamic topic config and change it with incremental alter operations.
- Upsert and delete SCRAM user credentials for SHA-256 and SHA-512.
- Create, delete, and describe ACLs.
- Describe and alter client quotas for each user.
- Create, renew, expire, and describe delegation tokens.
- Alter and describe the log directories of each broker.
- List consumer groups and inspect their offsets.
- Push client metrics to the cluster (KIP-714) when a broker client metrics
subscription matches the client, as a Java admin client does.
AdminClientConfig::enable_metrics_push(defaulttrue) turns this off.
Kafka Scope
The public API wraps the Kafka admin RPCs that Krabka operators need now. These
RPCs cover SCRAM credentials (KIP-554), delegation tokens (KIP-48), dynamic
topic configuration, ACLs, client quotas, and log-directory inspection. The API
is not a complete clone of the JVM AdminClient surface.
Log-directory calls target the connected broker. They do not retry against the controller. Quota helpers expose the per-user entity shape that Krabka's operator controllers use.
Install
For workspace development, use the path dependency from this repository.
Usage
Create a topic and fetch its metadata:
use BTreeMap;
use ;
# async
Documentation
License
Apache-2.0. Derivative work of Apache Kafka; see NOTICE.