Skip to content

[KIP-546] Add client quota Admin APIs - #5560

Open
Honglei (honglei) wants to merge 5 commits into
confluentinc:masterfrom
honglei:kip-546-client-quota-admin
Open

[KIP-546] Add client quota Admin APIs#5560
Honglei (honglei) wants to merge 5 commits into
confluentinc:masterfrom
honglei:kip-546-client-quota-admin

Conversation

@honglei

Copy link
Copy Markdown

Summary

  • add AlterClientQuotas and DescribeClientQuotas C Admin APIs from KIP-546
  • support protocol v0 and flexible v1, including validate_only and strict filtering semantics
  • add local API validation, a Kafka-backed roundtrip test, and C examples

This is a rebased and reviewed continuation of #5368 and preserves Amit Barzilai's four original commits and authorship. The follow-up commit resolves the current master conflicts and correctness/test gaps found during integration review.

Closes #5227.

Validation

  • ./configure --enable-devel --enable-werror && make -j8
  • clean out-of-source CMake full build, including examples and test-runner
  • style formatter on all changed C/C++ headers and sources
  • local tests: 0006_symbols, 0080_admin_ut, 0154_admin_quota_ut
  • Kafka 4.3.1 roundtrip: validate-only, set, EXACT/ANY/DEFAULT filters, strict matching, remove, and post-remove absence
  • forced protocol v0 and negotiated protocol v1 roundtrips against Kafka 4.3.1

All checks above passed.

Amit (yungFundamental) and others added 5 commits August 5, 2026 19:49
Implement DescribeClientQuotas and AlterClientQuotas admin client APIs
as defined in KIP-546 (https://cwiki.apache.org/confluence/display/KAFKA/KIP-546%3A+Configurable+Quota+Management).

DescribeClientQuotas retrieves quota configurations for one or more
entity filters (user, client-id, or IP). AlterClientQuotas sets or
removes quota values for specified entity combinations.

New public types:
- rd_kafka_ClientQuotaFilter_t: filter by entity type and match type
  (EXACT, DEFAULT, or ANY).
- rd_kafka_ClientQuotaEntry_t: quota entity + operation (SET/REMOVE).
- Result accessors: rd_kafka_DescribeClientQuotas_result_entries(),
  rd_kafka_AlterClientQuotas_result_entries().

Example programs added in examples/describe_client_quotas.c and
examples/alter_client_quotas.c.
Add test 0154 (TEST_F_LOCAL) covering DescribeClientQuotas and
AlterClientQuotas admin API entry points without requiring a live
broker.

Tests verify:
- NULL argument handling returns RD_KAFKA_RESP_ERR__INVALID_ARG
- Async call enqueues an event that times out (no broker) returning
  RD_KAFKA_RESP_ERR__TIMED_OUT for both queue and no-queue variants
- Both RD_KAFKA_PRODUCER and RD_KAFKA_CONSUMER client types
Correct the public API and protocol handling for client quota admin requests, including strict filter semantics and v0/v1 negotiation. Register a real broker test in addition to local validation, and harden the examples and result lifecycle.
@honglei
Honglei (honglei) requested a review from a team as a code owner August 5, 2026 11:56
@confluent-cla-assistant

Copy link
Copy Markdown

🎉 All Contributor License Agreements have been signed. Ready to merge.
✅ honglei
Please push an empty commit if you would like to re-run the checks to verify CLA status for all contributors.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Feature Request] KIP-546 support

2 participants