Skip to content

Change repo maintainer and package name #1

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Nov 7, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
Expand Up @@ -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**
2 changes: 1 addition & 1 deletion .github/workflows/npm-publish.yml
Original file line number Diff line number Diff line change
@@ -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:
Expand Down
14 changes: 7 additions & 7 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -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.

Expand Down Expand Up @@ -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`
```
Expand Down Expand Up @@ -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)

Expand All @@ -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
```
Expand All @@ -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

Expand Down
2 changes: 1 addition & 1 deletion LICENSE.txt
Original file line number Diff line number Diff line change
@@ -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
Expand Down
42 changes: 19 additions & 23 deletions README.md
Original file line number Diff line number Diff line change
@@ -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

Expand All @@ -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
Expand All @@ -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

Expand All @@ -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

Expand All @@ -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
Expand All @@ -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' ]
Expand All @@ -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
Expand Down Expand Up @@ -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({
Expand Down Expand Up @@ -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',
Expand Down
6 changes: 3 additions & 3 deletions bench/consumer-raw-rdkafka.js
Original file line number Diff line number Diff line change
@@ -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.
Expand All @@ -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
Expand Down
6 changes: 3 additions & 3 deletions bench/consumer-subscribe.js
Original file line number Diff line number Diff line change
@@ -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.
Expand All @@ -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
Expand Down
6 changes: 3 additions & 3 deletions bench/kafka-consumer-stream.js
Original file line number Diff line number Diff line change
@@ -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.
Expand All @@ -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
Expand Down
6 changes: 3 additions & 3 deletions bench/producer-raw-rdkafka.js
Original file line number Diff line number Diff line change
@@ -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.
Expand All @@ -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,
Expand Down
6 changes: 3 additions & 3 deletions bench/producer-rdkafka.js
Original file line number Diff line number Diff line change
@@ -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.
Expand All @@ -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,
Expand Down
2 changes: 1 addition & 1 deletion ci/librdkafka-defs-generator.js
Original file line number Diff line number Diff line change
Expand Up @@ -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' };
Expand Down
2 changes: 1 addition & 1 deletion ci/update-version.js
Original file line number Diff line number Diff line change
Expand Up @@ -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') {
Expand Down
4 changes: 2 additions & 2 deletions e2e/admin.spec.js
Original file line number Diff line number Diff line change
@@ -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.
Expand Down
10 changes: 5 additions & 5 deletions e2e/both.spec.js
Original file line number Diff line number Diff line change
@@ -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.
Expand Down Expand Up @@ -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);
Expand Down Expand Up @@ -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");
});
Expand Down Expand Up @@ -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' },
Expand Down
4 changes: 2 additions & 2 deletions e2e/consumer.spec.js
Original file line number Diff line number Diff line change
@@ -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.
Expand Down
4 changes: 2 additions & 2 deletions e2e/groups.spec.js
Original file line number Diff line number Diff line change
@@ -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.
Expand Down
Loading