diff --git a/CHANGELOG.md b/CHANGELOG.md index 78326486a..e9b43973b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,13 +2,15 @@ librdkafka v2.6.0 is a feature release: + * [KIP-460](https://cwiki.apache.org/confluence/display/KAFKA/KIP-460%3A+Admin+Leader+Election+RPC) Admin Leader Election RPC (#4845) * [KIP-714] Complete consumer metrics support (#4808). * [KIP-714] Produce latency average and maximum metrics support for parity with Java client (#4847). * [KIP-848] ListConsumerGroups Admin API now has an optional filter to return only groups of given types. + * Added Transactional id resource type for ACL operations (@JohnPreston, #4856). * Fix for permanent fetch errors when using a newer Fetch RPC version with an older inter broker protocol (#4806). - * [KIP-460](https://cwiki.apache.org/confluence/display/KAFKA/KIP-460%3A+Admin+Leader+Election+RPC) Admin Leader Election RPC (#4845) + ## Fixes diff --git a/src/rdkafka.h b/src/rdkafka.h index de433b823..507d791e0 100644 --- a/src/rdkafka.h +++ b/src/rdkafka.h @@ -7820,12 +7820,13 @@ rd_kafka_ConfigEntry_synonyms(const rd_kafka_ConfigEntry_t *entry, * @brief Apache Kafka resource types */ typedef enum rd_kafka_ResourceType_t { - RD_KAFKA_RESOURCE_UNKNOWN = 0, /**< Unknown */ - RD_KAFKA_RESOURCE_ANY = 1, /**< Any (used for lookups) */ - RD_KAFKA_RESOURCE_TOPIC = 2, /**< Topic */ - RD_KAFKA_RESOURCE_GROUP = 3, /**< Group */ - RD_KAFKA_RESOURCE_BROKER = 4, /**< Broker */ - RD_KAFKA_RESOURCE__CNT, /**< Number of resource types defined */ + RD_KAFKA_RESOURCE_UNKNOWN = 0, /**< Unknown */ + RD_KAFKA_RESOURCE_ANY = 1, /**< Any (used for lookups) */ + RD_KAFKA_RESOURCE_TOPIC = 2, /**< Topic */ + RD_KAFKA_RESOURCE_GROUP = 3, /**< Group */ + RD_KAFKA_RESOURCE_BROKER = 4, /**< Broker */ + RD_KAFKA_RESOURCE_TRANSACTIONAL_ID = 5, /**< Transactional ID */ + RD_KAFKA_RESOURCE__CNT, /**< Number of resource types defined */ } rd_kafka_ResourceType_t; /** diff --git a/src/rdkafka_admin.c b/src/rdkafka_admin.c index c4642e805..12734e1ed 100644 --- a/src/rdkafka_admin.c +++ b/src/rdkafka_admin.c @@ -2901,9 +2901,8 @@ const char *rd_kafka_ResourcePatternType_name( } const char *rd_kafka_ResourceType_name(rd_kafka_ResourceType_t restype) { - static const char *names[] = { - "UNKNOWN", "ANY", "TOPIC", "GROUP", "BROKER", - }; + static const char *names[] = {"UNKNOWN", "ANY", "TOPIC", + "GROUP", "BROKER", "TRANSACTIONAL_ID"}; if ((unsigned int)restype >= (unsigned int)RD_KAFKA_RESOURCE__CNT) return "UNSUPPORTED"; diff --git a/tests/0080-admin_ut.c b/tests/0080-admin_ut.c index ad553f9a0..22d93edc0 100644 --- a/tests/0080-admin_ut.c +++ b/tests/0080-admin_ut.c @@ -1184,8 +1184,8 @@ static void do_test_AclBinding() { char errstr[512]; rd_kafka_AclBinding_t *new_acl; - rd_bool_t valid_resource_types[] = {rd_false, rd_false, rd_true, - rd_true, rd_true, rd_false}; + rd_bool_t valid_resource_types[] = { + rd_false, rd_false, rd_true, rd_true, rd_true, rd_true, rd_false}; rd_bool_t valid_resource_pattern_types[] = { rd_false, rd_false, rd_false, rd_true, rd_true, rd_false}; rd_bool_t valid_acl_operation[] = { @@ -1316,7 +1316,7 @@ static void do_test_AclBindingFilter() { char errstr[512]; rd_kafka_AclBindingFilter_t *new_acl_filter; - rd_bool_t valid_resource_types[] = {rd_false, rd_true, rd_true, + rd_bool_t valid_resource_types[] = {rd_false, rd_true, rd_true, rd_true, rd_true, rd_true, rd_false}; rd_bool_t valid_resource_pattern_types[] = { rd_false, rd_true, rd_true, rd_true, rd_true, rd_false};