Skip to content

Added KIP-546 support#5368

Open
Amit (yungFundamental) wants to merge 4 commits intoconfluentinc:masterfrom
yungFundamental:dev_kip-546_add-client-quota-api
Open

Added KIP-546 support#5368
Amit (yungFundamental) wants to merge 4 commits intoconfluentinc:masterfrom
yungFundamental:dev_kip-546_add-client-quota-api

Conversation

@yungFundamental
Copy link
Copy Markdown

As referenced in #5227, multiple users have requested support for AlterClientQuotas and DescribeClientQuotas requests.

This PR adds the capabilities mentioned in KIP-546.

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
@yungFundamental Amit (yungFundamental) requested a review from a team as a code owner March 27, 2026 13:54
@confluent-cla-assistant
Copy link
Copy Markdown

confluent-cla-assistant bot commented Mar 27, 2026

🎉 All Contributor License Agreements have been signed. Ready to merge.
✅ yungFundamental
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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants