From 6e957d57aef161e834d7232bb22d2fc7603df66b Mon Sep 17 00:00:00 2001 From: Nikhil Benesch Date: Tue, 30 Jan 2024 01:05:56 -0500 Subject: [PATCH] rdkafka-sys: upgrade to librdkafka v2.3.0 --- .gitmodules | 2 +- Cargo.lock | 2 +- rdkafka-sys/Cargo.toml | 2 +- rdkafka-sys/librdkafka | 2 +- rdkafka-sys/src/bindings.rs | 824 ++++++++++++++++++++++++++++++++- rdkafka-sys/src/helpers.rs | 1 + rdkafka-sys/src/types.rs | 2 + rdkafka-sys/update-bindings.sh | 12 +- src/consumer/base_consumer.rs | 1 - 9 files changed, 815 insertions(+), 33 deletions(-) diff --git a/.gitmodules b/.gitmodules index 3943bcdf7..aabc5823a 100644 --- a/.gitmodules +++ b/.gitmodules @@ -1,3 +1,3 @@ [submodule "rdkafka-sys/librdkafka"] path = rdkafka-sys/librdkafka - url = https://github.com/MaterializeInc/librdkafka + url = https://github.com/confluentinc/librdkafka diff --git a/Cargo.lock b/Cargo.lock index 5c4284779..8f02b821b 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1099,7 +1099,7 @@ dependencies = [ [[package]] name = "rdkafka-sys" -version = "4.3.0+1.9.2" +version = "4.3.0+2.3.0" dependencies = [ "cmake", "curl-sys", diff --git a/rdkafka-sys/Cargo.toml b/rdkafka-sys/Cargo.toml index 2b7dcdfb4..f37c0bfd2 100644 --- a/rdkafka-sys/Cargo.toml +++ b/rdkafka-sys/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "rdkafka-sys" -version = "4.3.0+1.9.2" +version = "4.3.0+2.3.0" authors = ["Federico Giraud "] build = "build.rs" links = "rdkafka" diff --git a/rdkafka-sys/librdkafka b/rdkafka-sys/librdkafka index a61f71d36..95a542c87 160000 --- a/rdkafka-sys/librdkafka +++ b/rdkafka-sys/librdkafka @@ -1 +1 @@ -Subproject commit a61f71d3613c12433dc1f9a6a47b6448b2d29529 +Subproject commit 95a542c87c61d2c45b445f91c73dd5442eb04f3c diff --git a/rdkafka-sys/src/bindings.rs b/rdkafka-sys/src/bindings.rs index e9f70591a..3e666b647 100644 --- a/rdkafka-sys/src/bindings.rs +++ b/rdkafka-sys/src/bindings.rs @@ -1,10 +1,10 @@ -/* automatically generated by rust-bindgen 0.61.0 */ +/* automatically generated by rust-bindgen 0.66.1 */ use libc::{addrinfo, c_char, c_int, c_void, sockaddr, FILE}; use num_enum::TryFromPrimitive; -pub const RD_KAFKA_VERSION: u32 = 17367807; -pub const RD_KAFKA_DEBUG_CONTEXTS : & [u8 ; 138usize] = b"all,generic,broker,topic,metadata,feature,queue,msg,protocol,cgrp,security,fetch,interceptor,plugin,consumer,admin,eos,mock,assignor,conf\0" ; +pub const RD_KAFKA_VERSION: u32 = 33751295; +pub const RD_KAFKA_DEBUG_CONTEXTS : & [u8 ; 138] = b"all,generic,broker,topic,metadata,feature,queue,msg,protocol,cgrp,security,fetch,interceptor,plugin,consumer,admin,eos,mock,assignor,conf\0" ; pub const RD_KAFKA_DESTROY_F_NO_CONSUMER_CLOSE: u32 = 8; pub const RD_KAFKA_OFFSET_BEGINNING: i32 = -2; pub const RD_KAFKA_OFFSET_END: i32 = -1; @@ -39,6 +39,16 @@ pub const RD_KAFKA_EVENT_BACKGROUND: u32 = 512; pub const RD_KAFKA_EVENT_CREATEACLS_RESULT: u32 = 1024; pub const RD_KAFKA_EVENT_DESCRIBEACLS_RESULT: u32 = 2048; pub const RD_KAFKA_EVENT_DELETEACLS_RESULT: u32 = 4096; +pub const RD_KAFKA_EVENT_LISTCONSUMERGROUPS_RESULT: u32 = 8192; +pub const RD_KAFKA_EVENT_DESCRIBECONSUMERGROUPS_RESULT: u32 = 16384; +pub const RD_KAFKA_EVENT_LISTCONSUMERGROUPOFFSETS_RESULT: u32 = 32768; +pub const RD_KAFKA_EVENT_ALTERCONSUMERGROUPOFFSETS_RESULT: u32 = 65536; +pub const RD_KAFKA_EVENT_INCREMENTALALTERCONFIGS_RESULT: u32 = 131072; +pub const RD_KAFKA_EVENT_DESCRIBEUSERSCRAMCREDENTIALS_RESULT: u32 = 262144; +pub const RD_KAFKA_EVENT_ALTERUSERSCRAMCREDENTIALS_RESULT: u32 = 524288; +pub const RD_KAFKA_EVENT_DESCRIBETOPICS_RESULT: u32 = 1048576; +pub const RD_KAFKA_EVENT_DESCRIBECLUSTER_RESULT: u32 = 2097152; +pub const RD_KAFKA_EVENT_LISTOFFSETS_RESULT: u32 = 4194304; extern "C" { pub fn rd_kafka_version() -> c_int; } @@ -133,6 +143,12 @@ pub struct rd_kafka_acl_result_s { _unused: [u8; 0], } pub type rd_kafka_acl_result_t = rd_kafka_acl_result_s; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct rd_kafka_Uuid_s { + _unused: [u8; 0], +} +pub type rd_kafka_Uuid_t = rd_kafka_Uuid_s; #[repr(i32)] #[derive(Debug, Copy, Clone, Hash, PartialEq, Eq, TryFromPrimitive)] pub enum rd_kafka_resp_err_t { @@ -197,6 +213,7 @@ pub enum rd_kafka_resp_err_t { RD_KAFKA_RESP_ERR__ASSIGNMENT_LOST = -142, RD_KAFKA_RESP_ERR__NOOP = -141, RD_KAFKA_RESP_ERR__AUTO_OFFSET_RESET = -140, + RD_KAFKA_RESP_ERR__LOG_TRUNCATION = -139, RD_KAFKA_RESP_ERR__END = -100, RD_KAFKA_RESP_ERR_UNKNOWN = -1, RD_KAFKA_RESP_ERR_NO_ERROR = 0, @@ -382,6 +399,17 @@ pub type rd_kafka_topic_partition_t = rd_kafka_topic_partition_s; extern "C" { pub fn rd_kafka_topic_partition_destroy(rktpar: *mut rd_kafka_topic_partition_t); } +extern "C" { + pub fn rd_kafka_topic_partition_set_leader_epoch( + rktpar: *mut rd_kafka_topic_partition_t, + leader_epoch: i32, + ); +} +extern "C" { + pub fn rd_kafka_topic_partition_get_leader_epoch( + rktpar: *const rd_kafka_topic_partition_t, + ) -> i32; +} #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct rd_kafka_topic_partition_list_s { @@ -619,6 +647,30 @@ pub enum rd_kafka_msg_status_t { extern "C" { pub fn rd_kafka_message_status(rkmessage: *const rd_kafka_message_t) -> rd_kafka_msg_status_t; } +extern "C" { + pub fn rd_kafka_message_leader_epoch(rkmessage: *const rd_kafka_message_t) -> i32; +} +extern "C" { + pub fn rd_kafka_Uuid_base64str(uuid: *const rd_kafka_Uuid_t) -> *const c_char; +} +extern "C" { + pub fn rd_kafka_Uuid_least_significant_bits(uuid: *const rd_kafka_Uuid_t) -> i64; +} +extern "C" { + pub fn rd_kafka_Uuid_most_significant_bits(uuid: *const rd_kafka_Uuid_t) -> i64; +} +extern "C" { + pub fn rd_kafka_Uuid_new( + most_significant_bits: i64, + least_significant_bits: i64, + ) -> *mut rd_kafka_Uuid_t; +} +extern "C" { + pub fn rd_kafka_Uuid_copy(uuid: *const rd_kafka_Uuid_t) -> *mut rd_kafka_Uuid_t; +} +extern "C" { + pub fn rd_kafka_Uuid_destroy(uuid: *mut rd_kafka_Uuid_t); +} #[repr(i32)] #[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] pub enum rd_kafka_conf_res_t { @@ -1189,6 +1241,13 @@ extern "C" { extern "C" { pub fn rd_kafka_sasl_background_callbacks_enable(rk: *mut rd_kafka_t) -> *mut rd_kafka_error_t; } +extern "C" { + pub fn rd_kafka_sasl_set_credentials( + rk: *mut rd_kafka_t, + username: *const c_char, + password: *const c_char, + ) -> *mut rd_kafka_error_t; +} extern "C" { pub fn rd_kafka_queue_get_consumer(rk: *mut rd_kafka_t) -> *mut rd_kafka_queue_t; } @@ -1326,6 +1385,11 @@ extern "C" { offsets: *mut rd_kafka_topic_partition_list_t, ) -> rd_kafka_resp_err_t; } +extern "C" { + pub fn rd_kafka_offset_store_message( + rkmessage: *mut rd_kafka_message_t, + ) -> *mut rd_kafka_error_t; +} extern "C" { pub fn rd_kafka_subscribe( rk: *mut rd_kafka_t, @@ -1558,6 +1622,24 @@ extern "C" { } #[repr(C)] #[derive(Debug, Copy, Clone)] +pub struct rd_kafka_Node_s { + _unused: [u8; 0], +} +pub type rd_kafka_Node_t = rd_kafka_Node_s; +extern "C" { + pub fn rd_kafka_Node_id(node: *const rd_kafka_Node_t) -> c_int; +} +extern "C" { + pub fn rd_kafka_Node_host(node: *const rd_kafka_Node_t) -> *const c_char; +} +extern "C" { + pub fn rd_kafka_Node_port(node: *const rd_kafka_Node_t) -> u16; +} +extern "C" { + pub fn rd_kafka_Node_rack(node: *const rd_kafka_Node_t) -> *const c_char; +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] pub struct rd_kafka_group_member_info { pub member_id: *mut c_char, pub client_id: *mut c_char, @@ -1567,6 +1649,17 @@ pub struct rd_kafka_group_member_info { pub member_assignment: *mut c_void, pub member_assignment_size: c_int, } +#[repr(u32)] +#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] +pub enum rd_kafka_consumer_group_state_t { + RD_KAFKA_CONSUMER_GROUP_STATE_UNKNOWN = 0, + RD_KAFKA_CONSUMER_GROUP_STATE_PREPARING_REBALANCE = 1, + RD_KAFKA_CONSUMER_GROUP_STATE_COMPLETING_REBALANCE = 2, + RD_KAFKA_CONSUMER_GROUP_STATE_STABLE = 3, + RD_KAFKA_CONSUMER_GROUP_STATE_DEAD = 4, + RD_KAFKA_CONSUMER_GROUP_STATE_EMPTY = 5, + RD_KAFKA_CONSUMER_GROUP_STATE__CNT = 6, +} #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct rd_kafka_group_info { @@ -1593,6 +1686,16 @@ extern "C" { timeout_ms: c_int, ) -> rd_kafka_resp_err_t; } +extern "C" { + pub fn rd_kafka_consumer_group_state_name( + state: rd_kafka_consumer_group_state_t, + ) -> *const c_char; +} +extern "C" { + pub fn rd_kafka_consumer_group_state_code( + name: *const c_char, + ) -> rd_kafka_consumer_group_state_t; +} extern "C" { pub fn rd_kafka_group_list_destroy(grplist: *const rd_kafka_group_list); } @@ -1729,10 +1832,20 @@ pub type rd_kafka_DescribeAcls_result_t = rd_kafka_event_t; pub type rd_kafka_DeleteAcls_result_t = rd_kafka_event_t; pub type rd_kafka_CreatePartitions_result_t = rd_kafka_event_t; pub type rd_kafka_AlterConfigs_result_t = rd_kafka_event_t; +pub type rd_kafka_IncrementalAlterConfigs_result_t = rd_kafka_event_t; pub type rd_kafka_DescribeConfigs_result_t = rd_kafka_event_t; pub type rd_kafka_DeleteRecords_result_t = rd_kafka_event_t; +pub type rd_kafka_ListConsumerGroups_result_t = rd_kafka_event_t; +pub type rd_kafka_DescribeConsumerGroups_result_t = rd_kafka_event_t; pub type rd_kafka_DeleteGroups_result_t = rd_kafka_event_t; pub type rd_kafka_DeleteConsumerGroupOffsets_result_t = rd_kafka_event_t; +pub type rd_kafka_AlterConsumerGroupOffsets_result_t = rd_kafka_event_t; +pub type rd_kafka_ListConsumerGroupOffsets_result_t = rd_kafka_event_t; +pub type rd_kafka_DescribeTopics_result_t = rd_kafka_event_t; +pub type rd_kafka_DescribeCluster_result_t = rd_kafka_event_t; +pub type rd_kafka_DescribeUserScramCredentials_result_t = rd_kafka_event_t; +pub type rd_kafka_AlterUserScramCredentials_result_t = rd_kafka_event_t; +pub type rd_kafka_ListOffsets_result_t = rd_kafka_event_t; extern "C" { pub fn rd_kafka_event_CreateTopics_result( rkev: *mut rd_kafka_event_t, @@ -1753,6 +1866,11 @@ extern "C" { rkev: *mut rd_kafka_event_t, ) -> *const rd_kafka_AlterConfigs_result_t; } +extern "C" { + pub fn rd_kafka_event_IncrementalAlterConfigs_result( + rkev: *mut rd_kafka_event_t, + ) -> *const rd_kafka_IncrementalAlterConfigs_result_t; +} extern "C" { pub fn rd_kafka_event_DescribeConfigs_result( rkev: *mut rd_kafka_event_t, @@ -1763,6 +1881,26 @@ extern "C" { rkev: *mut rd_kafka_event_t, ) -> *const rd_kafka_DeleteRecords_result_t; } +extern "C" { + pub fn rd_kafka_event_ListConsumerGroups_result( + rkev: *mut rd_kafka_event_t, + ) -> *const rd_kafka_ListConsumerGroups_result_t; +} +extern "C" { + pub fn rd_kafka_event_DescribeConsumerGroups_result( + rkev: *mut rd_kafka_event_t, + ) -> *const rd_kafka_DescribeConsumerGroups_result_t; +} +extern "C" { + pub fn rd_kafka_event_DescribeTopics_result( + rkev: *mut rd_kafka_event_t, + ) -> *const rd_kafka_DescribeTopics_result_t; +} +extern "C" { + pub fn rd_kafka_event_DescribeCluster_result( + rkev: *mut rd_kafka_event_t, + ) -> *const rd_kafka_DescribeCluster_result_t; +} extern "C" { pub fn rd_kafka_event_DeleteGroups_result( rkev: *mut rd_kafka_event_t, @@ -1788,6 +1926,31 @@ extern "C" { rkev: *mut rd_kafka_event_t, ) -> *const rd_kafka_DeleteAcls_result_t; } +extern "C" { + pub fn rd_kafka_event_ListConsumerGroupOffsets_result( + rkev: *mut rd_kafka_event_t, + ) -> *const rd_kafka_ListConsumerGroupOffsets_result_t; +} +extern "C" { + pub fn rd_kafka_event_AlterConsumerGroupOffsets_result( + rkev: *mut rd_kafka_event_t, + ) -> *const rd_kafka_AlterConsumerGroupOffsets_result_t; +} +extern "C" { + pub fn rd_kafka_event_ListOffsets_result( + rkev: *mut rd_kafka_event_t, + ) -> *const rd_kafka_ListOffsets_result_t; +} +extern "C" { + pub fn rd_kafka_event_DescribeUserScramCredentials_result( + rkev: *mut rd_kafka_event_t, + ) -> *const rd_kafka_DescribeUserScramCredentials_result_t; +} +extern "C" { + pub fn rd_kafka_event_AlterUserScramCredentials_result( + rkev: *mut rd_kafka_event_t, + ) -> *const rd_kafka_AlterUserScramCredentials_result_t; +} extern "C" { pub fn rd_kafka_queue_poll( rkqu: *mut rd_kafka_queue_t, @@ -1911,6 +2074,17 @@ pub type rd_kafka_interceptor_f_on_thread_exit_t = Option< ic_opaque: *mut c_void, ) -> rd_kafka_resp_err_t, >; +pub type rd_kafka_interceptor_f_on_broker_state_change_t = Option< + unsafe extern "C" fn( + rk: *mut rd_kafka_t, + broker_id: i32, + secproto: *const c_char, + name: *const c_char, + port: c_int, + state: *const c_char, + ic_opaque: *mut c_void, + ) -> rd_kafka_resp_err_t, +>; extern "C" { pub fn rd_kafka_conf_interceptor_add_on_conf_set( conf: *mut rd_kafka_conf_t, @@ -2015,6 +2189,14 @@ extern "C" { ic_opaque: *mut c_void, ) -> rd_kafka_resp_err_t; } +extern "C" { + pub fn rd_kafka_interceptor_add_on_broker_state_change( + rk: *mut rd_kafka_t, + ic_name: *const c_char, + on_broker_state_change: rd_kafka_interceptor_f_on_broker_state_change_t, + ic_opaque: *mut c_void, + ) -> rd_kafka_resp_err_t; +} extern "C" { pub fn rd_kafka_topic_result_error( topicres: *const rd_kafka_topic_result_t, @@ -2056,7 +2238,17 @@ pub enum rd_kafka_admin_op_t { RD_KAFKA_ADMIN_OP_CREATEACLS = 9, RD_KAFKA_ADMIN_OP_DESCRIBEACLS = 10, RD_KAFKA_ADMIN_OP_DELETEACLS = 11, - RD_KAFKA_ADMIN_OP__CNT = 12, + RD_KAFKA_ADMIN_OP_LISTCONSUMERGROUPS = 12, + RD_KAFKA_ADMIN_OP_DESCRIBECONSUMERGROUPS = 13, + RD_KAFKA_ADMIN_OP_LISTCONSUMERGROUPOFFSETS = 14, + RD_KAFKA_ADMIN_OP_ALTERCONSUMERGROUPOFFSETS = 15, + RD_KAFKA_ADMIN_OP_INCREMENTALALTERCONFIGS = 16, + RD_KAFKA_ADMIN_OP_DESCRIBEUSERSCRAMCREDENTIALS = 17, + RD_KAFKA_ADMIN_OP_ALTERUSERSCRAMCREDENTIALS = 18, + RD_KAFKA_ADMIN_OP_DESCRIBETOPICS = 19, + RD_KAFKA_ADMIN_OP_DESCRIBECLUSTER = 20, + RD_KAFKA_ADMIN_OP_LISTOFFSETS = 21, + RD_KAFKA_ADMIN_OP__CNT = 22, } #[repr(C)] #[derive(Debug, Copy, Clone)] @@ -2064,6 +2256,12 @@ pub struct rd_kafka_AdminOptions_s { _unused: [u8; 0], } pub type rd_kafka_AdminOptions_t = rd_kafka_AdminOptions_s; +#[repr(u32)] +#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] +pub enum rd_kafka_IsolationLevel_t { + RD_KAFKA_ISOLATION_LEVEL_READ_UNCOMMITTED = 0, + RD_KAFKA_ISOLATION_LEVEL_READ_COMMITTED = 1, +} extern "C" { pub fn rd_kafka_AdminOptions_new( rk: *mut rd_kafka_t, @@ -2105,12 +2303,55 @@ extern "C" { errstr_size: usize, ) -> rd_kafka_resp_err_t; } +extern "C" { + pub fn rd_kafka_AdminOptions_set_require_stable_offsets( + options: *mut rd_kafka_AdminOptions_t, + true_or_false: c_int, + ) -> *mut rd_kafka_error_t; +} +extern "C" { + pub fn rd_kafka_AdminOptions_set_include_authorized_operations( + options: *mut rd_kafka_AdminOptions_t, + true_or_false: c_int, + ) -> *mut rd_kafka_error_t; +} +extern "C" { + pub fn rd_kafka_AdminOptions_set_match_consumer_group_states( + options: *mut rd_kafka_AdminOptions_t, + consumer_group_states: *const rd_kafka_consumer_group_state_t, + consumer_group_states_cnt: usize, + ) -> *mut rd_kafka_error_t; +} +extern "C" { + pub fn rd_kafka_AdminOptions_set_isolation_level( + options: *mut rd_kafka_AdminOptions_t, + value: rd_kafka_IsolationLevel_t, + ) -> *mut rd_kafka_error_t; +} extern "C" { pub fn rd_kafka_AdminOptions_set_opaque( options: *mut rd_kafka_AdminOptions_t, ev_opaque: *mut c_void, ); } +#[repr(u32)] +#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] +pub enum rd_kafka_AclOperation_t { + RD_KAFKA_ACL_OPERATION_UNKNOWN = 0, + RD_KAFKA_ACL_OPERATION_ANY = 1, + RD_KAFKA_ACL_OPERATION_ALL = 2, + RD_KAFKA_ACL_OPERATION_READ = 3, + RD_KAFKA_ACL_OPERATION_WRITE = 4, + RD_KAFKA_ACL_OPERATION_CREATE = 5, + RD_KAFKA_ACL_OPERATION_DELETE = 6, + RD_KAFKA_ACL_OPERATION_ALTER = 7, + RD_KAFKA_ACL_OPERATION_DESCRIBE = 8, + RD_KAFKA_ACL_OPERATION_CLUSTER_ACTION = 9, + RD_KAFKA_ACL_OPERATION_DESCRIBE_CONFIGS = 10, + RD_KAFKA_ACL_OPERATION_ALTER_CONFIGS = 11, + RD_KAFKA_ACL_OPERATION_IDEMPOTENT_WRITE = 12, + RD_KAFKA_ACL_OPERATION__CNT = 13, +} #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct rd_kafka_NewTopic_s { @@ -2317,6 +2558,15 @@ pub enum rd_kafka_ResourcePatternType_t { RD_KAFKA_RESOURCE_PATTERN_PREFIXED = 4, RD_KAFKA_RESOURCE_PATTERN_TYPE__CNT = 5, } +#[repr(u32)] +#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] +pub enum rd_kafka_AlterConfigOpType_t { + RD_KAFKA_ALTER_CONFIG_OP_TYPE_SET = 0, + RD_KAFKA_ALTER_CONFIG_OP_TYPE_DELETE = 1, + RD_KAFKA_ALTER_CONFIG_OP_TYPE_APPEND = 2, + RD_KAFKA_ALTER_CONFIG_OP_TYPE_SUBTRACT = 3, + RD_KAFKA_ALTER_CONFIG_OP_TYPE__CNT = 4, +} extern "C" { pub fn rd_kafka_ResourcePatternType_name( resource_pattern_type: rd_kafka_ResourcePatternType_t, @@ -2353,6 +2603,14 @@ extern "C" { value: *const c_char, ) -> rd_kafka_resp_err_t; } +extern "C" { + pub fn rd_kafka_ConfigResource_add_incremental_config( + config: *mut rd_kafka_ConfigResource_t, + name: *const c_char, + op_type: rd_kafka_AlterConfigOpType_t, + value: *const c_char, + ) -> *mut rd_kafka_error_t; +} extern "C" { pub fn rd_kafka_ConfigResource_configs( config: *const rd_kafka_ConfigResource_t, @@ -2392,6 +2650,21 @@ extern "C" { cntp: *mut usize, ) -> *mut *const rd_kafka_ConfigResource_t; } +extern "C" { + pub fn rd_kafka_IncrementalAlterConfigs( + rk: *mut rd_kafka_t, + configs: *mut *mut rd_kafka_ConfigResource_t, + config_cnt: usize, + options: *const rd_kafka_AdminOptions_t, + rkqu: *mut rd_kafka_queue_t, + ); +} +extern "C" { + pub fn rd_kafka_IncrementalAlterConfigs_result_resources( + result: *const rd_kafka_IncrementalAlterConfigs_result_t, + cntp: *mut usize, + ) -> *mut *const rd_kafka_ConfigResource_t; +} extern "C" { pub fn rd_kafka_DescribeConfigs( rk: *mut rd_kafka_t, @@ -2443,6 +2716,286 @@ extern "C" { } #[repr(C)] #[derive(Debug, Copy, Clone)] +pub struct rd_kafka_TopicCollection_s { + _unused: [u8; 0], +} +pub type rd_kafka_TopicCollection_t = rd_kafka_TopicCollection_s; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct rd_kafka_TopicPartitionInfo_s { + _unused: [u8; 0], +} +pub type rd_kafka_TopicPartitionInfo_t = rd_kafka_TopicPartitionInfo_s; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct rd_kafka_TopicDescription_s { + _unused: [u8; 0], +} +pub type rd_kafka_TopicDescription_t = rd_kafka_TopicDescription_s; +extern "C" { + pub fn rd_kafka_TopicCollection_of_topic_names( + topics: *mut *const c_char, + topics_cnt: usize, + ) -> *mut rd_kafka_TopicCollection_t; +} +extern "C" { + pub fn rd_kafka_TopicCollection_destroy(topics: *mut rd_kafka_TopicCollection_t); +} +extern "C" { + pub fn rd_kafka_DescribeTopics( + rk: *mut rd_kafka_t, + topics: *const rd_kafka_TopicCollection_t, + options: *const rd_kafka_AdminOptions_t, + rkqu: *mut rd_kafka_queue_t, + ); +} +extern "C" { + pub fn rd_kafka_DescribeTopics_result_topics( + result: *const rd_kafka_DescribeTopics_result_t, + cntp: *mut usize, + ) -> *mut *const rd_kafka_TopicDescription_t; +} +extern "C" { + pub fn rd_kafka_TopicDescription_partitions( + topicdesc: *const rd_kafka_TopicDescription_t, + cntp: *mut usize, + ) -> *mut *const rd_kafka_TopicPartitionInfo_t; +} +extern "C" { + pub fn rd_kafka_TopicPartitionInfo_partition( + partition: *const rd_kafka_TopicPartitionInfo_t, + ) -> c_int; +} +extern "C" { + pub fn rd_kafka_TopicPartitionInfo_leader( + partition: *const rd_kafka_TopicPartitionInfo_t, + ) -> *const rd_kafka_Node_t; +} +extern "C" { + pub fn rd_kafka_TopicPartitionInfo_isr( + partition: *const rd_kafka_TopicPartitionInfo_t, + cntp: *mut usize, + ) -> *mut *const rd_kafka_Node_t; +} +extern "C" { + pub fn rd_kafka_TopicPartitionInfo_replicas( + partition: *const rd_kafka_TopicPartitionInfo_t, + cntp: *mut usize, + ) -> *mut *const rd_kafka_Node_t; +} +extern "C" { + pub fn rd_kafka_TopicDescription_authorized_operations( + topicdesc: *const rd_kafka_TopicDescription_t, + cntp: *mut usize, + ) -> *const rd_kafka_AclOperation_t; +} +extern "C" { + pub fn rd_kafka_TopicDescription_name( + topicdesc: *const rd_kafka_TopicDescription_t, + ) -> *const c_char; +} +extern "C" { + pub fn rd_kafka_TopicDescription_topic_id( + topicdesc: *const rd_kafka_TopicDescription_t, + ) -> *const rd_kafka_Uuid_t; +} +extern "C" { + pub fn rd_kafka_TopicDescription_is_internal( + topicdesc: *const rd_kafka_TopicDescription_t, + ) -> c_int; +} +extern "C" { + pub fn rd_kafka_TopicDescription_error( + topicdesc: *const rd_kafka_TopicDescription_t, + ) -> *const rd_kafka_error_t; +} +extern "C" { + pub fn rd_kafka_DescribeCluster( + rk: *mut rd_kafka_t, + options: *const rd_kafka_AdminOptions_t, + rkqu: *mut rd_kafka_queue_t, + ); +} +extern "C" { + pub fn rd_kafka_DescribeCluster_result_nodes( + result: *const rd_kafka_DescribeCluster_result_t, + cntp: *mut usize, + ) -> *mut *const rd_kafka_Node_t; +} +extern "C" { + pub fn rd_kafka_DescribeCluster_result_authorized_operations( + result: *const rd_kafka_DescribeCluster_result_t, + cntp: *mut usize, + ) -> *const rd_kafka_AclOperation_t; +} +extern "C" { + pub fn rd_kafka_DescribeCluster_result_controller( + result: *const rd_kafka_DescribeCluster_result_t, + ) -> *const rd_kafka_Node_t; +} +extern "C" { + pub fn rd_kafka_DescribeCluster_result_cluster_id( + result: *const rd_kafka_DescribeCluster_result_t, + ) -> *const c_char; +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct rd_kafka_ConsumerGroupListing_s { + _unused: [u8; 0], +} +pub type rd_kafka_ConsumerGroupListing_t = rd_kafka_ConsumerGroupListing_s; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct rd_kafka_ListConsumerGroupsResult_s { + _unused: [u8; 0], +} +pub type rd_kafka_ListConsumerGroupsResult_t = rd_kafka_ListConsumerGroupsResult_s; +extern "C" { + pub fn rd_kafka_ListConsumerGroups( + rk: *mut rd_kafka_t, + options: *const rd_kafka_AdminOptions_t, + rkqu: *mut rd_kafka_queue_t, + ); +} +extern "C" { + pub fn rd_kafka_ConsumerGroupListing_group_id( + grplist: *const rd_kafka_ConsumerGroupListing_t, + ) -> *const c_char; +} +extern "C" { + pub fn rd_kafka_ConsumerGroupListing_is_simple_consumer_group( + grplist: *const rd_kafka_ConsumerGroupListing_t, + ) -> c_int; +} +extern "C" { + pub fn rd_kafka_ConsumerGroupListing_state( + grplist: *const rd_kafka_ConsumerGroupListing_t, + ) -> rd_kafka_consumer_group_state_t; +} +extern "C" { + pub fn rd_kafka_ListConsumerGroups_result_valid( + result: *const rd_kafka_ListConsumerGroups_result_t, + cntp: *mut usize, + ) -> *mut *const rd_kafka_ConsumerGroupListing_t; +} +extern "C" { + pub fn rd_kafka_ListConsumerGroups_result_errors( + result: *const rd_kafka_ListConsumerGroups_result_t, + cntp: *mut usize, + ) -> *mut *const rd_kafka_error_t; +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct rd_kafka_ConsumerGroupDescription_s { + _unused: [u8; 0], +} +pub type rd_kafka_ConsumerGroupDescription_t = rd_kafka_ConsumerGroupDescription_s; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct rd_kafka_MemberDescription_s { + _unused: [u8; 0], +} +pub type rd_kafka_MemberDescription_t = rd_kafka_MemberDescription_s; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct rd_kafka_MemberAssignment_s { + _unused: [u8; 0], +} +pub type rd_kafka_MemberAssignment_t = rd_kafka_MemberAssignment_s; +extern "C" { + pub fn rd_kafka_DescribeConsumerGroups( + rk: *mut rd_kafka_t, + groups: *mut *const c_char, + groups_cnt: usize, + options: *const rd_kafka_AdminOptions_t, + rkqu: *mut rd_kafka_queue_t, + ); +} +extern "C" { + pub fn rd_kafka_DescribeConsumerGroups_result_groups( + result: *const rd_kafka_DescribeConsumerGroups_result_t, + cntp: *mut usize, + ) -> *mut *const rd_kafka_ConsumerGroupDescription_t; +} +extern "C" { + pub fn rd_kafka_ConsumerGroupDescription_group_id( + grpdesc: *const rd_kafka_ConsumerGroupDescription_t, + ) -> *const c_char; +} +extern "C" { + pub fn rd_kafka_ConsumerGroupDescription_error( + grpdesc: *const rd_kafka_ConsumerGroupDescription_t, + ) -> *const rd_kafka_error_t; +} +extern "C" { + pub fn rd_kafka_ConsumerGroupDescription_is_simple_consumer_group( + grpdesc: *const rd_kafka_ConsumerGroupDescription_t, + ) -> c_int; +} +extern "C" { + pub fn rd_kafka_ConsumerGroupDescription_partition_assignor( + grpdesc: *const rd_kafka_ConsumerGroupDescription_t, + ) -> *const c_char; +} +extern "C" { + pub fn rd_kafka_ConsumerGroupDescription_authorized_operations( + grpdesc: *const rd_kafka_ConsumerGroupDescription_t, + cntp: *mut usize, + ) -> *const rd_kafka_AclOperation_t; +} +extern "C" { + pub fn rd_kafka_ConsumerGroupDescription_state( + grpdesc: *const rd_kafka_ConsumerGroupDescription_t, + ) -> rd_kafka_consumer_group_state_t; +} +extern "C" { + pub fn rd_kafka_ConsumerGroupDescription_coordinator( + grpdesc: *const rd_kafka_ConsumerGroupDescription_t, + ) -> *const rd_kafka_Node_t; +} +extern "C" { + pub fn rd_kafka_ConsumerGroupDescription_member_count( + grpdesc: *const rd_kafka_ConsumerGroupDescription_t, + ) -> usize; +} +extern "C" { + pub fn rd_kafka_ConsumerGroupDescription_member( + grpdesc: *const rd_kafka_ConsumerGroupDescription_t, + idx: usize, + ) -> *const rd_kafka_MemberDescription_t; +} +extern "C" { + pub fn rd_kafka_MemberDescription_client_id( + member: *const rd_kafka_MemberDescription_t, + ) -> *const c_char; +} +extern "C" { + pub fn rd_kafka_MemberDescription_group_instance_id( + member: *const rd_kafka_MemberDescription_t, + ) -> *const c_char; +} +extern "C" { + pub fn rd_kafka_MemberDescription_consumer_id( + member: *const rd_kafka_MemberDescription_t, + ) -> *const c_char; +} +extern "C" { + pub fn rd_kafka_MemberDescription_host( + member: *const rd_kafka_MemberDescription_t, + ) -> *const c_char; +} +extern "C" { + pub fn rd_kafka_MemberDescription_assignment( + member: *const rd_kafka_MemberDescription_t, + ) -> *const rd_kafka_MemberAssignment_t; +} +extern "C" { + pub fn rd_kafka_MemberAssignment_partitions( + assignment: *const rd_kafka_MemberAssignment_t, + ) -> *const rd_kafka_topic_partition_list_t; +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] pub struct rd_kafka_DeleteGroup_s { _unused: [u8; 0], } @@ -2476,6 +3029,82 @@ extern "C" { } #[repr(C)] #[derive(Debug, Copy, Clone)] +pub struct rd_kafka_ListConsumerGroupOffsets_s { + _unused: [u8; 0], +} +pub type rd_kafka_ListConsumerGroupOffsets_t = rd_kafka_ListConsumerGroupOffsets_s; +extern "C" { + pub fn rd_kafka_ListConsumerGroupOffsets_new( + group_id: *const c_char, + partitions: *const rd_kafka_topic_partition_list_t, + ) -> *mut rd_kafka_ListConsumerGroupOffsets_t; +} +extern "C" { + pub fn rd_kafka_ListConsumerGroupOffsets_destroy( + list_grpoffsets: *mut rd_kafka_ListConsumerGroupOffsets_t, + ); +} +extern "C" { + pub fn rd_kafka_ListConsumerGroupOffsets_destroy_array( + list_grpoffsets: *mut *mut rd_kafka_ListConsumerGroupOffsets_t, + list_grpoffset_cnt: usize, + ); +} +extern "C" { + pub fn rd_kafka_ListConsumerGroupOffsets( + rk: *mut rd_kafka_t, + list_grpoffsets: *mut *mut rd_kafka_ListConsumerGroupOffsets_t, + list_grpoffsets_cnt: usize, + options: *const rd_kafka_AdminOptions_t, + rkqu: *mut rd_kafka_queue_t, + ); +} +extern "C" { + pub fn rd_kafka_ListConsumerGroupOffsets_result_groups( + result: *const rd_kafka_ListConsumerGroupOffsets_result_t, + cntp: *mut usize, + ) -> *mut *const rd_kafka_group_result_t; +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct rd_kafka_AlterConsumerGroupOffsets_s { + _unused: [u8; 0], +} +pub type rd_kafka_AlterConsumerGroupOffsets_t = rd_kafka_AlterConsumerGroupOffsets_s; +extern "C" { + pub fn rd_kafka_AlterConsumerGroupOffsets_new( + group_id: *const c_char, + partitions: *const rd_kafka_topic_partition_list_t, + ) -> *mut rd_kafka_AlterConsumerGroupOffsets_t; +} +extern "C" { + pub fn rd_kafka_AlterConsumerGroupOffsets_destroy( + alter_grpoffsets: *mut rd_kafka_AlterConsumerGroupOffsets_t, + ); +} +extern "C" { + pub fn rd_kafka_AlterConsumerGroupOffsets_destroy_array( + alter_grpoffsets: *mut *mut rd_kafka_AlterConsumerGroupOffsets_t, + alter_grpoffset_cnt: usize, + ); +} +extern "C" { + pub fn rd_kafka_AlterConsumerGroupOffsets( + rk: *mut rd_kafka_t, + alter_grpoffsets: *mut *mut rd_kafka_AlterConsumerGroupOffsets_t, + alter_grpoffsets_cnt: usize, + options: *const rd_kafka_AdminOptions_t, + rkqu: *mut rd_kafka_queue_t, + ); +} +extern "C" { + pub fn rd_kafka_AlterConsumerGroupOffsets_result_groups( + result: *const rd_kafka_AlterConsumerGroupOffsets_result_t, + cntp: *mut usize, + ) -> *mut *const rd_kafka_group_result_t; +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] pub struct rd_kafka_DeleteConsumerGroupOffsets_s { _unused: [u8; 0], } @@ -2512,6 +3141,175 @@ extern "C" { cntp: *mut usize, ) -> *mut *const rd_kafka_group_result_t; } +#[repr(i32)] +#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] +pub enum rd_kafka_OffsetSpec_t { + RD_KAFKA_OFFSET_SPEC_MAX_TIMESTAMP = -3, + RD_KAFKA_OFFSET_SPEC_EARLIEST = -2, + RD_KAFKA_OFFSET_SPEC_LATEST = -1, +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct rd_kafka_ListOffsetsResultInfo_s { + _unused: [u8; 0], +} +pub type rd_kafka_ListOffsetsResultInfo_t = rd_kafka_ListOffsetsResultInfo_s; +extern "C" { + pub fn rd_kafka_ListOffsetsResultInfo_topic_partition( + result_info: *const rd_kafka_ListOffsetsResultInfo_t, + ) -> *const rd_kafka_topic_partition_t; +} +extern "C" { + pub fn rd_kafka_ListOffsetsResultInfo_timestamp( + result_info: *const rd_kafka_ListOffsetsResultInfo_t, + ) -> i64; +} +extern "C" { + pub fn rd_kafka_ListOffsets_result_infos( + result: *const rd_kafka_ListOffsets_result_t, + cntp: *mut usize, + ) -> *mut *const rd_kafka_ListOffsetsResultInfo_t; +} +extern "C" { + pub fn rd_kafka_ListOffsets( + rk: *mut rd_kafka_t, + topic_partitions: *mut rd_kafka_topic_partition_list_t, + options: *const rd_kafka_AdminOptions_t, + rkqu: *mut rd_kafka_queue_t, + ); +} +#[repr(u32)] +#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] +pub enum rd_kafka_ScramMechanism_t { + RD_KAFKA_SCRAM_MECHANISM_UNKNOWN = 0, + RD_KAFKA_SCRAM_MECHANISM_SHA_256 = 1, + RD_KAFKA_SCRAM_MECHANISM_SHA_512 = 2, + RD_KAFKA_SCRAM_MECHANISM__CNT = 3, +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct rd_kafka_ScramCredentialInfo_s { + _unused: [u8; 0], +} +pub type rd_kafka_ScramCredentialInfo_t = rd_kafka_ScramCredentialInfo_s; +extern "C" { + pub fn rd_kafka_ScramCredentialInfo_mechanism( + scram_credential_info: *const rd_kafka_ScramCredentialInfo_t, + ) -> rd_kafka_ScramMechanism_t; +} +extern "C" { + pub fn rd_kafka_ScramCredentialInfo_iterations( + scram_credential_info: *const rd_kafka_ScramCredentialInfo_t, + ) -> i32; +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct rd_kafka_UserScramCredentialsDescription_s { + _unused: [u8; 0], +} +pub type rd_kafka_UserScramCredentialsDescription_t = rd_kafka_UserScramCredentialsDescription_s; +extern "C" { + pub fn rd_kafka_UserScramCredentialsDescription_user( + description: *const rd_kafka_UserScramCredentialsDescription_t, + ) -> *const c_char; +} +extern "C" { + pub fn rd_kafka_UserScramCredentialsDescription_error( + description: *const rd_kafka_UserScramCredentialsDescription_t, + ) -> *const rd_kafka_error_t; +} +extern "C" { + pub fn rd_kafka_UserScramCredentialsDescription_scramcredentialinfo_count( + description: *const rd_kafka_UserScramCredentialsDescription_t, + ) -> usize; +} +extern "C" { + pub fn rd_kafka_UserScramCredentialsDescription_scramcredentialinfo( + description: *const rd_kafka_UserScramCredentialsDescription_t, + idx: usize, + ) -> *const rd_kafka_ScramCredentialInfo_t; +} +extern "C" { + pub fn rd_kafka_DescribeUserScramCredentials_result_descriptions( + result: *const rd_kafka_DescribeUserScramCredentials_result_t, + cntp: *mut usize, + ) -> *mut *const rd_kafka_UserScramCredentialsDescription_t; +} +extern "C" { + pub fn rd_kafka_DescribeUserScramCredentials( + rk: *mut rd_kafka_t, + users: *mut *const c_char, + user_cnt: usize, + options: *const rd_kafka_AdminOptions_t, + rkqu: *mut rd_kafka_queue_t, + ); +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct rd_kafka_UserScramCredentialAlteration_s { + _unused: [u8; 0], +} +pub type rd_kafka_UserScramCredentialAlteration_t = rd_kafka_UserScramCredentialAlteration_s; +extern "C" { + pub fn rd_kafka_UserScramCredentialUpsertion_new( + username: *const c_char, + mechanism: rd_kafka_ScramMechanism_t, + iterations: i32, + password: *const ::std::os::raw::c_uchar, + password_size: usize, + salt: *const ::std::os::raw::c_uchar, + salt_size: usize, + ) -> *mut rd_kafka_UserScramCredentialAlteration_t; +} +extern "C" { + pub fn rd_kafka_UserScramCredentialDeletion_new( + username: *const c_char, + mechanism: rd_kafka_ScramMechanism_t, + ) -> *mut rd_kafka_UserScramCredentialAlteration_t; +} +extern "C" { + pub fn rd_kafka_UserScramCredentialAlteration_destroy( + alteration: *mut rd_kafka_UserScramCredentialAlteration_t, + ); +} +extern "C" { + pub fn rd_kafka_UserScramCredentialAlteration_destroy_array( + alterations: *mut *mut rd_kafka_UserScramCredentialAlteration_t, + alteration_cnt: usize, + ); +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct rd_kafka_AlterUserScramCredentials_result_response_s { + _unused: [u8; 0], +} +pub type rd_kafka_AlterUserScramCredentials_result_response_t = + rd_kafka_AlterUserScramCredentials_result_response_s; +extern "C" { + pub fn rd_kafka_AlterUserScramCredentials_result_response_user( + response: *const rd_kafka_AlterUserScramCredentials_result_response_t, + ) -> *const c_char; +} +extern "C" { + pub fn rd_kafka_AlterUserScramCredentials_result_response_error( + response: *const rd_kafka_AlterUserScramCredentials_result_response_t, + ) -> *const rd_kafka_error_t; +} +extern "C" { + pub fn rd_kafka_AlterUserScramCredentials_result_responses( + result: *const rd_kafka_AlterUserScramCredentials_result_t, + cntp: *mut usize, + ) -> *mut *const rd_kafka_AlterUserScramCredentials_result_response_t; +} +extern "C" { + pub fn rd_kafka_AlterUserScramCredentials( + rk: *mut rd_kafka_t, + alterations: *mut *mut rd_kafka_UserScramCredentialAlteration_t, + alteration_cnt: usize, + options: *const rd_kafka_AdminOptions_t, + rkqu: *mut rd_kafka_queue_t, + ); +} #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct rd_kafka_AclBinding_s { @@ -2524,24 +3322,6 @@ extern "C" { aclres: *const rd_kafka_acl_result_t, ) -> *const rd_kafka_error_t; } -#[repr(u32)] -#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] -pub enum rd_kafka_AclOperation_t { - RD_KAFKA_ACL_OPERATION_UNKNOWN = 0, - RD_KAFKA_ACL_OPERATION_ANY = 1, - RD_KAFKA_ACL_OPERATION_ALL = 2, - RD_KAFKA_ACL_OPERATION_READ = 3, - RD_KAFKA_ACL_OPERATION_WRITE = 4, - RD_KAFKA_ACL_OPERATION_CREATE = 5, - RD_KAFKA_ACL_OPERATION_DELETE = 6, - RD_KAFKA_ACL_OPERATION_ALTER = 7, - RD_KAFKA_ACL_OPERATION_DESCRIBE = 8, - RD_KAFKA_ACL_OPERATION_CLUSTER_ACTION = 9, - RD_KAFKA_ACL_OPERATION_DESCRIBE_CONFIGS = 10, - RD_KAFKA_ACL_OPERATION_ALTER_CONFIGS = 11, - RD_KAFKA_ACL_OPERATION_IDEMPOTENT_WRITE = 12, - RD_KAFKA_ACL_OPERATION__CNT = 13, -} extern "C" { pub fn rd_kafka_AclOperation_name(acl_operation: rd_kafka_AclOperation_t) -> *const c_char; } diff --git a/rdkafka-sys/src/helpers.rs b/rdkafka-sys/src/helpers.rs index d8f739291..e56bff150 100644 --- a/rdkafka-sys/src/helpers.rs +++ b/rdkafka-sys/src/helpers.rs @@ -68,6 +68,7 @@ pub fn rd_kafka_resp_err_t_to_rdkafka_error(err: RDKafkaRespErr) -> RDKafkaError RD_KAFKA_RESP_ERR__ASSIGNMENT_LOST => AssignmentLost, RD_KAFKA_RESP_ERR__NOOP => Noop, RD_KAFKA_RESP_ERR__AUTO_OFFSET_RESET => AutoOffsetReset, + RD_KAFKA_RESP_ERR__LOG_TRUNCATION => LogTruncation, RD_KAFKA_RESP_ERR__END => End, RD_KAFKA_RESP_ERR_UNKNOWN => Unknown, RD_KAFKA_RESP_ERR_NO_ERROR => NoError, diff --git a/rdkafka-sys/src/types.rs b/rdkafka-sys/src/types.rs index 64e9cc5dd..6a16d10e2 100644 --- a/rdkafka-sys/src/types.rs +++ b/rdkafka-sys/src/types.rs @@ -440,6 +440,8 @@ pub enum RDKafkaErrorCode { FeatureUpdateFailed = 96, /// Request principal deserialization failed during forwarding. PrincipalDeserializationFailure = 97, + /// Partition log truncation detected + LogTruncation = -139, #[doc(hidden)] EndAll, } diff --git a/rdkafka-sys/update-bindings.sh b/rdkafka-sys/update-bindings.sh index 2bc710185..dfc36637e 100755 --- a/rdkafka-sys/update-bindings.sh +++ b/rdkafka-sys/update-bindings.sh @@ -9,12 +9,12 @@ bindgen \ --no-doc-comments \ --no-layout-tests \ --rustified-enum ".*" \ - --whitelist-function "rd_kafka.*" \ - --whitelist-type "rd_kafka.*" \ - --whitelist-var "rd_kafka.*|RD_KAFKA_.*" \ - --no-recursive-whitelist \ - --blacklist-function "rd_kafka_conf_set_open_cb" \ - --raw-line "use libc::{FILE, sockaddr, size_t, ssize_t, c_int, c_void, c_char};" \ + --allowlist-function "rd_kafka.*" \ + --allowlist-type "rd_kafka.*" \ + --allowlist-var "rd_kafka.*|RD_KAFKA_.*" \ + --no-recursive-allowlist \ + --blocklist-function "rd_kafka_conf_set_open_cb" \ + --raw-line "use libc::{FILE, addrinfo, sockaddr, c_int, c_void, c_char};" \ --raw-line "use num_enum::TryFromPrimitive;" \ librdkafka/src/rdkafka.h -o src/bindings.rs diff --git a/src/consumer/base_consumer.rs b/src/consumer/base_consumer.rs index af8e4b825..d145a1743 100644 --- a/src/consumer/base_consumer.rs +++ b/src/consumer/base_consumer.rs @@ -20,7 +20,6 @@ use crate::consumer::{ }; use crate::error::{IsError, KafkaError, KafkaResult}; use crate::groups::GroupList; -use crate::log::trace; use crate::message::{BorrowedMessage, Message}; use crate::metadata::Metadata; use crate::topic_partition_list::{Offset, TopicPartitionList};