Skip to main content

Module quotas

Module quotas 

Source
Expand description

Client-quota admin RPCs (KIP-546): DescribeClientQuotas (api_key 48) and AlterClientQuotas (api_key 49), as Kafka’s Admin.describeClientQuotas and alterClientQuotas.

An entity is a map from entity type to entity name. Kafka’s brokers accept the types ENTITY_USER, ENTITY_CLIENT_ID and ENTITY_IP, alone or as the pair (user, client-id). A None name is the default entity of its type. As in Kafka’s client, the broker validates the combination.

The KafkaUser reconciler uses the per-user shortcuts AdminClientLike::describe_user_quotas and AdminClientLike::alter_user_quotas.

Structs§

ClientQuotaAlteration
The mutations of one entity, as Kafka’s ClientQuotaAlteration.
ClientQuotaFilter
Which entities a describe returns, as Kafka’s ClientQuotaFilter.
ClientQuotaFilterBuilder
Use builder syntax to set the inputs and finish with build().
ClientQuotaFilterComponent
One component of a ClientQuotaFilter, as Kafka’s ClientQuotaFilterComponent.

Enums§

ClientQuotaMatch
What one filter component matches, as the three constructors of Kafka’s ClientQuotaFilterComponent.
QuotaOp
One mutation of a quota entity, as Kafka’s ClientQuotaAlteration.Op.

Constants§

ENTITY_CLIENT_ID
The entity type of a client ID, Kafka’s ClientQuotaEntity.CLIENT_ID.
ENTITY_IP
The entity type of a client IP address, Kafka’s ClientQuotaEntity.IP.
ENTITY_USER
The entity type of a user principal, Kafka’s ClientQuotaEntity.USER.

Functions§

diff_user_quotas
Pure function.

Type Aliases§

ClientQuotaEntity
A quota entity, as Kafka’s ClientQuotaEntity: entity type → entity name, where None is the default entity of that type.
ClientQuotas
The quota values of each entity, as Kafka’s DescribeClientQuotasResult.
UserQuotaConfig
Snapshot of the broker’s quota state for a single user. An empty map means no per-user quotas are configured.