Skip to content

Commit 9cb28f4

Browse files
Merge branch 'Blizzard:master' into master
2 parents d7eb409 + 8f046ea commit 9cb28f4

9 files changed

+24
-18
lines changed

CONTRIBUTING.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -204,7 +204,7 @@ Steps to update:
204204

205205
```bash
206206
cd deps/librdkafka
207-
git checkout 77a013b7a2611f7bdc091afa1e56b1a46d1c52f5 # for version 1.70
207+
git checkout 063a9ae7a65cebdf1cc128da9815c05f91a2a996 # for version 1.8.2
208208
```
209209

210210
1. Update [`config.d.ts`](https://github.com/Blizzard/node-rdkafka/blob/master/config.d.ts) and [`errors.d.ts`](https://github.com/Blizzard/node-rdkafka/blob/master/errors.d.ts) TypeScript definitions by running:

README.md

+5-5
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ I am looking for *your* help to make this project even better! If you're interes
1616

1717
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.
1818

19-
__This library currently uses `librdkafka` version `1.7.0`.__
19+
__This library currently uses `librdkafka` version `1.8.2`.__
2020

2121
## Reference Docs
2222

@@ -59,7 +59,7 @@ Using Alpine Linux? Check out the [docs](https://github.com/Blizzard/node-rdkafk
5959

6060
### Windows
6161

62-
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.1.7.0.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.
62+
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.1.8.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.
6363

6464
Requirements:
6565
* [node-gyp for Windows](https://github.com/nodejs/node-gyp#on-windows) (the easies way to get it: `npm install --global --production windows-build-tools`, if your node version is 6.x or below, pleasse use `npm install --global --production windows-build-tools@3.1.0`)
@@ -96,7 +96,7 @@ var Kafka = require('node-rdkafka');
9696

9797
## Configuration
9898

99-
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/v1.7.0/CONFIGURATION.md)
99+
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/v1.8.2/CONFIGURATION.md)
100100

101101
Configuration keys that have the suffix `_cb` are designated as callbacks. Some
102102
of these keys are informational and you can choose to opt-in (for example, `dr_cb`). Others are callbacks designed to
@@ -131,7 +131,7 @@ You can also get the version of `librdkafka`
131131
const Kafka = require('node-rdkafka');
132132
console.log(Kafka.librdkafkaVersion);
133133

134-
// #=> 1.7.0
134+
// #=> 1.8.2
135135
```
136136

137137
## Sending Messages
@@ -144,7 +144,7 @@ var producer = new Kafka.Producer({
144144
});
145145
```
146146

147-
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/v1.7.0/CONFIGURATION.md) file described previously.
147+
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/v1.8.2/CONFIGURATION.md) file described previously.
148148

149149
The following example illustrates a list with several `librdkafka` options set.
150150

ci/librdkafka-defs-generator.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -181,7 +181,7 @@ function updateErrorDefinitions(file) {
181181
const error_js_file = path.resolve(__dirname, '../lib/error.js');
182182
const error_js = fs.readFileSync(error_js_file)
183183
.toString()
184-
.replace(/(\/\/.*\n)?LibrdKafkaError.codes = {[^}]+/g, `${getHeader(file)}\nLibrdKafkaError.codes = {\n${body}`)
184+
.replace(/(\/\/.*\r?\n)?LibrdKafkaError.codes = {[^}]+/g, `${getHeader(file)}\nLibrdKafkaError.codes = {\n${body}`)
185185

186186
fs.writeFileSync(error_js_file, error_js);
187187
fs.writeFileSync(path.resolve(__dirname, '../errors.d.ts'), `${getHeader(file)}\nexport const CODES: { ERRORS: {${body.replace(/[ \.]*(\*\/\r?\n \w+: )(-?\d+),?/g, ' (**$2**) $1number,')}}}`)

config.d.ts

+6-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// ====== Generated from librdkafka 1.7.0 file CONFIGURATION.md ======
1+
// ====== Generated from librdkafka 1.8.2 file CONFIGURATION.md ======
22
// Code that generated this is a derivative work of the code from Nam Nguyen
33
// https://gist.github.com/ntgn81/066c2c8ec5b4238f85d1e9168a04e3fb
44

@@ -406,6 +406,11 @@ export interface GlobalConfig {
406406
*/
407407
"ssl.ca.location"?: string;
408408

409+
/**
410+
* CA certificate string (PEM format) for verifying the broker's key.
411+
*/
412+
"ssl.ca.pem"?: string;
413+
409414
/**
410415
* CA certificate as set by rd_kafka_conf_set_ssl_cert()
411416
*/

deps/librdkafka

deps/windows-install.py

+7-6
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
outputDir = 'librdkafka.redist'
1919
outputFile = outputDir + '.zip'
2020
dllPath = outputDir + '/runtimes/win{}-x64/native'.format(librdkafkaWinSufix)
21-
libPath = outputDir + '/build/native/lib/win{}/x64/win{}-x64-Release/v120'.format(librdkafkaWinSufix, librdkafkaWinSufix)
21+
libPath = outputDir + '/build/native/lib/win{}/x64/win{}-x64-Release/v140'.format(librdkafkaWinSufix, librdkafkaWinSufix)
2222
includePath = outputDir + '/build/native/include/librdkafka'
2323

2424
# download librdkafka from nuget
@@ -62,13 +62,14 @@ def createdir(dir):
6262
shutil.copy2(includePath + '/rdkafka.h', depsIncludeDir)
6363
shutil.copy2(includePath + '/rdkafkacpp.h', depsIncludeDir)
6464

65-
shutil.copy2(dllPath + '/zlib.dll', buildReleaseDir)
66-
shutil.copy2(dllPath + '/msvcr120.dll', buildReleaseDir)
65+
shutil.copy2(dllPath + '/libcrypto-1_1-x64.dll', buildReleaseDir)
6766
shutil.copy2(dllPath + '/librdkafka.dll', buildReleaseDir)
6867
shutil.copy2(dllPath + '/librdkafkacpp.dll', buildReleaseDir)
69-
if not librdkafkaVersion.startswith('0.'):
70-
shutil.copy2(dllPath + '/libzstd.dll', buildReleaseDir)
71-
shutil.copy2(dllPath + '/msvcp120.dll', buildReleaseDir)
68+
shutil.copy2(dllPath + '/libssl-1_1-x64.dll', buildReleaseDir)
69+
shutil.copy2(dllPath + '/msvcp140.dll', buildReleaseDir)
70+
shutil.copy2(dllPath + '/vcruntime140.dll', buildReleaseDir)
71+
shutil.copy2(dllPath + '/zlib1.dll', buildReleaseDir)
72+
shutil.copy2(dllPath + '/zstd.dll', buildReleaseDir)
7273

7374
# clean up
7475
os.remove(outputFile)

errors.d.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// ====== Generated from librdkafka 1.7.0 file src-cpp/rdkafkacpp.h ======
1+
// ====== Generated from librdkafka 1.8.2 file src-cpp/rdkafkacpp.h ======
22
export const CODES: { ERRORS: {
33
/* Internal errors to rdkafka: */
44
/** Begin internal error codes (**-200**) */

lib/error.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ LibrdKafkaError.wrap = errorWrap;
2727
* @enum {number}
2828
* @constant
2929
*/
30-
// ====== Generated from librdkafka 1.7.0 file src-cpp/rdkafkacpp.h ======
30+
// ====== Generated from librdkafka 1.8.2 file src-cpp/rdkafkacpp.h ======
3131
LibrdKafkaError.codes = {
3232

3333
/* Internal errors to rdkafka: */

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"name": "node-rdkafka",
33
"version": "v2.12.0",
44
"description": "Node.js bindings for librdkafka",
5-
"librdkafka": "1.7.0",
5+
"librdkafka": "1.8.2",
66
"main": "lib/index.js",
77
"scripts": {
88
"configure": "node-gyp configure",

0 commit comments

Comments
 (0)