Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adding int identifier for transactional ID #4803

Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 7 additions & 6 deletions src/rdkafka.h
Original file line number Diff line number Diff line change
Expand Up @@ -7719,12 +7719,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;

/**
Expand Down
2 changes: 1 addition & 1 deletion src/rdkafka_admin.c
Original file line number Diff line number Diff line change
Expand Up @@ -2826,7 +2826,7 @@ 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",
"UNKNOWN", "ANY", "TOPIC", "GROUP", "BROKER", "TRANSACTIONAL_ID"
};

if ((unsigned int)restype >= (unsigned int)RD_KAFKA_RESOURCE__CNT)
Expand Down
2 changes: 1 addition & 1 deletion tests/0080-admin_ut.c
Original file line number Diff line number Diff line change
Expand Up @@ -1317,7 +1317,7 @@ static void do_test_AclBindingFilter() {
rd_kafka_AclBindingFilter_t *new_acl_filter;

rd_bool_t valid_resource_types[] = {rd_false, rd_true, rd_true,
rd_true, rd_true, rd_false};
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};
rd_bool_t valid_acl_operation[] = {
Expand Down