From 76ec9347c5f09746ed5b41b16b2390a58fa1ad44 Mon Sep 17 00:00:00 2001 From: Gary Wilber <41303831+GaryWilber@users.noreply.github.com> Date: Thu, 4 May 2023 13:17:43 -0700 Subject: [PATCH] Update to librdkafka 2.1.1 (#1008) --- README.md | 10 +++++----- config.d.ts | 2 +- deps/librdkafka | 2 +- errors.d.ts | 4 +++- lib/error.js | 4 +++- package-lock.json | 4 ++-- package.json | 4 ++-- 7 files changed, 17 insertions(+), 13 deletions(-) diff --git a/README.md b/README.md index 5fc24418..2a0db086 100644 --- a/README.md +++ b/README.md @@ -17,7 +17,7 @@ I am looking for *your* help to make this project even better! If you're interes The `node-rdkafka` library is a high-performance NodeJS client for [Apache Kafka](http://kafka.apache.org/) that wraps the native [librdkafka](https://github.com/edenhill/librdkafka) library. All the complexity of balancing writes across partitions and managing (possibly ever-changing) brokers should be encapsulated in the library. -__This library currently uses `librdkafka` version `2.0.2`.__ +__This library currently uses `librdkafka` version `2.1.1`.__ ## Reference Docs @@ -60,7 +60,7 @@ Using Alpine Linux? Check out the [docs](https://github.com/Blizzard/node-rdkafk ### Windows -Windows build **is not** compiled from `librdkafka` source but it is rather linked against the appropriate version of [NuGet librdkafka.redist](https://www.nuget.org/packages/librdkafka.redist/) static binary that gets downloaded from `https://globalcdn.nuget.org/packages/librdkafka.redist.2.0.2.nupkg` during installation. This download link can be changed using the environment variable `NODE_RDKAFKA_NUGET_BASE_URL` that defaults to `https://globalcdn.nuget.org/packages/` when it's no set. +Windows build **is not** compiled from `librdkafka` source but it is rather linked against the appropriate version of [NuGet librdkafka.redist](https://www.nuget.org/packages/librdkafka.redist/) static binary that gets downloaded from `https://globalcdn.nuget.org/packages/librdkafka.redist.2.1.1.nupkg` during installation. This download link can be changed using the environment variable `NODE_RDKAFKA_NUGET_BASE_URL` that defaults to `https://globalcdn.nuget.org/packages/` when it's no set. Requirements: * [node-gyp for Windows](https://github.com/nodejs/node-gyp#on-windows) @@ -97,7 +97,7 @@ var Kafka = require('node-rdkafka'); ## Configuration -You can pass many configuration options to `librdkafka`. A full list can be found in `librdkafka`'s [Configuration.md](https://github.com/edenhill/librdkafka/blob/v2.0.2/CONFIGURATION.md) +You can pass many configuration options to `librdkafka`. A full list can be found in `librdkafka`'s [Configuration.md](https://github.com/edenhill/librdkafka/blob/v2.1.1/CONFIGURATION.md) Configuration keys that have the suffix `_cb` are designated as callbacks. Some of these keys are informational and you can choose to opt-in (for example, `dr_cb`). Others are callbacks designed to @@ -132,7 +132,7 @@ You can also get the version of `librdkafka` const Kafka = require('node-rdkafka'); console.log(Kafka.librdkafkaVersion); -// #=> 2.0.2 +// #=> 2.1.1 ``` ## Sending Messages @@ -145,7 +145,7 @@ var producer = new Kafka.Producer({ }); ``` -A `Producer` requires only `metadata.broker.list` (the Kafka brokers) to be created. The values in this list are separated by commas. For other configuration options, see the [Configuration.md](https://github.com/edenhill/librdkafka/blob/v2.0.2/CONFIGURATION.md) file described previously. +A `Producer` requires only `metadata.broker.list` (the Kafka brokers) to be created. The values in this list are separated by commas. For other configuration options, see the [Configuration.md](https://github.com/edenhill/librdkafka/blob/v2.1.1/CONFIGURATION.md) file described previously. The following example illustrates a list with several `librdkafka` options set. diff --git a/config.d.ts b/config.d.ts index 4b458e58..83fe1e4c 100644 --- a/config.d.ts +++ b/config.d.ts @@ -1,4 +1,4 @@ -// ====== Generated from librdkafka 2.0.2 file CONFIGURATION.md ====== +// ====== Generated from librdkafka 2.1.1 file CONFIGURATION.md ====== // Code that generated this is a derivative work of the code from Nam Nguyen // https://gist.github.com/ntgn81/066c2c8ec5b4238f85d1e9168a04e3fb diff --git a/deps/librdkafka b/deps/librdkafka index 292d2a66..c282ba24 160000 --- a/deps/librdkafka +++ b/deps/librdkafka @@ -1 +1 @@ -Subproject commit 292d2a66b9921b783f08147807992e603c7af059 +Subproject commit c282ba2423b2694052393c8edb0399a5ef471b3f diff --git a/errors.d.ts b/errors.d.ts index dd4ec300..c1ef7c26 100644 --- a/errors.d.ts +++ b/errors.d.ts @@ -1,4 +1,4 @@ -// ====== Generated from librdkafka 2.0.2 file src-cpp/rdkafkacpp.h ====== +// ====== Generated from librdkafka 2.1.1 file src-cpp/rdkafkacpp.h ====== export const CODES: { ERRORS: { /* Internal errors to rdkafka: */ /** Begin internal error codes (**-200**) */ @@ -126,6 +126,8 @@ export const CODES: { ERRORS: { ERR__NOOP: number, /** No offset to automatically reset to (**-140**) */ ERR__AUTO_OFFSET_RESET: number, + /** Partition log truncation detected (**-139**) */ + ERR__LOG_TRUNCATION: number, /** End internal error codes (**-100**) */ ERR__END: number, diff --git a/lib/error.js b/lib/error.js index 9066b907..a36ab666 100644 --- a/lib/error.js +++ b/lib/error.js @@ -27,7 +27,7 @@ LibrdKafkaError.wrap = errorWrap; * @enum {number} * @constant */ -// ====== Generated from librdkafka 2.0.2 file src-cpp/rdkafkacpp.h ====== +// ====== Generated from librdkafka 2.1.1 file src-cpp/rdkafkacpp.h ====== LibrdKafkaError.codes = { /* Internal errors to rdkafka: */ @@ -156,6 +156,8 @@ LibrdKafkaError.codes = { ERR__NOOP: -141, /** No offset to automatically reset to */ ERR__AUTO_OFFSET_RESET: -140, + /** Partition log truncation detected */ + ERR__LOG_TRUNCATION: -139, /** End internal error codes */ ERR__END: -100, diff --git a/package-lock.json b/package-lock.json index b8823dc6..782cd3b5 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "node-rdkafka", - "version": "v2.15.0", + "version": "v2.16.0", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "node-rdkafka", - "version": "v2.15.0", + "version": "v2.16.0", "hasInstallScript": true, "license": "MIT", "dependencies": { diff --git a/package.json b/package.json index 9043ca0c..b50c6a8e 100644 --- a/package.json +++ b/package.json @@ -1,8 +1,8 @@ { "name": "node-rdkafka", - "version": "v2.15.0", + "version": "v2.16.0", "description": "Node.js bindings for librdkafka", - "librdkafka": "2.0.2", + "librdkafka": "2.1.1", "main": "lib/index.js", "scripts": { "configure": "node-gyp configure",