diff --git a/Cargo.lock b/Cargo.lock index 75212b7c1..0b475f37b 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1070,7 +1070,7 @@ dependencies = [ [[package]] name = "rdkafka" -version = "0.30.0" +version = "0.31.0" dependencies = [ "async-std", "backoff", @@ -1099,7 +1099,7 @@ dependencies = [ [[package]] name = "rdkafka-sys" -version = "4.4.0+1.9.2" +version = "4.5.0+2.1.1" dependencies = [ "cmake", "curl-sys", diff --git a/Cargo.toml b/Cargo.toml index 36c2f0a77..6fffdc65b 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -15,7 +15,7 @@ exclude = ["Cargo.lock"] members = ["rdkafka-sys"] [dependencies] -rdkafka-sys = { path = "rdkafka-sys", version = "4.4.0", default-features = false } +rdkafka-sys = { path = "rdkafka-sys", version = "4.5.0", default-features = false } futures-channel = "0.3.0" futures-executor = { version = "0.3.0", optional = true } futures-util = { version = "0.3.0", default-features = false } diff --git a/rdkafka-sys/Cargo.toml b/rdkafka-sys/Cargo.toml index e86a91e00..233fe0dbb 100644 --- a/rdkafka-sys/Cargo.toml +++ b/rdkafka-sys/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "rdkafka-sys" -version = "4.4.0+1.9.2" +version = "4.5.0+2.1.1" authors = ["Federico Giraud "] build = "build.rs" links = "rdkafka" diff --git a/rdkafka-sys/changelog.md b/rdkafka-sys/changelog.md index 706e93dad..0a9b8c939 100644 --- a/rdkafka-sys/changelog.md +++ b/rdkafka-sys/changelog.md @@ -2,6 +2,10 @@ ## Unreleased +## v4.5.0+2.1.1 (2023-05-27) + +* Upgrade to librdkafka v2.1.1 + ## v4.4.0+1.9.2 (2023-05-12) * Add the `RDKafkaDeleteGroup` and `RDKafkaGroupResult` type aliases to the diff --git a/rdkafka-sys/librdkafka b/rdkafka-sys/librdkafka index 9b72ca3aa..c282ba242 160000 --- a/rdkafka-sys/librdkafka +++ b/rdkafka-sys/librdkafka @@ -1 +1 @@ -Subproject commit 9b72ca3aa6c49f8f57eea02f70aadb1453d3ba1f +Subproject commit c282ba2423b2694052393c8edb0399a5ef471b3f diff --git a/rdkafka-sys/src/bindings.rs b/rdkafka-sys/src/bindings.rs index 4d8cf1a91..179736ca2 100644 --- a/rdkafka-sys/src/bindings.rs +++ b/rdkafka-sys/src/bindings.rs @@ -1,9 +1,9 @@ -/* automatically generated by rust-bindgen 0.63.0 */ +/* automatically generated by rust-bindgen 0.65.1 */ -use libc::{c_char, c_int, c_void, sockaddr, FILE}; +use libc::{addrinfo, c_char, c_int, c_void, sockaddr, FILE}; use num_enum::TryFromPrimitive; -pub const RD_KAFKA_VERSION: i32 = 17367807; +pub const RD_KAFKA_VERSION: i32 = 33620479; 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_DESTROY_F_NO_CONSUMER_CLOSE: i32 = 8; pub const RD_KAFKA_OFFSET_BEGINNING: i32 = -2; @@ -39,6 +39,10 @@ pub const RD_KAFKA_EVENT_BACKGROUND: i32 = 512; pub const RD_KAFKA_EVENT_CREATEACLS_RESULT: i32 = 1024; pub const RD_KAFKA_EVENT_DESCRIBEACLS_RESULT: i32 = 2048; pub const RD_KAFKA_EVENT_DELETEACLS_RESULT: i32 = 4096; +pub const RD_KAFKA_EVENT_LISTCONSUMERGROUPS_RESULT: i32 = 8192; +pub const RD_KAFKA_EVENT_DESCRIBECONSUMERGROUPS_RESULT: i32 = 16384; +pub const RD_KAFKA_EVENT_LISTCONSUMERGROUPOFFSETS_RESULT: i32 = 32768; +pub const RD_KAFKA_EVENT_ALTERCONSUMERGROUPOFFSETS_RESULT: i32 = 65536; extern "C" { pub fn rd_kafka_version() -> c_int; } @@ -197,6 +201,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 +387,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 +635,9 @@ 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; +} #[repr(i32)] #[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] pub enum rd_kafka_conf_res_t { @@ -831,6 +850,20 @@ extern "C" { closesocket_cb: Option c_int>, ); } +extern "C" { + pub fn rd_kafka_conf_set_resolve_cb( + conf: *mut rd_kafka_conf_t, + resolve_cb: Option< + unsafe extern "C" fn( + node: *const c_char, + service: *const c_char, + hints: *const addrinfo, + res: *mut addrinfo, + opaque: *mut c_void, + ) -> c_int, + >, + ); +} extern "C" { pub fn rd_kafka_conf_set_ssl_cert_verify_cb( conf: *mut rd_kafka_conf_t, @@ -1175,6 +1208,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; } @@ -1312,6 +1352,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, @@ -1544,6 +1589,21 @@ 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; +} +#[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, @@ -1553,6 +1613,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 { @@ -1579,6 +1650,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); } @@ -1717,8 +1798,12 @@ 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_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; extern "C" { pub fn rd_kafka_event_CreateTopics_result( rkev: *mut rd_kafka_event_t, @@ -1749,6 +1834,16 @@ 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_DeleteGroups_result( rkev: *mut rd_kafka_event_t, @@ -1774,6 +1869,16 @@ extern "C" { rkev: *mut rd_kafka_event_t, ) -> *const rd_kafka_DeleteAcls_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_ListConsumerGroupOffsets_result( + rkev: *mut rd_kafka_event_t, + ) -> *const rd_kafka_ListConsumerGroupOffsets_result_t; +} extern "C" { pub fn rd_kafka_queue_poll( rkqu: *mut rd_kafka_queue_t, @@ -1897,6 +2002,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, @@ -2001,6 +2117,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, @@ -2042,7 +2166,11 @@ 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__CNT = 16, } #[repr(C)] #[derive(Debug, Copy, Clone)] @@ -2091,6 +2219,19 @@ 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_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_opaque( options: *mut rd_kafka_AdminOptions_t, @@ -2429,6 +2570,156 @@ extern "C" { } #[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_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], } @@ -2462,6 +2753,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], } diff --git a/rdkafka-sys/src/helpers.rs b/rdkafka-sys/src/helpers.rs index d8f739291..149d04cfe 100644 --- a/rdkafka-sys/src/helpers.rs +++ b/rdkafka-sys/src/helpers.rs @@ -173,5 +173,6 @@ pub fn rd_kafka_resp_err_t_to_rdkafka_error(err: RDKafkaRespErr) -> RDKafkaError RD_KAFKA_RESP_ERR_FEATURE_UPDATE_FAILED => FeatureUpdateFailed, RD_KAFKA_RESP_ERR_PRINCIPAL_DESERIALIZATION_FAILURE => PrincipalDeserializationFailure, RD_KAFKA_RESP_ERR_END_ALL => EndAll, + RD_KAFKA_RESP_ERR__LOG_TRUNCATION => LogTruncation } } diff --git a/rdkafka-sys/src/types.rs b/rdkafka-sys/src/types.rs index 184113d80..74215e3ed 100644 --- a/rdkafka-sys/src/types.rs +++ b/rdkafka-sys/src/types.rs @@ -239,6 +239,8 @@ pub enum RDKafkaErrorCode { Noop = -141, /// No offset to automatically reset to. AutoOffsetReset = -140, + /// Partition log truncation detected + LogTruncation = -139, #[doc(hidden)] End = -100, /// Unknown broker error.