From 395f6fb5bd9363ec712a36ecd0e5403d1145c0da Mon Sep 17 00:00:00 2001 From: Emanuele Sabellico Date: Tue, 7 Nov 2023 11:24:29 +0100 Subject: [PATCH] Change repo maintainer and package name --- .github/ISSUE_TEMPLATE/bug_report.md | 6 ++-- .github/workflows/npm-publish.yml | 2 +- CONTRIBUTING.md | 14 ++++---- LICENSE.txt | 2 +- README.md | 42 ++++++++++------------- bench/consumer-raw-rdkafka.js | 6 ++-- bench/consumer-subscribe.js | 6 ++-- bench/kafka-consumer-stream.js | 6 ++-- bench/producer-raw-rdkafka.js | 6 ++-- bench/producer-rdkafka.js | 6 ++-- ci/librdkafka-defs-generator.js | 2 +- ci/update-version.js | 2 +- e2e/admin.spec.js | 4 +-- e2e/both.spec.js | 10 +++--- e2e/consumer.spec.js | 4 +-- e2e/groups.spec.js | 4 +-- e2e/listener.js | 4 +-- e2e/producer-transaction.spec.js | 6 ++-- e2e/producer.spec.js | 10 +++--- examples/consumer-flow.md | 6 ++-- examples/consumer.md | 4 +-- examples/docker-alpine.md | 6 ++-- examples/metadata.md | 4 +-- examples/producer-cluster.md | 4 +-- examples/producer.md | 4 +-- lib/admin.js | 6 ++-- lib/client.js | 4 +-- lib/error.js | 4 +-- lib/kafka-consumer-stream.js | 4 +-- lib/kafka-consumer.js | 6 ++-- lib/producer-stream.js | 6 ++-- lib/producer.js | 4 +-- lib/producer/high-level-producer.js | 4 +-- lib/rdkafka.js | 4 +-- lib/tools/ref-counter.js | 4 +-- lib/topic-partition.js | 4 +-- lib/topic.js | 4 +-- lib/util.js | 4 +-- librdkafka.js | 4 +-- make_docs.sh | 4 +-- package-lock.json | 4 +-- package.json | 6 ++-- src/admin.cc | 4 +-- src/admin.h | 4 +-- src/binding.cc | 4 +-- src/binding.h | 4 +-- src/callbacks.cc | 4 +-- src/callbacks.h | 6 ++-- src/common.cc | 6 ++-- src/common.h | 4 +-- src/config.cc | 4 +-- src/config.h | 4 +-- src/connection.cc | 4 +-- src/connection.h | 4 +-- src/errors.cc | 4 +-- src/errors.h | 4 +-- src/kafka-consumer.cc | 6 ++-- src/kafka-consumer.h | 6 ++-- src/producer.cc | 4 +-- src/producer.h | 4 +-- src/topic.cc | 4 +-- src/topic.h | 4 +-- src/workers.cc | 12 +++---- src/workers.h | 4 +-- test/binding.spec.js | 4 +-- test/consumer.spec.js | 4 +-- test/error.spec.js | 4 +-- test/index.spec.js | 4 +-- test/kafka-consumer-stream.spec.js | 4 +-- test/kafka-consumer.spec.js | 4 +-- test/mock.js | 4 +-- test/producer-stream.spec.js | 6 ++-- test/producer.spec.js | 4 +-- test/producer/high-level-producer.spec.js | 4 +-- test/topic-partition.spec.js | 4 +-- test/util.spec.js | 4 +-- 76 files changed, 198 insertions(+), 202 deletions(-) diff --git a/.github/ISSUE_TEMPLATE/bug_report.md b/.github/ISSUE_TEMPLATE/bug_report.md index 49a72670..cb301559 100644 --- a/.github/ISSUE_TEMPLATE/bug_report.md +++ b/.github/ISSUE_TEMPLATE/bug_report.md @@ -5,15 +5,15 @@ about: Create a report to help us improve --- **Environment Information** - - OS [e.g. Mac, Arch, Windows 10]: + - OS [e.g. Mac, Arch, Windows 10]: - Node Version [e.g. 8.2.1]: - NPM Version [e.g. 5.4.2]: - C++ Toolchain [e.g. Visual Studio, llvm, g++]: - - node-rdkafka version [e.g. 2.3.3]: + - confluent-kafka-js version [e.g. 2.3.3]: **Steps to Reproduce** -**node-rdkafka Configuration Settings** +**confluent-kafka-js Configuration Settings** **Additional context** diff --git a/.github/workflows/npm-publish.yml b/.github/workflows/npm-publish.yml index 206ae618..c547ffba 100644 --- a/.github/workflows/npm-publish.yml +++ b/.github/workflows/npm-publish.yml @@ -1,7 +1,7 @@ # This workflow will run tests using node and then publish a package to GitHub Packages when a release is created # For more information see: https://help.github.com/actions/language-and-framework-guides/publishing-nodejs-packages -name: Publish node-rdkafka +name: Publish confluent-kafka-js on: release: diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index db025fe0..e2cabe1f 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -1,9 +1,9 @@ -# Contributing to `node-rdkafka` +# Contributing to `confluent-kafka-js` :+1::tada: First off, thanks for taking the time to contribute! :tada::+1: -The following is a set of guidelines for contributing to `node-rdkafka` -which is hosted in the [Blizzard Organization](https://github.com/blizzard) +The following is a set of guidelines for contributing to `confluent-kafka-js` +which is hosted by [Confluent Inc.](https://github.com/confluentinc) on GitHub. This document lists rules, guidelines, and help getting started, so if you feel something is missing feel free to send a pull request. @@ -144,7 +144,7 @@ In short: ## Editor -I began using Visual Studio code to develop on `node-rdkafka`. If you use it you can configure the C++ plugin to resolve the paths needed to inform your intellisense. This is the config file I am using on a mac to resolve the required paths: +Using Visual Studio code to develop on `confluent-kafka-js`. If you use it you can configure the C++ plugin to resolve the paths needed to inform your intellisense. This is the config file I am using on a mac to resolve the required paths: `c_cpp_properties.json` ``` @@ -198,7 +198,7 @@ You can add breakpoints and so on after that. The librdkafka should be periodically updated to the latest release in https://github.com/edenhill/librdkafka/releases Steps to update: -1. Update the `librdkafka` property in [`package.json`](https://github.com/Blizzard/node-rdkafka/blob/master/package.json) to the desired version. +1. Update the `librdkafka` property in [`package.json`](https://github.com/confluentinc/confluent-kafka-js/blob/master/package.json) to the desired version. 1. Update the librdkafka git submodule to that versions release commit (example below) @@ -209,7 +209,7 @@ Steps to update: If you get an error during that checkout command, double check that the submodule was initialized / cloned! You may need to run `git submodule update --init --recursive` -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: +1. Update [`config.d.ts`](https://github.com/confluentinc/confluent-kafka-js/blob/master/config.d.ts) and [`errors.d.ts`](https://github.com/confluentinc/confluent-kafka-js/blob/master/errors.d.ts) TypeScript definitions by running: ```bash node ci/librdkafka-defs-generator.js ``` @@ -219,7 +219,7 @@ Steps to update: 1. Run unit tests: `npm run test` -1. Update the version numbers referenced in the [`README.md`](https://github.com/Blizzard/node-rdkafka/blob/master/README.md) file to the new version. +1. Update the version numbers referenced in the [`README.md`](https://github.com/confluentinc/confluent-kafka-js/blob/master/README.md) file to the new version. ## Publishing new npm version diff --git a/LICENSE.txt b/LICENSE.txt index be3db86c..d5ad6d41 100644 --- a/LICENSE.txt +++ b/LICENSE.txt @@ -1,5 +1,5 @@ The MIT License (MIT) -Copyright (c) 2016 Blizzard Entertainment +Copyright (c) 2016-2023 Blizzard Entertainment Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in diff --git a/README.md b/README.md index 8408e943..cdba3ce0 100644 --- a/README.md +++ b/README.md @@ -1,31 +1,27 @@ -node-rdkafka - Node.js wrapper for Kafka C/C++ library +confluent-kafka-js - Node.js wrapper for Kafka C/C++ library ============================================== -Copyright (c) 2016 Blizzard Entertainment. +Copyright (c) 2016-2023 Blizzard Entertainment. -[https://github.com/blizzard/node-rdkafka](https://github.com/blizzard/node-rdkafka) - -[![Build Status](https://github.com/Blizzard/node-rdkafka/actions/workflows/test.yml/badge.svg)](https://github.com/Blizzard/node-rdkafka/actions/workflows/test.yml) - -[![npm version](https://badge.fury.io/js/node-rdkafka.svg)](https://badge.fury.io/js/node-rdkafka) +[https://github.com/confluentinc/confluent-kafka-js](https://github.com/confluentinc/confluent-kafka-js) # Looking for Collaborators! -I am looking for *your* help to make this project even better! If you're interested, check [this out](https://github.com/Blizzard/node-rdkafka/issues/628) +I am looking for *your* help to make this project even better! If you're interested, check [this out](https://github.com/confluentinc/confluent-kafka-js/issues/628) # Overview -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. +The `confluent-kafka-js` 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.3.0`.__ ## Reference Docs -To view the reference docs for the current version, go [here](https://blizzard.github.io/node-rdkafka/current/) +To view the reference docs for the current version, go [here](https://confluentinc.github.io/confluent-kafka-js/current/) ## Contributing -For guidelines on contributing please see [CONTRIBUTING.md](https://github.com/blizzard/node-rdkafka/blob/master/CONTRIBUTING.md) +For guidelines on contributing please see [CONTRIBUTING.md](https://github.com/confluentinc/confluent-kafka-js/blob/master/CONTRIBUTING.md) ## Code of Conduct @@ -41,7 +37,7 @@ Play nice; Play fair. ### Mac OS High Sierra / Mojave -OpenSSL has been upgraded in High Sierra and homebrew does not overwrite default system libraries. That means when building node-rdkafka, because you are using openssl, you need to tell the linker where to find it: +OpenSSL has been upgraded in High Sierra and homebrew does not overwrite default system libraries. That means when building confluent-kafka-js, because you are using openssl, you need to tell the linker where to find it: ```sh export CPPFLAGS=-I/usr/local/opt/openssl/include @@ -56,7 +52,7 @@ __NOTE:__ From the `librdkafka` docs ### Alpine -Using Alpine Linux? Check out the [docs](https://github.com/Blizzard/node-rdkafka/blob/master/examples/docker-alpine.md). +Using Alpine Linux? Check out the [docs](https://github.com/confluentinc/confluent-kafka-js/blob/master/examples/docker-alpine.md). ### Windows @@ -65,7 +61,7 @@ Windows build **is not** compiled from `librdkafka` source but it is rather link Requirements: * [node-gyp for Windows](https://github.com/nodejs/node-gyp#on-windows) -**Note:** I _still_ do not recommend using `node-rdkafka` in production on Windows. This feature was in high demand and is provided to help develop, but we do not test against Windows, and windows support may lag behind Linux/Mac support because those platforms are the ones used to develop this library. Contributors are welcome if any Windows issues are found :) +**Note:** I _still_ do not recommend using `confluent-kafka-js` in production on Windows. This feature was in high demand and is provided to help develop, but we do not test against Windows, and windows support may lag behind Linux/Mac support because those platforms are the ones used to develop this library. Contributors are welcome if any Windows issues are found :) ## Tests @@ -83,16 +79,16 @@ You can run both types of tests by using `Makefile`. Doing so calls `mocha` in y # Usage -You can install the `node-rdkafka` module like any other module: +You can install the `confluent-kafka-js` module like any other module: ``` -npm install node-rdkafka +npm install confluent-kafka-js ``` To use the module, you must `require` it. ```js -const Kafka = require('node-rdkafka'); +const Kafka = require('confluent-kafka-js'); ``` ## Configuration @@ -117,10 +113,10 @@ The library currently supports the following callbacks: This library includes two utility functions for detecting the status of your installation. Please try to include these when making issue reports where applicable. -You can get the features supported by your compile of `librdkafka` by reading the variable "features" on the root of the `node-rdkafka` object. +You can get the features supported by your compile of `librdkafka` by reading the variable "features" on the root of the `confluent-kafka-js` object. ```js -const Kafka = require('node-rdkafka'); +const Kafka = require('confluent-kafka-js'); console.log(Kafka.features); // #=> [ 'gzip', 'snappy', 'ssl', 'sasl', 'regex', 'lz4' ] @@ -129,7 +125,7 @@ console.log(Kafka.features); You can also get the version of `librdkafka` ```js -const Kafka = require('node-rdkafka'); +const Kafka = require('confluent-kafka-js'); console.log(Kafka.librdkafkaVersion); // #=> 2.3.0 @@ -382,7 +378,7 @@ const consumer = new Kafka.KafkaConsumer({ ### Commits -When you commit in `node-rdkafka`, the standard way is to queue the commit request up with the next `librdkafka` request to the broker. When doing this, there isn't a way to know the result of the commit. Luckily there is another callback you can listen to to get this information +When you commit in `confluent-kafka-js`, the standard way is to queue the commit request up with the next `librdkafka` request to the broker. When doing this, there isn't a way to know the result of the commit. Luckily there is another callback you can listen to to get this information ```js const consumer = new Kafka.KafkaConsumer({ @@ -596,12 +592,12 @@ producer.getMetadata(opts, (err, metadata) => { ## Admin Client -`node-rdkafka` now supports the admin client for creating, deleting, and scaling out topics. The `librdkafka` APIs also support altering configuration of topics and broker, but that is not currently implemented. +`confluent-kafka-js` now supports the admin client for creating, deleting, and scaling out topics. The `librdkafka` APIs also support altering configuration of topics and broker, but that is not currently implemented. To create an Admin client, you can do as follows: ```js -const Kafka = require('node-rdkafka'); +const Kafka = require('confluent-kafka-js'); const client = Kafka.AdminClient.create({ 'client.id': 'kafka-admin', diff --git a/bench/consumer-raw-rdkafka.js b/bench/consumer-raw-rdkafka.js index 82b9343b..5b27c1d2 100644 --- a/bench/consumer-raw-rdkafka.js +++ b/bench/consumer-raw-rdkafka.js @@ -1,7 +1,7 @@ /* - * node-rdkafka - Node.js wrapper for RdKafka C/C++ library + * confluent-kafka-js - Node.js wrapper for RdKafka C/C++ library * - * Copyright (c) 2016 Blizzard Entertainment + * Copyright (c) 2016-2023 Blizzard Entertainment * * This software may be modified and distributed under the terms * of the MIT license. See the LICENSE.txt file for details. @@ -16,7 +16,7 @@ var topic = process.argv[3] || 'test'; var consumer = new Kafka.KafkaConsumer({ 'metadata.broker.list': host, - 'group.id': 'node-rdkafka-bench-s', + 'group.id': 'confluent-kafka-js-bench-s', 'fetch.wait.max.ms': 100, 'fetch.message.max.bytes': 1024 * 1024, 'enable.auto.commit': false diff --git a/bench/consumer-subscribe.js b/bench/consumer-subscribe.js index c124cd64..6dbd7fc4 100644 --- a/bench/consumer-subscribe.js +++ b/bench/consumer-subscribe.js @@ -1,7 +1,7 @@ /* - * node-rdkafka - Node.js wrapper for RdKafka C/C++ library + * confluent-kafka-js - Node.js wrapper for RdKafka C/C++ library * - * Copyright (c) 2016 Blizzard Entertainment + * Copyright (c) 2016-2023 Blizzard Entertainment * * This software may be modified and distributed under the terms * of the MIT license. See the LICENSE.txt file for details. @@ -16,7 +16,7 @@ var topic = process.argv[3] || 'test'; var consumer = new Kafka.KafkaConsumer({ 'metadata.broker.list': host, - 'group.id': 'node-rdkafka-bench', + 'group.id': 'confluent-kafka-js-bench', 'fetch.wait.max.ms': 100, 'fetch.message.max.bytes': 1024 * 1024, 'enable.auto.commit': false diff --git a/bench/kafka-consumer-stream.js b/bench/kafka-consumer-stream.js index 6e240ffc..ff8888f9 100644 --- a/bench/kafka-consumer-stream.js +++ b/bench/kafka-consumer-stream.js @@ -1,7 +1,7 @@ /* - * node-rdkafka - Node.js wrapper for RdKafka C/C++ library + * confluent-kafka-js - Node.js wrapper for RdKafka C/C++ library * - * Copyright (c) 2016 Blizzard Entertainment + * Copyright (c) 2016-2023 Blizzard Entertainment * * This software may be modified and distributed under the terms * of the MIT license. See the LICENSE.txt file for details. @@ -18,7 +18,7 @@ var topic = process.argv[3] || 'test'; var stream = Kafka.createReadStream({ 'metadata.broker.list': host, - 'group.id': 'node-rdkafka-benchs', + 'group.id': 'confluent-kafka-js-benchs', 'fetch.wait.max.ms': 100, 'fetch.message.max.bytes': 1024 * 1024, 'enable.auto.commit': false diff --git a/bench/producer-raw-rdkafka.js b/bench/producer-raw-rdkafka.js index d8fabccf..e5d7cf56 100644 --- a/bench/producer-raw-rdkafka.js +++ b/bench/producer-raw-rdkafka.js @@ -1,7 +1,7 @@ /* - * node-rdkafka - Node.js wrapper for RdKafka C/C++ library + * confluent-kafka-js - Node.js wrapper for RdKafka C/C++ library * - * Copyright (c) 2016 Blizzard Entertainment + * Copyright (c) 2016-2023 Blizzard Entertainment * * This software may be modified and distributed under the terms * of the MIT license. See the LICENSE.txt file for details. @@ -24,7 +24,7 @@ var MAX = process.argv[5] || 10000000; var producer = new Kafka.Producer({ 'metadata.broker.list': host, - 'group.id': 'node-rdkafka-bench', + 'group.id': 'confluent-kafka-js-bench', 'compression.codec': compression, 'retry.backoff.ms': 200, 'message.send.max.retries': 10, diff --git a/bench/producer-rdkafka.js b/bench/producer-rdkafka.js index 3f1aba55..d2fa37b2 100644 --- a/bench/producer-rdkafka.js +++ b/bench/producer-rdkafka.js @@ -1,7 +1,7 @@ /* - * node-rdkafka - Node.js wrapper for RdKafka C/C++ library + * confluent-kafka-js - Node.js wrapper for RdKafka C/C++ library * - * Copyright (c) 2016 Blizzard Entertainment + * Copyright (c) 2016-2023 Blizzard Entertainment * * This software may be modified and distributed under the terms * of the MIT license. See the LICENSE.txt file for details. @@ -20,7 +20,7 @@ var MAX = process.argv[5] || 1000000; var stream = Kafka.Producer.createWriteStream({ 'metadata.broker.list': host, - 'group.id': 'node-rdkafka-bench', + 'group.id': 'confluent-kafka-js-bench', 'compression.codec': compression, 'retry.backoff.ms': 200, 'message.send.max.retries': 10, diff --git a/ci/librdkafka-defs-generator.js b/ci/librdkafka-defs-generator.js index eefe92a2..be4113a1 100644 --- a/ci/librdkafka-defs-generator.js +++ b/ci/librdkafka-defs-generator.js @@ -52,7 +52,7 @@ function extractConfigItems(configStr) { } function processItem(configItem) { - // These items are overwritten by node-rdkafka + // These items are overwritten by confluent-kafka-js switch (configItem.property) { case 'dr_msg_cb': return { ...configItem, type: 'boolean' }; diff --git a/ci/update-version.js b/ci/update-version.js index b40b91e3..4265ea9b 100644 --- a/ci/update-version.js +++ b/ci/update-version.js @@ -89,7 +89,7 @@ function getPackageVersion(tag, branch) { console.log(`Package version is "${baseVersion}"`); // never publish with an suffix - // fixes https://github.com/Blizzard/node-rdkafka/issues/981 + // fixes https://github.com/confluentinc/confluent-kafka-js/issues/981 // baseVersion += '-'; // if (tag.commit === 0 && branch === 'master') { diff --git a/e2e/admin.spec.js b/e2e/admin.spec.js index 4521f7da..75cbceb8 100644 --- a/e2e/admin.spec.js +++ b/e2e/admin.spec.js @@ -1,7 +1,7 @@ /* - * node-rdkafka - Node.js wrapper for RdKafka C/C++ library + * confluent-kafka-js - Node.js wrapper for RdKafka C/C++ library * - * Copyright (c) 2016 Blizzard Entertainment + * Copyright (c) 2016-2023 Blizzard Entertainment * * This software may be modified and distributed under the terms * of the MIT license. See the LICENSE.txt file for details. diff --git a/e2e/both.spec.js b/e2e/both.spec.js index a8289ec3..47947812 100644 --- a/e2e/both.spec.js +++ b/e2e/both.spec.js @@ -1,7 +1,7 @@ /* - * node-rdkafka - Node.js wrapper for RdKafka C/C++ library + * confluent-kafka-js - Node.js wrapper for RdKafka C/C++ library * - * Copyright (c) 2016 Blizzard Entertainment + * Copyright (c) 2016-2023 Blizzard Entertainment * * This software may be modified and distributed under the terms * of the MIT license. See the LICENSE.txt file for details. @@ -163,7 +163,7 @@ describe('Consumer/Producer', function() { }); }); - + it('should return ready messages on partition EOF', function(done) { crypto.randomBytes(4096, function(ex, buffer) { producer.setPollInterval(10); @@ -221,7 +221,7 @@ describe('Consumer/Producer', function() { consumer.once('data', function(msg) { events.push("data"); }); - + consumer.once('partition.eof', function(eof) { events.push("partition.eof"); }); @@ -409,7 +409,7 @@ describe('Consumer/Producer', function() { ]; run_headers_test(done, headers); }); - + it('should be able to produce and consume messages with multiple headers value as string: consumeLoop', function(done) { var headers = [ { key1: 'value1' }, diff --git a/e2e/consumer.spec.js b/e2e/consumer.spec.js index a167483f..257055d4 100644 --- a/e2e/consumer.spec.js +++ b/e2e/consumer.spec.js @@ -1,6 +1,6 @@ /* - * node-rdkafka - Node.js wrapper for RdKafka C/C++ library - * Copyright (c) 2016 Blizzard Entertainment + * confluent-kafka-js - Node.js wrapper for RdKafka C/C++ library + * Copyright (c) 2016-2023 Blizzard Entertainment * * This software may be modified and distributed under the terms * of the MIT license. See the LICENSE.txt file for details. diff --git a/e2e/groups.spec.js b/e2e/groups.spec.js index dc099878..bc22f13e 100644 --- a/e2e/groups.spec.js +++ b/e2e/groups.spec.js @@ -1,7 +1,7 @@ /* - * node-rdkafka - Node.js wrapper for RdKafka C/C++ library + * confluent-kafka-js - Node.js wrapper for RdKafka C/C++ library * - * Copyright (c) 2016 Blizzard Entertainment + * Copyright (c) 2016-2023 Blizzard Entertainment * * This software may be modified and distributed under the terms * of the MIT license. See the LICENSE.txt file for details. diff --git a/e2e/listener.js b/e2e/listener.js index 581baabc..81c9637f 100644 --- a/e2e/listener.js +++ b/e2e/listener.js @@ -1,6 +1,6 @@ /* - * node-rdkafka - Node.js wrapper for RdKafka C/C++ library - * Copyright (c) 2016 Blizzard Entertainment + * confluent-kafka-js - Node.js wrapper for RdKafka C/C++ library + * Copyright (c) 2016-2023 Blizzard Entertainment * * This software may be modified and distributed under the terms * of the MIT license. See the LICENSE.txt file for details. diff --git a/e2e/producer-transaction.spec.js b/e2e/producer-transaction.spec.js index c633bc75..452c5e45 100644 --- a/e2e/producer-transaction.spec.js +++ b/e2e/producer-transaction.spec.js @@ -1,7 +1,7 @@ /* - * node-rdkafka - Node.js wrapper for RdKafka C/C++ library + * confluent-kafka-js - Node.js wrapper for RdKafka C/C++ library * - * Copyright (c) 2016 Blizzard Entertainment + * Copyright (c) 2016-2023 Blizzard Entertainment * * This software may be modified and distributed under the terms * of the MIT license. See the LICENSE.txt file for details. @@ -22,7 +22,7 @@ describe('Transactional Producer', function () { before(function (done) { /* - prepare: + prepare: transactional consumer (read from input topic) transactional producer (write to output topic) write 3 messages to input topic: A, B, C diff --git a/e2e/producer.spec.js b/e2e/producer.spec.js index 11448d98..0ed1ff24 100644 --- a/e2e/producer.spec.js +++ b/e2e/producer.spec.js @@ -1,7 +1,7 @@ /* - * node-rdkafka - Node.js wrapper for RdKafka C/C++ library + * confluent-kafka-js - Node.js wrapper for RdKafka C/C++ library * - * Copyright (c) 2016 Blizzard Entertainment + * Copyright (c) 2016-2023 Blizzard Entertainment * * This software may be modified and distributed under the terms * of the MIT license. See the LICENSE.txt file for details. @@ -211,7 +211,7 @@ describe('Producer', function() { producer.produce('test', null, Buffer.from('hai'), 'key'); }); - it('should produce a message with an empty payload and empty key (https://github.com/Blizzard/node-rdkafka/issues/117)', function(done) { + it('should produce a message with an empty payload and empty key (https://github.com/confluentinc/confluent-kafka-js/issues/117)', function(done) { var tt = setInterval(function() { producer.poll(); }, 200); @@ -232,7 +232,7 @@ describe('Producer', function() { producer.produce('test', null, Buffer.from(''), ''); }); - it('should produce a message with a null payload and null key (https://github.com/Blizzard/node-rdkafka/issues/117)', function(done) { + it('should produce a message with a null payload and null key (https://github.com/confluentinc/confluent-kafka-js/issues/117)', function(done) { producer.setPollInterval(10); producer.once('delivery-report', function(err, report) { @@ -250,7 +250,7 @@ describe('Producer', function() { producer.produce('test', null, null, null); }); - it('should produce an int64 key (https://github.com/Blizzard/node-rdkafka/issues/208)', function(done) { + it('should produce an int64 key (https://github.com/confluentinc/confluent-kafka-js/issues/208)', function(done) { var v1 = 0x0000000000000084; var arr = new Uint8Array(8); diff --git a/examples/consumer-flow.md b/examples/consumer-flow.md index 98ab74b4..62e5e31f 100644 --- a/examples/consumer-flow.md +++ b/examples/consumer-flow.md @@ -3,9 +3,9 @@ the Flowing implementation ```js /* - * node-rdkafka - Node.js wrapper for RdKafka C/C++ library + * confluent-kafka-js - Node.js wrapper for RdKafka C/C++ library * - * Copyright (c) 2016 Blizzard Entertainment + * Copyright (c) 2016-2023 Blizzard Entertainment * * This software may be modified and distributed under the terms * of the MIT license. See the LICENSE.txt file for details. @@ -16,7 +16,7 @@ var Kafka = require('../'); var consumer = new Kafka.KafkaConsumer({ //'debug': 'all', 'metadata.broker.list': 'localhost:9092', - 'group.id': 'node-rdkafka-consumer-flow-example', + 'group.id': 'confluent-kafka-js-consumer-flow-example', 'enable.auto.commit': false }); diff --git a/examples/consumer.md b/examples/consumer.md index 9ad95653..4e09cc2f 100644 --- a/examples/consumer.md +++ b/examples/consumer.md @@ -3,9 +3,9 @@ the Stream implementation ```js /* - * node-rdkafka - Node.js wrapper for RdKafka C/C++ library + * confluent-kafka-js - Node.js wrapper for RdKafka C/C++ library * - * Copyright (c) 2016 Blizzard Entertainment + * Copyright (c) 2016-2023 Blizzard Entertainment * * This software may be modified and distributed under the terms * of the MIT license. See the LICENSE.txt file for details. diff --git a/examples/docker-alpine.md b/examples/docker-alpine.md index 60c5e30a..9339e191 100644 --- a/examples/docker-alpine.md +++ b/examples/docker-alpine.md @@ -1,4 +1,4 @@ -When using docker to install `node-rdkafka`, you need to make sure you install appropriate library dependencies. Alpine linux is a lighter weight version of linux and does not come with the same base libraries as other distributions (like glibc). +When using docker to install `confluent-kafka-js`, you need to make sure you install appropriate library dependencies. Alpine linux is a lighter weight version of linux and does not come with the same base libraries as other distributions (like glibc). You can see some of the differences here: https://linuxacademy.com/blog/cloud/alpine-linux-and-docker/ @@ -24,7 +24,7 @@ RUN mkdir -p /usr/local/app # Move to the app directory WORKDIR /usr/local/app -# Install node-rdkafka -RUN npm install node-rdkafka +# Install confluent-kafka-js +RUN npm install confluent-kafka-js # Copy package.json first to check if an npm install is needed ``` diff --git a/examples/metadata.md b/examples/metadata.md index 93dba45d..0fd4c08b 100644 --- a/examples/metadata.md +++ b/examples/metadata.md @@ -1,8 +1,8 @@ ```js /* - * node-rdkafka - Node.js wrapper for RdKafka C/C++ library + * confluent-kafka-js - Node.js wrapper for RdKafka C/C++ library * - * Copyright (c) 2016 Blizzard Entertainment + * Copyright (c) 2016-2023 Blizzard Entertainment * * This software may be modified and distributed under the terms * of the MIT license. See the LICENSE.txt file for details. diff --git a/examples/producer-cluster.md b/examples/producer-cluster.md index 72088bba..be3dee8e 100644 --- a/examples/producer-cluster.md +++ b/examples/producer-cluster.md @@ -1,8 +1,8 @@ ```js /* - * node-rdkafka - Node.js wrapper for RdKafka C/C++ library + * confluent-kafka-js - Node.js wrapper for RdKafka C/C++ library * - * Copyright (c) 2016 Blizzard Entertainment + * Copyright (c) 2016-2023 Blizzard Entertainment * * This software may be modified and distributed under the terms * of the MIT license. See the LICENSE.txt file for details. diff --git a/examples/producer.md b/examples/producer.md index 4e03a974..0518c675 100644 --- a/examples/producer.md +++ b/examples/producer.md @@ -1,8 +1,8 @@ ```js /* - * node-rdkafka - Node.js wrapper for RdKafka C/C++ library + * confluent-kafka-js - Node.js wrapper for RdKafka C/C++ library * - * Copyright (c) 2016 Blizzard Entertainment + * Copyright (c) 2016-2023 Blizzard Entertainment * * This software may be modified and distributed under the terms * of the MIT license. See the LICENSE.txt file for details. diff --git a/lib/admin.js b/lib/admin.js index 773dc957..76c76de7 100644 --- a/lib/admin.js +++ b/lib/admin.js @@ -1,7 +1,7 @@ /* - * node-rdkafka - Node.js wrapper for RdKafka C/C++ library + * confluent-kafka-js - Node.js wrapper for RdKafka C/C++ library * - * Copyright (c) 2016 Blizzard Entertainment + * Copyright (c) 2016-2023 Blizzard Entertainment * * This software may be modified and distributed under the terms * of the MIT license. See the LICENSE.txt file for details. @@ -47,7 +47,7 @@ function createAdminClient(conf) { * * * Once you instantiate this object, it will have a handle to the kafka broker. - * Unlike the other node-rdkafka classes, this class does not ensure that + * Unlike the other confluent-kafka-js classes, this class does not ensure that * it is connected to the upstream broker. Instead, making an action will * validate that. * diff --git a/lib/client.js b/lib/client.js index 9cbd3f9a..9ba38b69 100644 --- a/lib/client.js +++ b/lib/client.js @@ -1,7 +1,7 @@ /* - * node-rdkafka - Node.js wrapper for RdKafka C/C++ library + * confluent-kafka-js - Node.js wrapper for RdKafka C/C++ library * - * Copyright (c) 2016 Blizzard Entertainment + * Copyright (c) 2016-2023 Blizzard Entertainment * * This software may be modified and distributed under the terms * of the MIT license. See the LICENSE.txt file for details. diff --git a/lib/error.js b/lib/error.js index 0f14e1e8..5cd6c4f0 100644 --- a/lib/error.js +++ b/lib/error.js @@ -1,7 +1,7 @@ /* - * node-rdkafka - Node.js wrapper for RdKafka C/C++ library + * confluent-kafka-js - Node.js wrapper for RdKafka C/C++ library * - * Copyright (c) 2016 Blizzard Entertainment + * Copyright (c) 2016-2023 Blizzard Entertainment * * This software may be modified and distributed under the terms * of the MIT license. See the LICENSE.txt file for details. diff --git a/lib/kafka-consumer-stream.js b/lib/kafka-consumer-stream.js index 0abb5358..fcc07197 100644 --- a/lib/kafka-consumer-stream.js +++ b/lib/kafka-consumer-stream.js @@ -1,7 +1,7 @@ /* - * node-rdkafka - Node.js wrapper for RdKafka C/C++ library + * confluent-kafka-js - Node.js wrapper for RdKafka C/C++ library * - * Copyright (c) 2016 Blizzard Entertainment + * Copyright (c) 2016-2023 Blizzard Entertainment * * This software may be modified and distributed under the terms * of the MIT license. See the LICENSE.txt file for details. diff --git a/lib/kafka-consumer.js b/lib/kafka-consumer.js index c479240f..dd981ade 100644 --- a/lib/kafka-consumer.js +++ b/lib/kafka-consumer.js @@ -1,7 +1,7 @@ /* - * node-rdkafka - Node.js wrapper for RdKafka C/C++ library + * confluent-kafka-js - Node.js wrapper for RdKafka C/C++ library * - * Copyright (c) 2016 Blizzard Entertainment + * Copyright (c) 2016-2023 Blizzard Entertainment * * This software may be modified and distributed under the terms * of the MIT license. See the LICENSE.txt file for details. @@ -399,7 +399,7 @@ KafkaConsumer.prototype.consume = function(number, cb) { this._consumeNum(timeoutMs, number, cb); } else { - // See https://github.com/Blizzard/node-rdkafka/issues/220 + // See https://github.com/confluentinc/confluent-kafka-js/issues/220 // Docs specify just a callback can be provided but really we needed // a fallback to the number argument // @deprecated diff --git a/lib/producer-stream.js b/lib/producer-stream.js index eb53208a..bb2d28ff 100644 --- a/lib/producer-stream.js +++ b/lib/producer-stream.js @@ -1,7 +1,7 @@ /* - * node-rdkafka - Node.js wrapper for RdKafka C/C++ library + * confluent-kafka-js - Node.js wrapper for RdKafka C/C++ library * - * Copyright (c) 2016 Blizzard Entertainment + * Copyright (c) 2016-2023 Blizzard Entertainment * * This software may be modified and distributed under the terms * of the MIT license. See the LICENSE.txt file for details. @@ -289,7 +289,7 @@ ProducerStream.prototype.close = function(cb) { self.producer.disconnect(function() { // Previously this set the producer to null. I'm not sure there is any benefit // to that other than I guess helping flag it for GC? - // https://github.com/Blizzard/node-rdkafka/issues/344 + // https://github.com/confluentinc/confluent-kafka-js/issues/344 close(); }); } else if (self.producer._isConnecting){ diff --git a/lib/producer.js b/lib/producer.js index 67f4f67b..65b4c936 100644 --- a/lib/producer.js +++ b/lib/producer.js @@ -1,7 +1,7 @@ /* - * node-rdkafka - Node.js wrapper for RdKafka C/C++ library + * confluent-kafka-js - Node.js wrapper for RdKafka C/C++ library * - * Copyright (c) 2016 Blizzard Entertainment + * Copyright (c) 2016-2023 Blizzard Entertainment * * This software may be modified and distributed under the terms * of the MIT license. See the LICENSE.txt file for details. diff --git a/lib/producer/high-level-producer.js b/lib/producer/high-level-producer.js index 5dbda2f8..506c2acd 100644 --- a/lib/producer/high-level-producer.js +++ b/lib/producer/high-level-producer.js @@ -1,7 +1,7 @@ /* - * node-rdkafka - Node.js wrapper for RdKafka C/C++ library + * confluent-kafka-js - Node.js wrapper for RdKafka C/C++ library * - * Copyright (c) 2016 Blizzard Entertainment + * Copyright (c) 2016-2023 Blizzard Entertainment * * This software may be modified and distributed under the terms * of the MIT license. See the LICENSE.txt file for details. diff --git a/lib/rdkafka.js b/lib/rdkafka.js index 13c4642f..c5e2e088 100644 --- a/lib/rdkafka.js +++ b/lib/rdkafka.js @@ -1,7 +1,7 @@ /* - * node-rdkafka - Node.js wrapper for RdKafka C/C++ library + * confluent-kafka-js - Node.js wrapper for RdKafka C/C++ library * - * Copyright (c) 2016 Blizzard Entertainment + * Copyright (c) 2016-2023 Blizzard Entertainment * * This software may be modified and distributed under the terms * of the MIT license. See the LICENSE.txt file for details. diff --git a/lib/tools/ref-counter.js b/lib/tools/ref-counter.js index ae23078f..a4800466 100644 --- a/lib/tools/ref-counter.js +++ b/lib/tools/ref-counter.js @@ -1,7 +1,7 @@ /* - * node-rdkafka - Node.js wrapper for RdKafka C/C++ library + * confluent-kafka-js - Node.js wrapper for RdKafka C/C++ library * - * Copyright (c) 2016 Blizzard Entertainment + * Copyright (c) 2016-2023 Blizzard Entertainment * * This software may be modified and distributed under the terms * of the MIT license. See the LICENSE.txt file for details. diff --git a/lib/topic-partition.js b/lib/topic-partition.js index 0961c853..dc22375e 100644 --- a/lib/topic-partition.js +++ b/lib/topic-partition.js @@ -1,7 +1,7 @@ /* - * node-rdkafka - Node.js wrapper for RdKafka C/C++ library + * confluent-kafka-js - Node.js wrapper for RdKafka C/C++ library * - * Copyright (c) 2016 Blizzard Entertainment + * Copyright (c) 2016-2023 Blizzard Entertainment * * This software may be modified and distributed under the terms * of the MIT license. See the LICENSE.txt file for details. diff --git a/lib/topic.js b/lib/topic.js index 4f6a6793..b591ceb7 100644 --- a/lib/topic.js +++ b/lib/topic.js @@ -1,7 +1,7 @@ /* - * node-rdkafka - Node.js wrapper for RdKafka C/C++ library + * confluent-kafka-js - Node.js wrapper for RdKafka C/C++ library * - * Copyright (c) 2016 Blizzard Entertainment + * Copyright (c) 2016-2023 Blizzard Entertainment * * This software may be modified and distributed under the terms * of the MIT license. See the LICENSE.txt file for details. diff --git a/lib/util.js b/lib/util.js index c3250d0e..1b0187c0 100644 --- a/lib/util.js +++ b/lib/util.js @@ -1,7 +1,7 @@ /* - * node-rdkafka - Node.js wrapper for RdKafka C/C++ library + * confluent-kafka-js - Node.js wrapper for RdKafka C/C++ library * - * Copyright (c) 2016 Blizzard Entertainment + * Copyright (c) 2016-2023 Blizzard Entertainment * * This software may be modified and distributed under the terms * of the MIT license. See the LICENSE.txt file for details. diff --git a/librdkafka.js b/librdkafka.js index 4198da07..4a8b7200 100644 --- a/librdkafka.js +++ b/librdkafka.js @@ -1,7 +1,7 @@ /* - * node-rdkafka - Node.js wrapper for RdKafka C/C++ library + * confluent-kafka-js - Node.js wrapper for RdKafka C/C++ library * - * Copyright (c) 2016 Blizzard Entertainment + * Copyright (c) 2016-2023 Blizzard Entertainment * * This software may be modified and distributed under the terms * of the MIT license. See the LICENSE.txt file for details. diff --git a/make_docs.sh b/make_docs.sh index 80085124..4ab333e8 100755 --- a/make_docs.sh +++ b/make_docs.sh @@ -6,8 +6,8 @@ if [[ `git status --porcelain` ]]; then exit 1 fi -# REPO=git@github.com:Blizzard/node-rdkafka.git -REPO=https://github.com/Blizzard/node-rdkafka.git +# REPO=git@github.com:confluentinc/confluent-kafka-js.git +REPO=https://github.com/confluentinc/confluent-kafka-js.git git remote add deploy $REPO diff --git a/package-lock.json b/package-lock.json index d76fe520..90fc9bdb 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,11 +1,11 @@ { - "name": "node-rdkafka", + "name": "confluent-kafka-js", "version": "v2.18.0", "lockfileVersion": 3, "requires": true, "packages": { "": { - "name": "node-rdkafka", + "name": "confluent-kafka-js", "version": "v2.18.0", "hasInstallScript": true, "license": "MIT", diff --git a/package.json b/package.json index 60c8ddbc..5e46e181 100644 --- a/package.json +++ b/package.json @@ -1,5 +1,5 @@ { - "name": "node-rdkafka", + "name": "confluent-kafka-js", "version": "v2.18.0", "description": "Node.js bindings for librdkafka", "librdkafka": "2.3.0", @@ -17,7 +17,7 @@ "module_name": "node-librdkafka", "module_path": "./build/{configuration}/", "package_name": "{module_name}-v{version}-{node_abi}-{platform}-{arch}.tar.gz", - "host": "https://github.com/emasab/node-rdkafka/releases/download/", + "host": "https://github.com/confluentinc/confluent-kafka-js/releases/download/", "remote_path": "v{version}" }, "keywords": [ @@ -26,7 +26,7 @@ ], "repository": { "type": "git", - "url": "git@github.com:Blizzard/node-rdkafka.git" + "url": "git@github.com:confluentinc/confluent-kafka-js.git" }, "contributors": [ { diff --git a/src/admin.cc b/src/admin.cc index 1453ad35..a0e6a011 100644 --- a/src/admin.cc +++ b/src/admin.cc @@ -1,7 +1,7 @@ /* - * node-rdkafka - Node.js wrapper for RdKafka C/C++ library + * confluent-kafka-js - Node.js wrapper for RdKafka C/C++ library * - * Copyright (c) 2016 Blizzard Entertainment + * Copyright (c) 2016-2023 Blizzard Entertainment * * This software may be modified and distributed under the terms * of the MIT license. See the LICENSE.txt file for details. diff --git a/src/admin.h b/src/admin.h index db912380..6e597a2c 100644 --- a/src/admin.h +++ b/src/admin.h @@ -1,7 +1,7 @@ /* - * node-rdkafka - Node.js wrapper for RdKafka C/C++ library + * confluent-kafka-js - Node.js wrapper for RdKafka C/C++ library * - * Copyright (c) 2016 Blizzard Entertainment + * Copyright (c) 2016-2023 Blizzard Entertainment * * This software may be modified and distributed under the terms * of the MIT license. See the LICENSE.txt file for details. diff --git a/src/binding.cc b/src/binding.cc index de3f61f9..85baf129 100644 --- a/src/binding.cc +++ b/src/binding.cc @@ -1,7 +1,7 @@ /* - * node-rdkafka - Node.js wrapper for RdKafka C/C++ library + * confluent-kafka-js - Node.js wrapper for RdKafka C/C++ library * - * Copyright (c) 2016 Blizzard Entertainment + * Copyright (c) 2016-2023 Blizzard Entertainment * * This software may be modified and distributed under the terms * of the MIT license. See the LICENSE.txt file for details. diff --git a/src/binding.h b/src/binding.h index c032a4e9..bebb5bf8 100644 --- a/src/binding.h +++ b/src/binding.h @@ -1,7 +1,7 @@ /* - * node-rdkafka - Node.js wrapper for RdKafka C/C++ library + * confluent-kafka-js - Node.js wrapper for RdKafka C/C++ library * - * Copyright (c) 2016 Blizzard Entertainment + * Copyright (c) 2016-2023 Blizzard Entertainment * * This software may be modified and distributed under the terms * of the MIT license. See the LICENSE.txt file for details. diff --git a/src/callbacks.cc b/src/callbacks.cc index 4dfe2f33..b5a1a7c7 100644 --- a/src/callbacks.cc +++ b/src/callbacks.cc @@ -1,7 +1,7 @@ /* - * node-rdkafka - Node.js wrapper for RdKafka C/C++ library + * confluent-kafka-js - Node.js wrapper for RdKafka C/C++ library * - * Copyright (c) 2016 Blizzard Entertainment + * Copyright (c) 2016-2023 Blizzard Entertainment * * This software may be modified and distributed under the terms * of the MIT license. See the LICENSE.txt file for details. diff --git a/src/callbacks.h b/src/callbacks.h index 1271fbef..0944b61e 100644 --- a/src/callbacks.h +++ b/src/callbacks.h @@ -1,6 +1,6 @@ /* - * node-rdkafka - Node.js wrapper for RdKafka C/C++ library - * Copyright (c) 2016 Blizzard Entertainment + * confluent-kafka-js - Node.js wrapper for RdKafka C/C++ library + * Copyright (c) 2016-2023 Blizzard Entertainment * * This software may be modified and distributed under the terms * of the MIT license. See the LICENSE.txt file for details. @@ -118,7 +118,7 @@ class DeliveryReport { void* opaque; // Key. It is a pointer to avoid corrupted values - // https://github.com/Blizzard/node-rdkafka/issues/208 + // https://github.com/confluentinc/confluent-kafka-js/issues/208 void* key; size_t key_len; diff --git a/src/common.cc b/src/common.cc index c14b9d87..3d0a425d 100644 --- a/src/common.cc +++ b/src/common.cc @@ -1,7 +1,7 @@ /* - * node-rdkafka - Node.js wrapper for RdKafka C/C++ library + * confluent-kafka-js - Node.js wrapper for RdKafka C/C++ library * - * Copyright (c) 2016 Blizzard Entertainment + * Copyright (c) 2016-2023 Blizzard Entertainment * * This software may be modified and distributed under the terms * of the MIT license. See the LICENSE.txt file for details. @@ -455,7 +455,7 @@ v8::Local ToV8Object(RdKafka::Message *message, if (key_payload) { // We want this to also be a buffer to avoid corruption - // https://github.com/Blizzard/node-rdkafka/issues/208 + // https://github.com/confluentinc/confluent-kafka-js/issues/208 Nan::Set(pack, Nan::New("key").ToLocalChecked(), Nan::Encode(key_payload, message->key_len(), Nan::Encoding::BUFFER)); } else { diff --git a/src/common.h b/src/common.h index 1509aeed..785a6515 100644 --- a/src/common.h +++ b/src/common.h @@ -1,7 +1,7 @@ /* - * node-rdkafka - Node.js wrapper for RdKafka C/C++ library + * confluent-kafka-js - Node.js wrapper for RdKafka C/C++ library * - * Copyright (c) 2016 Blizzard Entertainment + * Copyright (c) 2016-2023 Blizzard Entertainment * * This software may be modified and distributed under the terms * of the MIT license. See the LICENSE.txt file for details. diff --git a/src/config.cc b/src/config.cc index aa296b82..c1584b48 100644 --- a/src/config.cc +++ b/src/config.cc @@ -1,7 +1,7 @@ /* - * node-rdkafka - Node.js wrapper for RdKafka C/C++ library + * confluent-kafka-js - Node.js wrapper for RdKafka C/C++ library * - * Copyright (c) 2016 Blizzard Entertainment + * Copyright (c) 2016-2023 Blizzard Entertainment * * This software may be modified and distributed under the terms * of the MIT license. See the LICENSE.txt file for details. diff --git a/src/config.h b/src/config.h index 112bed92..5358ce49 100644 --- a/src/config.h +++ b/src/config.h @@ -1,7 +1,7 @@ /* - * node-rdkafka - Node.js wrapper for RdKafka C/C++ library + * confluent-kafka-js - Node.js wrapper for RdKafka C/C++ library * - * Copyright (c) 2016 Blizzard Entertainment + * Copyright (c) 2016-2023 Blizzard Entertainment * * This software may be modified and distributed under the terms * of the MIT license. See the LICENSE.txt file for details. diff --git a/src/connection.cc b/src/connection.cc index 9de3b3c1..cd203494 100644 --- a/src/connection.cc +++ b/src/connection.cc @@ -1,7 +1,7 @@ /* - * node-rdkafka - Node.js wrapper for RdKafka C/C++ library + * confluent-kafka-js - Node.js wrapper for RdKafka C/C++ library * - * Copyright (c) 2016 Blizzard Entertainment + * Copyright (c) 2016-2023 Blizzard Entertainment * * This software may be modified and distributed under the terms * of the MIT license. See the LICENSE.txt file for details. diff --git a/src/connection.h b/src/connection.h index 8c4ac73f..9e335d63 100644 --- a/src/connection.h +++ b/src/connection.h @@ -1,7 +1,7 @@ /* - * node-rdkafka - Node.js wrapper for RdKafka C/C++ library + * confluent-kafka-js - Node.js wrapper for RdKafka C/C++ library * - * Copyright (c) 2016 Blizzard Entertainment + * Copyright (c) 2016-2023 Blizzard Entertainment * * This software may be modified and distributed under the terms * of the MIT license. See the LICENSE.txt file for details. diff --git a/src/errors.cc b/src/errors.cc index 220773fc..7ad40635 100644 --- a/src/errors.cc +++ b/src/errors.cc @@ -1,7 +1,7 @@ /* - * node-rdkafka - Node.js wrapper for RdKafka C/C++ library + * confluent-kafka-js - Node.js wrapper for RdKafka C/C++ library * - * Copyright (c) 2016 Blizzard Entertainment + * Copyright (c) 2016-2023 Blizzard Entertainment * * This software may be modified and distributed under the terms * of the MIT license. See the LICENSE.txt file for details. diff --git a/src/errors.h b/src/errors.h index bec0beb6..799719eb 100644 --- a/src/errors.h +++ b/src/errors.h @@ -1,7 +1,7 @@ /* - * node-rdkafka - Node.js wrapper for RdKafka C/C++ library + * confluent-kafka-js - Node.js wrapper for RdKafka C/C++ library * - * Copyright (c) 2016 Blizzard Entertainment + * Copyright (c) 2016-2023 Blizzard Entertainment * * This software may be modified and distributed under the terms * of the MIT license. See the LICENSE.txt file for details. diff --git a/src/kafka-consumer.cc b/src/kafka-consumer.cc index 019b0cb6..eccab3e9 100644 --- a/src/kafka-consumer.cc +++ b/src/kafka-consumer.cc @@ -1,7 +1,7 @@ /* - * node-rdkafka - Node.js wrapper for RdKafka C/C++ library + * confluent-kafka-js - Node.js wrapper for RdKafka C/C++ library * - * Copyright (c) 2016 Blizzard Entertainment + * Copyright (c) 2016-2023 Blizzard Entertainment * * This software may be modified and distributed under the terms * of the MIT license. See the LICENSE.txt file for details. @@ -1195,7 +1195,7 @@ NAN_METHOD(KafkaConsumer::NodeDisconnect) { // cleanup the async worker consumeLoop->WorkComplete(); consumeLoop->Destroy(); - + consumer->m_consume_loop = nullptr; } diff --git a/src/kafka-consumer.h b/src/kafka-consumer.h index c91590ec..d5991944 100644 --- a/src/kafka-consumer.h +++ b/src/kafka-consumer.h @@ -1,7 +1,7 @@ /* - * node-rdkafka - Node.js wrapper for RdKafka C/C++ library + * confluent-kafka-js - Node.js wrapper for RdKafka C/C++ library * - * Copyright (c) 2016 Blizzard Entertainment + * Copyright (c) 2016-2023 Blizzard Entertainment * * This software may be modified and distributed under the terms * of the MIT license. See the LICENSE.txt file for details. @@ -99,7 +99,7 @@ class KafkaConsumer : public Connection { bool m_is_subscribed = false; void* m_consume_loop = nullptr; - + // Node methods static NAN_METHOD(NodeConnect); static NAN_METHOD(NodeSubscribe); diff --git a/src/producer.cc b/src/producer.cc index 04e75688..f5a32b1b 100644 --- a/src/producer.cc +++ b/src/producer.cc @@ -1,7 +1,7 @@ /* - * node-rdkafka - Node.js wrapper for RdKafka C/C++ library + * confluent-kafka-js - Node.js wrapper for RdKafka C/C++ library * - * Copyright (c) 2016 Blizzard Entertainment + * Copyright (c) 2016-2023 Blizzard Entertainment * * This software may be modified and distributed under the terms * of the MIT license. See the LICENSE.txt file for details. diff --git a/src/producer.h b/src/producer.h index 5674aa41..4f0ca2c3 100644 --- a/src/producer.h +++ b/src/producer.h @@ -1,7 +1,7 @@ /* - * node-rdkafka - Node.js wrapper for RdKafka C/C++ library + * confluent-kafka-js - Node.js wrapper for RdKafka C/C++ library * - * Copyright (c) 2016 Blizzard Entertainment + * Copyright (c) 2016-2023 Blizzard Entertainment * * This software may be modified and distributed under the terms * of the MIT license. See the LICENSE.txt file for details. diff --git a/src/topic.cc b/src/topic.cc index 4c9d663a..1f0de565 100644 --- a/src/topic.cc +++ b/src/topic.cc @@ -1,7 +1,7 @@ /* - * node-rdkafka - Node.js wrapper for RdKafka C/C++ library + * confluent-kafka-js - Node.js wrapper for RdKafka C/C++ library * - * Copyright (c) 2016 Blizzard Entertainment + * Copyright (c) 2016-2023 Blizzard Entertainment * * This software may be modified and distributed under the terms * of the MIT license. See the LICENSE.txt file for details. diff --git a/src/topic.h b/src/topic.h index 425bf7fd..1404d532 100644 --- a/src/topic.h +++ b/src/topic.h @@ -1,7 +1,7 @@ /* - * node-rdkafka - Node.js wrapper for RdKafka C/C++ library + * confluent-kafka-js - Node.js wrapper for RdKafka C/C++ library * - * Copyright (c) 2016 Blizzard Entertainment + * Copyright (c) 2016-2023 Blizzard Entertainment * * This software may be modified and distributed under the terms * of the MIT license. See the LICENSE.txt file for details. diff --git a/src/workers.cc b/src/workers.cc index 55d3dd50..749732d0 100644 --- a/src/workers.cc +++ b/src/workers.cc @@ -1,7 +1,7 @@ /* - * node-rdkafka - Node.js wrapper for RdKafka C/C++ library + * confluent-kafka-js - Node.js wrapper for RdKafka C/C++ library * - * Copyright (c) 2016 Blizzard Entertainment + * Copyright (c) 2016-2023 Blizzard Entertainment * * This software may be modified and distributed under the terms * of the MIT license. See the LICENSE.txt file for details. @@ -824,7 +824,7 @@ void KafkaConsumerConsumeNum::Execute() { if (m_messages.size() > eof_event_count) { timeout_ms = 1; } - + // We will only go into this code path when `enable.partition.eof` is set to true // In this case, consumer is also interested in EOF messages, so we return an EOF message m_messages.push_back(message); @@ -872,7 +872,7 @@ void KafkaConsumerConsumeNum::HandleOKCallback() { for (std::vector::iterator it = m_messages.begin(); it != m_messages.end(); ++it) { RdKafka::Message* message = *it; - + switch (message->err()) { case RdKafka::ERR_NO_ERROR: ++returnArrayIndex; @@ -890,7 +890,7 @@ void KafkaConsumerConsumeNum::HandleOKCallback() { Nan::New(message->offset())); Nan::Set(eofEvent, Nan::New("partition").ToLocalChecked(), Nan::New(message->partition())); - + // also store index at which position in the message array this event was emitted // this way, we can later emit it at the right point in time Nan::Set(eofEvent, Nan::New("messageIndex").ToLocalChecked(), @@ -898,7 +898,7 @@ void KafkaConsumerConsumeNum::HandleOKCallback() { Nan::Set(eofEventsArray, eofEventsArrayIndex, eofEvent); } - + delete message; } } diff --git a/src/workers.h b/src/workers.h index d7d5ac8a..b290d253 100644 --- a/src/workers.h +++ b/src/workers.h @@ -1,7 +1,7 @@ /* - * node-rdkafka - Node.js wrapper for RdKafka C/C++ library + * confluent-kafka-js - Node.js wrapper for RdKafka C/C++ library * - * Copyright (c) 2016 Blizzard Entertainment + * Copyright (c) 2016-2023 Blizzard Entertainment * * This software may be modified and distributed under the terms * of the MIT license. See the LICENSE.txt file for details. diff --git a/test/binding.spec.js b/test/binding.spec.js index b82c7bc4..739c708f 100644 --- a/test/binding.spec.js +++ b/test/binding.spec.js @@ -1,7 +1,7 @@ /* - * node-rdkafka - Node.js wrapper for RdKafka C/C++ library + * confluent-kafka-js - Node.js wrapper for RdKafka C/C++ library * - * Copyright (c) 2016 Blizzard Entertainment + * Copyright (c) 2016-2023 Blizzard Entertainment * * This software may be modified and distributed under the terms * of the MIT license. See the LICENSE.txt file for details. diff --git a/test/consumer.spec.js b/test/consumer.spec.js index 40b52ee4..38d01f2e 100644 --- a/test/consumer.spec.js +++ b/test/consumer.spec.js @@ -1,7 +1,7 @@ /* - * node-rdkafka - Node.js wrapper for RdKafka C/C++ library + * confluent-kafka-js - Node.js wrapper for RdKafka C/C++ library * - * Copyright (c) 2016 Blizzard Entertainment + * Copyright (c) 2016-2023 Blizzard Entertainment * * This software may be modified and distributed under the terms * of the MIT license. See the LICENSE.txt file for details. diff --git a/test/error.spec.js b/test/error.spec.js index 13587fc8..1e54ca4f 100644 --- a/test/error.spec.js +++ b/test/error.spec.js @@ -1,7 +1,7 @@ /* - * node-rdkafka - Node.js wrapper for RdKafka C/C++ library + * confluent-kafka-js - Node.js wrapper for RdKafka C/C++ library * - * Copyright (c) 2016 Blizzard Entertainment + * Copyright (c) 2016-2023 Blizzard Entertainment * * This software may be modified and distributed under the terms * of the MIT license. See the LICENSE.txt file for details. diff --git a/test/index.spec.js b/test/index.spec.js index 13587fc8..1e54ca4f 100644 --- a/test/index.spec.js +++ b/test/index.spec.js @@ -1,7 +1,7 @@ /* - * node-rdkafka - Node.js wrapper for RdKafka C/C++ library + * confluent-kafka-js - Node.js wrapper for RdKafka C/C++ library * - * Copyright (c) 2016 Blizzard Entertainment + * Copyright (c) 2016-2023 Blizzard Entertainment * * This software may be modified and distributed under the terms * of the MIT license. See the LICENSE.txt file for details. diff --git a/test/kafka-consumer-stream.spec.js b/test/kafka-consumer-stream.spec.js index 72e46307..b12d95c8 100644 --- a/test/kafka-consumer-stream.spec.js +++ b/test/kafka-consumer-stream.spec.js @@ -1,7 +1,7 @@ /* - * node-rdkafka - Node.js wrapper for RdKafka C/C++ library + * confluent-kafka-js - Node.js wrapper for RdKafka C/C++ library * - * Copyright (c) 2016 Blizzard Entertainment + * Copyright (c) 2016-2023 Blizzard Entertainment * * This software may be modified and distributed under the terms * of the MIT license. See the LICENSE.txt file for details. diff --git a/test/kafka-consumer.spec.js b/test/kafka-consumer.spec.js index 0f4de520..9d05e01c 100644 --- a/test/kafka-consumer.spec.js +++ b/test/kafka-consumer.spec.js @@ -1,7 +1,7 @@ /* - * node-rdkafka - Node.js wrapper for RdKafka C/C++ library + * confluent-kafka-js - Node.js wrapper for RdKafka C/C++ library * - * Copyright (c) 2016 Blizzard Entertainment + * Copyright (c) 2016-2023 Blizzard Entertainment * * This software may be modified and distributed under the terms * of the MIT license. See the LICENSE.txt file for details. diff --git a/test/mock.js b/test/mock.js index 4a06bc82..8e72c822 100644 --- a/test/mock.js +++ b/test/mock.js @@ -1,7 +1,7 @@ /* - * node-rdkafka - Node.js wrapper for RdKafka C/C++ library + * confluent-kafka-js - Node.js wrapper for RdKafka C/C++ library * - * Copyright (c) 2016 Blizzard Entertainment + * Copyright (c) 2016-2023 Blizzard Entertainment * * This software may be modified and distributed under the terms * of the MIT license. See the LICENSE.txt file for details. diff --git a/test/producer-stream.spec.js b/test/producer-stream.spec.js index 8e38c6cc..4bb3bfa7 100644 --- a/test/producer-stream.spec.js +++ b/test/producer-stream.spec.js @@ -1,7 +1,7 @@ /* - * node-rdkafka - Node.js wrapper for RdKafka C/C++ library + * confluent-kafka-js - Node.js wrapper for RdKafka C/C++ library * - * Copyright (c) 2016 Blizzard Entertainment + * Copyright (c) 2016-2023 Blizzard Entertainment * * This software may be modified and distributed under the terms * of the MIT license. See the LICENSE.txt file for details. @@ -311,7 +311,7 @@ module.exports = { readable.pipe(stream); }, 'can drain buffered chunks': function(done) { - + var message; var currentMessage = 0; diff --git a/test/producer.spec.js b/test/producer.spec.js index dac2e22f..fc24ea4b 100644 --- a/test/producer.spec.js +++ b/test/producer.spec.js @@ -1,7 +1,7 @@ /* - * node-rdkafka - Node.js wrapper for RdKafka C/C++ library + * confluent-kafka-js - Node.js wrapper for RdKafka C/C++ library * - * Copyright (c) 2016 Blizzard Entertainment + * Copyright (c) 2016-2023 Blizzard Entertainment * * This software may be modified and distributed under the terms * of the MIT license. See the LICENSE.txt file for details. diff --git a/test/producer/high-level-producer.spec.js b/test/producer/high-level-producer.spec.js index e40254ee..41f665b8 100644 --- a/test/producer/high-level-producer.spec.js +++ b/test/producer/high-level-producer.spec.js @@ -1,7 +1,7 @@ /* - * node-rdkafka - Node.js wrapper for RdKafka C/C++ library + * confluent-kafka-js - Node.js wrapper for RdKafka C/C++ library * - * Copyright (c) 2016 Blizzard Entertainment + * Copyright (c) 2016-2023 Blizzard Entertainment * * This software may be modified and distributed under the terms * of the MIT license. See the LICENSE.txt file for details. diff --git a/test/topic-partition.spec.js b/test/topic-partition.spec.js index 1961e8a7..4d9eab38 100644 --- a/test/topic-partition.spec.js +++ b/test/topic-partition.spec.js @@ -1,7 +1,7 @@ /* - * node-rdkafka - Node.js wrapper for RdKafka C/C++ library + * confluent-kafka-js - Node.js wrapper for RdKafka C/C++ library * - * Copyright (c) 2016 Blizzard Entertainment + * Copyright (c) 2016-2023 Blizzard Entertainment * * This software may be modified and distributed under the terms * of the MIT license. See the LICENSE.txt file for details. diff --git a/test/util.spec.js b/test/util.spec.js index b58db0e1..dfa11440 100644 --- a/test/util.spec.js +++ b/test/util.spec.js @@ -1,7 +1,7 @@ /* - * node-rdkafka - Node.js wrapper for RdKafka C/C++ library + * confluent-kafka-js - Node.js wrapper for RdKafka C/C++ library * - * Copyright (c) 2016 Blizzard Entertainment + * Copyright (c) 2016-2023 Blizzard Entertainment * * This software may be modified and distributed under the terms * of the MIT license. See the LICENSE.txt file for details.