Skip to content

Commit 3494f27

Browse files
committed
Update librdkafka to v2.5.3
1 parent 32142c5 commit 3494f27

File tree

7 files changed

+146
-38
lines changed

7 files changed

+146
-38
lines changed

Cargo.lock

+67-33
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

rdkafka-sys/Cargo.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "rdkafka-sys"
3-
version = "4.7.0+2.3.0"
3+
version = "4.8.0+2.5.3"
44
authors = ["Federico Giraud <giraud.federico@gmail.com>"]
55
build = "build.rs"
66
links = "rdkafka"

rdkafka-sys/changelog.md

+2
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22

33
## Unreleased
44

5+
* Upgrade to librdkafka v2.5.3.
6+
57
## v4.7.0+2.2.0 (2023-11-07)
68

79
* Upgrade to librdkafka v2.3.0.

rdkafka-sys/librdkafka

Submodule librdkafka updated 156 files

rdkafka-sys/src/bindings.rs

+47-3
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
1-
/* automatically generated by rust-bindgen 0.66.1 */
1+
/* automatically generated by rust-bindgen 0.69.4 */
22

33
use libc::{c_char, c_int, c_void, sockaddr, FILE};
44
use num_enum::TryFromPrimitive;
55

6-
pub const RD_KAFKA_VERSION: i32 = 33751295;
6+
pub const RD_KAFKA_VERSION: i32 = 33882367;
77
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" ;
88
pub const RD_KAFKA_DESTROY_F_NO_CONSUMER_CLOSE: i32 = 8;
99
pub const RD_KAFKA_OFFSET_BEGINNING: i32 = -2;
@@ -214,6 +214,7 @@ pub enum rd_kafka_resp_err_t {
214214
RD_KAFKA_RESP_ERR__NOOP = -141,
215215
RD_KAFKA_RESP_ERR__AUTO_OFFSET_RESET = -140,
216216
RD_KAFKA_RESP_ERR__LOG_TRUNCATION = -139,
217+
RD_KAFKA_RESP_ERR__INVALID_DIFFERENT_RECORD = -138,
217218
RD_KAFKA_RESP_ERR__END = -100,
218219
RD_KAFKA_RESP_ERR_UNKNOWN = -1,
219220
RD_KAFKA_RESP_ERR_NO_ERROR = 0,
@@ -314,7 +315,14 @@ pub enum rd_kafka_resp_err_t {
314315
RD_KAFKA_RESP_ERR_INVALID_UPDATE_VERSION = 95,
315316
RD_KAFKA_RESP_ERR_FEATURE_UPDATE_FAILED = 96,
316317
RD_KAFKA_RESP_ERR_PRINCIPAL_DESERIALIZATION_FAILURE = 97,
317-
RD_KAFKA_RESP_ERR_END_ALL = 98,
318+
RD_KAFKA_RESP_ERR_UNKNOWN_TOPIC_ID = 100,
319+
RD_KAFKA_RESP_ERR_FENCED_MEMBER_EPOCH = 110,
320+
RD_KAFKA_RESP_ERR_UNRELEASED_INSTANCE_ID = 111,
321+
RD_KAFKA_RESP_ERR_UNSUPPORTED_ASSIGNOR = 112,
322+
RD_KAFKA_RESP_ERR_STALE_MEMBER_EPOCH = 113,
323+
RD_KAFKA_RESP_ERR_UNKNOWN_SUBSCRIPTION_ID = 117,
324+
RD_KAFKA_RESP_ERR_TELEMETRY_TOO_LARGE = 118,
325+
RD_KAFKA_RESP_ERR_END_ALL = 119,
318326
}
319327
#[repr(C)]
320328
#[derive(Debug, Copy, Clone)]
@@ -604,6 +612,9 @@ extern "C" {
604612
extern "C" {
605613
pub fn rd_kafka_message_errstr(rkmessage: *const rd_kafka_message_t) -> *const c_char;
606614
}
615+
extern "C" {
616+
pub fn rd_kafka_message_produce_errstr(rkmessage: *const rd_kafka_message_t) -> *const c_char;
617+
}
607618
extern "C" {
608619
pub fn rd_kafka_message_timestamp(
609620
rkmessage: *const rd_kafka_message_t,
@@ -1500,6 +1511,11 @@ extern "C" {
15001511
group_instance_id: *const c_char,
15011512
) -> *mut rd_kafka_consumer_group_metadata_t;
15021513
}
1514+
extern "C" {
1515+
pub fn rd_kafka_consumer_group_metadata_member_id(
1516+
group_metadata: *const rd_kafka_consumer_group_metadata_t,
1517+
) -> *const c_char;
1518+
}
15031519
extern "C" {
15041520
pub fn rd_kafka_consumer_group_metadata_destroy(arg1: *mut rd_kafka_consumer_group_metadata_t);
15051521
}
@@ -3604,6 +3620,15 @@ extern "C" {
36043620
hi: i64,
36053621
) -> rd_kafka_resp_err_t;
36063622
}
3623+
extern "C" {
3624+
pub fn rd_kafka_mock_partition_push_leader_response(
3625+
mcluster: *mut rd_kafka_mock_cluster_t,
3626+
topic: *const c_char,
3627+
partition: c_int,
3628+
leader_id: i32,
3629+
leader_epoch: i32,
3630+
) -> rd_kafka_resp_err_t;
3631+
}
36073632
extern "C" {
36083633
pub fn rd_kafka_mock_broker_set_down(
36093634
mcluster: *mut rd_kafka_mock_cluster_t,
@@ -3661,6 +3686,12 @@ pub type rd_kafka_mock_request_t = rd_kafka_mock_request_s;
36613686
extern "C" {
36623687
pub fn rd_kafka_mock_request_destroy(mreq: *mut rd_kafka_mock_request_t);
36633688
}
3689+
extern "C" {
3690+
pub fn rd_kafka_mock_request_destroy_array(
3691+
mreqs: *mut *mut rd_kafka_mock_request_t,
3692+
mreq_cnt: usize,
3693+
);
3694+
}
36643695
extern "C" {
36653696
pub fn rd_kafka_mock_request_id(mreq: *mut rd_kafka_mock_request_t) -> i32;
36663697
}
@@ -3679,3 +3710,16 @@ extern "C" {
36793710
extern "C" {
36803711
pub fn rd_kafka_mock_clear_requests(mcluster: *mut rd_kafka_mock_cluster_t);
36813712
}
3713+
extern "C" {
3714+
pub fn rd_kafka_mock_telemetry_set_requested_metrics(
3715+
mcluster: *mut rd_kafka_mock_cluster_t,
3716+
metrics: *mut *mut c_char,
3717+
metrics_cnt: usize,
3718+
) -> rd_kafka_resp_err_t;
3719+
}
3720+
extern "C" {
3721+
pub fn rd_kafka_mock_telemetry_set_push_interval(
3722+
mcluster: *mut rd_kafka_mock_cluster_t,
3723+
push_interval_ms: i64,
3724+
) -> rd_kafka_resp_err_t;
3725+
}

rdkafka-sys/src/helpers.rs

+8
Original file line numberDiff line numberDiff line change
@@ -174,5 +174,13 @@ pub fn rd_kafka_resp_err_t_to_rdkafka_error(err: RDKafkaRespErr) -> RDKafkaError
174174
RD_KAFKA_RESP_ERR_PRINCIPAL_DESERIALIZATION_FAILURE => PrincipalDeserializationFailure,
175175
RD_KAFKA_RESP_ERR_END_ALL => EndAll,
176176
RD_KAFKA_RESP_ERR__LOG_TRUNCATION => LogTruncation,
177+
RD_KAFKA_RESP_ERR__INVALID_DIFFERENT_RECORD => InvalidDifferentRecord,
178+
RD_KAFKA_RESP_ERR_UNKNOWN_TOPIC_ID => UnknownTopicId,
179+
RD_KAFKA_RESP_ERR_FENCED_MEMBER_EPOCH => FencedMemberEpoch,
180+
RD_KAFKA_RESP_ERR_UNRELEASED_INSTANCE_ID => UnreleasedInstanceId,
181+
RD_KAFKA_RESP_ERR_UNSUPPORTED_ASSIGNOR => UnsupportedAssignor,
182+
RD_KAFKA_RESP_ERR_STALE_MEMBER_EPOCH => StaleMemberEpoch,
183+
RD_KAFKA_RESP_ERR_UNKNOWN_SUBSCRIPTION_ID => UnknownSubscriptionId,
184+
RD_KAFKA_RESP_ERR_TELEMETRY_TOO_LARGE => TelemetryTooLarge,
177185
}
178186
}

rdkafka-sys/src/types.rs

+20
Original file line numberDiff line numberDiff line change
@@ -246,6 +246,9 @@ pub enum RDKafkaErrorCode {
246246
AutoOffsetReset = -140,
247247
/// Partition log truncation detected
248248
LogTruncation = -139,
249+
/// A different record in the batch was invalid and this message failed
250+
/// persisting.
251+
InvalidDifferentRecord = -138,
249252
#[doc(hidden)]
250253
End = -100,
251254
/// Unknown broker error.
@@ -453,6 +456,23 @@ pub enum RDKafkaErrorCode {
453456
FeatureUpdateFailed = 96,
454457
/// Request principal deserialization failed during forwarding.
455458
PrincipalDeserializationFailure = 97,
459+
/// Unknown topic ID.
460+
UnknownTopicId = 100,
461+
/// The member epoch is fenced by the group coordinator.
462+
FencedMemberEpoch = 110,
463+
/// The instance ID is still used by another member in the consumer group.
464+
UnreleasedInstanceId = 111,
465+
/// The assignor or its version range is not supported by the consumer
466+
/// group.
467+
UnsupportedAssignor = 112,
468+
/// The member epoch is stale.
469+
StaleMemberEpoch = 113,
470+
/// Client sent a push telemetry request with an invalid or outdated
471+
/// subscription ID.
472+
UnknownSubscriptionId = 117,
473+
/// Client sent a push telemetry request larger than the maximum size
474+
/// the broker will accept.
475+
TelemetryTooLarge = 118,
456476
#[doc(hidden)]
457477
EndAll,
458478
}

0 commit comments

Comments
 (0)