Skip to content

Add prebuilt binaries for node v24 #337

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 8 commits into from
Jul 3, 2025
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
18 changes: 9 additions & 9 deletions .semaphore/post_install.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ blocks:
- env_var: DOCKER_IMAGE
values: ["debian:bullseye", "debian:bookworm", "ubuntu:20.04", "ubuntu:22.04", "ubuntu:24.04"]
- env_var: NODE_VERSION
values: ["18", "20", "21", "22", "23"]
values: ["18", "20", "21", "22", "23", "24"]
commands:
- docker run -v "$(pwd):/v" "$DOCKER_IMAGE" /v/ci/post-install/install-debian.sh "$NODE_VERSION" "$LIBRARY_VERSION"

Expand All @@ -55,7 +55,7 @@ blocks:
- env_var: DOCKER_IMAGE
values: ["debian:bullseye", "debian:bookworm", "ubuntu:20.04", "ubuntu:22.04", "ubuntu:24.04"]
- env_var: NODE_VERSION
values: ["18", "20", "21", "22", "23"]
values: ["18", "20", "21", "22", "23", "24"]
commands:
- docker run -v "$(pwd):/v" "$DOCKER_IMAGE" /v/ci/post-install/install-debian.sh "$NODE_VERSION" "$LIBRARY_VERSION"

Expand All @@ -72,7 +72,7 @@ blocks:
- name: "Install"
matrix:
- env_var: NODE_VERSION
values: ["18", "20", "21", "22", "23"]
values: ["18", "20", "21", "22", "23", "24"]
commands:
- docker run -v "$(pwd):/v" "node:${NODE_VERSION}-alpine" /v/ci/post-install/install-alpine.sh "$NODE_VERSION" "$LIBRARY_VERSION"

Expand All @@ -89,7 +89,7 @@ blocks:
- name: "Install"
matrix:
- env_var: NODE_VERSION
values: ["18", "20", "21", "22", "23"]
values: ["18", "20", "21", "22", "23", "24"]
commands:
- docker run -v "$(pwd):/v" "node:${NODE_VERSION}-alpine" /v/ci/post-install/install-alpine.sh "$NODE_VERSION" "$LIBRARY_VERSION"

Expand All @@ -108,7 +108,7 @@ blocks:
- env_var: DOCKER_IMAGE
values: ["quay.io/centos/centos:stream9", "almalinux:9", "rockylinux:9"]
- env_var: NODE_VERSION
values: ["18", "20", "21", "22", "23"]
values: ["18", "20", "21", "22", "23", "24"]
commands:
- docker run -v "$(pwd):/v" "$DOCKER_IMAGE" /v/ci/post-install/install-rhel.sh "$NODE_VERSION" "$LIBRARY_VERSION"

Expand All @@ -127,7 +127,7 @@ blocks:
- env_var: DOCKER_IMAGE
values: ["quay.io/centos/centos:stream9", "almalinux:9", "rockylinux:9"]
- env_var: NODE_VERSION
values: ["18", "20", "21", "22", "23"]
values: ["18", "20", "21", "22", "23", "24"]
commands:
- docker run -v "$(pwd):/v" "$DOCKER_IMAGE" /v/ci/post-install/install-rhel.sh "$NODE_VERSION" "$LIBRARY_VERSION"

Expand All @@ -141,7 +141,7 @@ blocks:
- name: "Install"
matrix:
- env_var: NODE_VERSION
values: ["18", "20", "21", "22", "23"]
values: ["18", "20", "21", "22", "23", "24"]
commands:
- sem-version node $NODE_VERSION
- bash ci/post-install/install-mac.sh "$NODE_VERSION" "$LIBRARY_VERSION"
Expand All @@ -156,7 +156,7 @@ blocks:
- name: "Install"
matrix:
- env_var: NODE_VERSION
values: ["18", "20", "21", "22", "23"]
values: ["18", "20", "21", "22", "23", "24"]
commands:
- sem-version node $NODE_VERSION
- bash ci/post-install/install-mac.sh "$NODE_VERSION" "$LIBRARY_VERSION"
Expand Down Expand Up @@ -187,7 +187,7 @@ blocks:
- name: "Install"
matrix:
- env_var: NODE_VERSION
values: ["18.19.0", "20.11.0", "21.6.1", "22.2.0", "23.2.0"]
values: ["18.19.0", "20.11.0", "21.6.1", "22.2.0", "23.2.0", "24.3.0"]
commands:
- Invoke-WebRequest "https://nodejs.org/download/release/v${env:NODE_VERSION}/node-v${env:NODE_VERSION}-x64.msi" -OutFile node.msi
- msiexec /qn /l* node-log.txt /i node.msi
Expand Down
10 changes: 9 additions & 1 deletion .semaphore/semaphore.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ global_job_config:
- git submodule update --init --recursive
- cd deps/librdkafka
- git fetch origin
- git checkout v2.10.1
- git checkout v2.11.0-RC4
- cd ../../
- cache clear

Expand Down Expand Up @@ -209,6 +209,7 @@ blocks:
- 21,120
- 22,127
- 23,131
- 24,137
commands:
- export NODE_VERSION=$(echo $NODE_VERSION_ABI | cut -d, -f1)
- export NODE_ABI=$(echo $NODE_VERSION_ABI | cut -d, -f2)
Expand Down Expand Up @@ -245,6 +246,7 @@ blocks:
- 21,120
- 22,127
- 23,131
- 24,137
commands:
- export NODE_VERSION=$(echo $NODE_VERSION_ABI | cut -d, -f1)
- export NODE_ABI=$(echo $NODE_VERSION_ABI | cut -d, -f2)
Expand Down Expand Up @@ -281,6 +283,7 @@ blocks:
- 21,120
- 22,127
- 23,131
- 24,137
commands:
- export NODE_VERSION=$(echo $NODE_VERSION_ABI | cut -d, -f1)
- export NODE_ABI=$(echo $NODE_VERSION_ABI | cut -d, -f2)
Expand Down Expand Up @@ -317,6 +320,7 @@ blocks:
- 21,120
- 22,127
- 23,131
- 24,137
commands:
- export NODE_VERSION=$(echo $NODE_VERSION_ABI | cut -d, -f1)
- export NODE_ABI=$(echo $NODE_VERSION_ABI | cut -d, -f2)
Expand Down Expand Up @@ -350,6 +354,7 @@ blocks:
- 21,120
- 22,127
- 23,131
- 24,137
commands:
- export NODE_VERSION=$(echo $NODE_VERSION_ABI | cut -d, -f1)
- export NODE_ABI=$(echo $NODE_VERSION_ABI | cut -d, -f2)
Expand Down Expand Up @@ -385,6 +390,7 @@ blocks:
- 21,120
- 22,127
- 23,131
- 24,137
commands:
- export NODE_VERSION=$(echo $NODE_VERSION_ABI | cut -d, -f1)
- export NODE_ABI=$(echo $NODE_VERSION_ABI | cut -d, -f2)
Expand Down Expand Up @@ -439,6 +445,7 @@ blocks:
- 21.6.1,120
- 22.2.0,127
- 23.2.0,131
- 24.3.0,137
commands:
- $env:NODE_VERSION = $env:NODE_VERSION_ABI.Split(',')[0]
- $env:NODE_ABI = $env:NODE_VERSION_ABI.Split(',')[1]
Expand All @@ -449,6 +456,7 @@ blocks:
- pip install setuptools
- $env:ARTIFACT_KEY = "confluent-kafka-javascript-${env:SEMAPHORE_GIT_TAG_NAME}-node-v${env:NODE_ABI}-${env:PLATFORM}-${env:LIBC}-${env:ARCHITECTURE}.tar.gz"
- echo "$env:ARTIFACT_KEY"
- npm config delete registry # we have no requirement for internal packages.
- npm ci # node-pre-gyp will fallback to build here, because new tag implies no release yet.
- npx node-pre-gyp package
- ls "build/stage/${env:SEMAPHORE_GIT_TAG_NAME}/${env:ARTIFACT_KEY}"
Expand Down
6 changes: 4 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,10 @@ v1.4.0 is a feature release. It is supported for all usage.
## Enhancements

1. References librdkafka v2.11.0. Refer to the [librdkafka v2.11.0 release notes](https://github.com/confluentinc/librdkafka/releases/tag/v2.11.0) for more information.
2. [KIP-848] `describeGroups()` now supports KIP-848 introduced `consumer` groups. Two new fields for consumer group type and target assignment have also been added. Type defines whether this group is a `classic` or `consumer` group. Target assignment is only valid for the `consumer` protocol and its defaults to being undefined (#329)
3. [KIP-848] Admin API for listing consumer groups now has an optional filter to return only groups of given types (#328)
2. [KIP-848] `describeGroups()` now supports KIP-848 introduced `consumer` groups. Two new fields for consumer group type and target assignment have also been added. Type defines whether this group is a `classic` or `consumer` group. Target assignment is only valid for the `consumer` protocol and it defaults to being undefined (#329).
3. [KIP-848] Admin API for listing consumer groups now has an optional filter to return only groups of given types (#328).
4. Add support for Node v24 pre-built binaries (@weyert, #307, #337).


# confluent-kafka-javascript v1.3.2

Expand Down
13 changes: 7 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,15 +33,15 @@ The following configurations are supported:

| Distribution | Supported Node Versions |
| ----------------------------------------- | ----------------------- |
| Debian Bullseye/Ubuntu 20.04 | 18, 20, 21, 22, 23 |
| Debian Bookworm/Ubuntu 22.04 | 18, 20, 21, 22, 23 |
| Alpine Linux 3.20+ | 18, 20, 21, 22, 23 |
| AlmaLinux 9/Rocky Linux 9/CentOS Stream 9 | 18, 20, 21, 22, 23 |
| Debian Bullseye/Ubuntu 20.04 | 18, 20, 21, 22, 23, 24 |
| Debian Bookworm/Ubuntu 22.04 | 18, 20, 21, 22, 23, 24 |
| Alpine Linux 3.20+ | 18, 20, 21, 22, 23, 24 |
| AlmaLinux 9/Rocky Linux 9/CentOS Stream 9 | 18, 20, 21, 22, 23, 24 |

Other distributions will probably work given a modern version of gcc/glibc, but we don't test the pre-built binaries with them.

* macOS - arm64/m1. macOS (Intel) is supported on a best-effort basis. Node versions 18, 20, 21, 22, and 23 are supported.
* Windows - x64. Node versions 18, 20, 21, 22, and 23 are supported.
* macOS - arm64/m1. macOS (Intel) is supported on a best-effort basis. Node versions 18, 20, 21, 22, 23 and 24 are supported.
* Windows - x64. Node versions 18, 20, 21, 22, 23 and 24 are supported.

> [!WARNING]
> Pre-built binary support will be dropped after the EOL of the node version or the OS.
Expand Down Expand Up @@ -115,6 +115,7 @@ For guidelines on contributing please see [CONTRIBUTING.md](CONTRIBUTING.md)
| 1.3.0 | 2.10.0 |
| 1.3.1 | 2.10.0 |
| 1.3.2 | 2.10.1 |
| 1.4.0 | 2.11.0 |

This mapping is applicable if you're using a pre-built binary. Otherwise, you can check the librdkafka version with the following command:

Expand Down
2 changes: 1 addition & 1 deletion deps/librdkafka
Submodule librdkafka updated 53 files
+59 −1 CHANGELOG.md
+19 −1 CONFIGURATION.md
+38 −3 INTRODUCTION.md
+28 −2 src-cpp/rdkafkacpp.h
+137 −0 src/rd.h
+32 −1 src/rdbase64.c
+2 −0 src/rdbase64.h
+158 −8 src/rdhttp.c
+5 −3 src/rdhttp.h
+62 −35 src/rdkafka.c
+3 −3 src/rdkafka.h
+7 −1 src/rdkafka_buf.c
+39 −23 src/rdkafka_cgrp.c
+326 −12 src/rdkafka_conf.c
+41 −2 src/rdkafka_conf.h
+31 −9 src/rdkafka_feature.c
+28 −28 src/rdkafka_int.h
+15 −0 src/rdkafka_metadata.c
+2 −1 src/rdkafka_mock.c
+45 −17 src/rdkafka_mock_cgrp.c
+1 −1 src/rdkafka_mock_handlers.c
+5 −1 src/rdkafka_mock_int.h
+1 −1 src/rdkafka_proto.h
+116 −37 src/rdkafka_queue.c
+19 −0 src/rdkafka_queue.h
+11 −5 src/rdkafka_request.c
+11 −5 src/rdkafka_sasl_oauthbearer.c
+1,059 −101 src/rdkafka_sasl_oauthbearer_oidc.c
+8 −3 src/rdkafka_sasl_oauthbearer_oidc.h
+73 −44 src/rdkafka_ssl.c
+17 −0 src/rdkafka_ssl.h
+11 −1 src/rdrand.c
+6 −0 src/rdunittest.c
+1 −1 src/rdwin32.h
+69 −0 tests/0004-conf.c
+3 −0 tests/0067-empty_topic.cpp
+26 −4 tests/0080-admin_ut.c
+189 −123 tests/0081-admin.c
+35 −18 tests/0102-static_group_rebalance.c
+212 −7 tests/0126-oauthbearer_oidc.c
+32 −16 tests/0142-reauthentication.c
+952 −0 tests/0147-consumer_group_consumer_mock.c
+128 −0 tests/0153-memberid.c
+2 −0 tests/CMakeLists.txt
+19 −3 tests/LibrdkafkaTestApp.py
+10 −0 tests/fixtures/oauthbearer/jwt_assertion_template.json
+1 −1 tests/requirements.txt
+5 −1 tests/test.c
+6 −0 tests/test.h
+ tests/trivup/trivup-0.12.10.tar.gz
+ tests/trivup/trivup-0.13.0.tar.gz
+1 −1 vcpkg.json
+2 −0 win32/tests/tests.vcxproj
9 changes: 6 additions & 3 deletions deps/windows-install.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,13 @@
depsIncludeDir = '../deps/include'
buildReleaseDir = 'Release'

# alternative: 'https://api.nuget.org/v3-flatcontainer/librdkafka.redist/{}/librdkafka.redist.{}.nupkg'.format(librdkafkaVersion, librdkafkaVersion)
# Use publicly documented API to download librdkafka NuGet package.
# https://api.nuget.org/v3-flatcontainer/{package}/{version}/{package}.{version}.nupkg
# See https://learn.microsoft.com/en-us/nuget/api/package-base-address-resource#download-package-content-nupkg
env_dist = os.environ
downloadBaseUrl = env_dist['NODE_RDKAFKA_NUGET_BASE_URL'] if 'NODE_RDKAFKA_NUGET_BASE_URL' in env_dist else 'https://globalcdn.nuget.org/packages/'
librdkafkaNugetUrl = downloadBaseUrl + 'librdkafka.redist.{}.nupkg'.format(librdkafkaVersion)
downloadBaseUrl = env_dist['NODE_RDKAFKA_NUGET_BASE_URL'] if 'NODE_RDKAFKA_NUGET_BASE_URL' in env_dist else 'https://api.nuget.org/v3-flatcontainer/librdkafka.redist/{version}/'
librdkafkaNugetUrl = downloadBaseUrl + 'librdkafka.redist.{version}.nupkg'
librdkafkaNugetUrl = librdkafkaNugetUrl.format(version=librdkafkaVersion.lower())
print('download librdkafka form ' + librdkafkaNugetUrl)
outputDir = 'librdkafka.redist'
outputFile = outputDir + '.zip'
Expand Down
30 changes: 28 additions & 2 deletions lib/error.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ LibrdKafkaError.wrap = errorWrap;
* @constant
* @memberof RdKafka
*/
// ====== Generated from librdkafka 2.10.1 file src-cpp/rdkafkacpp.h ======
// ====== Generated from librdkafka 2.11.0-RC4 file src-cpp/rdkafkacpp.h ======
LibrdKafkaError.codes = {

/* Internal errors to rdkafka: */
Expand Down Expand Up @@ -159,6 +159,11 @@ LibrdKafkaError.codes = {
ERR__AUTO_OFFSET_RESET: -140,
/** Partition log truncation detected */
ERR__LOG_TRUNCATION: -139,
/** A different record in the batch was invalid
* and this message failed persisting. */
ERR__INVALID_DIFFERENT_RECORD: -138,
/** Broker is going away but client isn't terminating */
ERR__DESTROY_BROKER: -137,
/** End internal error codes */
ERR__END: -100,
/* Kafka broker errors: */
Expand Down Expand Up @@ -374,7 +379,28 @@ LibrdKafkaError.codes = {
/** Unable to update finalized features due to server error */
ERR_FEATURE_UPDATE_FAILED: 96,
/** Request principal deserialization failed during forwarding */
ERR_PRINCIPAL_DESERIALIZATION_FAILURE: 97
ERR_PRINCIPAL_DESERIALIZATION_FAILURE: 97,
/** Unknown Topic Id */
ERR_UNKNOWN_TOPIC_ID: 100,
/** The member epoch is fenced by the group coordinator */
ERR_FENCED_MEMBER_EPOCH: 110,
/** The instance ID is still used by another member in the
* consumer group */
ERR_UNRELEASED_INSTANCE_ID: 111,
/** The assignor or its version range is not supported by the consumer
* group */
ERR_UNSUPPORTED_ASSIGNOR: 112,
/** The member epoch is stale */
ERR_STALE_MEMBER_EPOCH: 113,
/** Client sent a push telemetry request with an invalid or outdated
* subscription ID. */
ERR_UNKNOWN_SUBSCRIPTION_ID: 117,
/** Client sent a push telemetry request larger than the maximum size
* the broker will accept. */
ERR_TELEMETRY_TOO_LARGE: 118,
/** Client metadata is stale,
* client should rebootstrap to obtain new metadata. */
ERR_REBOOTSTRAP_REQUIRED: 129
};

/**
Expand Down
2 changes: 1 addition & 1 deletion lib/util.js
Original file line number Diff line number Diff line change
Expand Up @@ -52,4 +52,4 @@ util.dictToStringList = function (mapOrObject) {
return list;
};

util.bindingVersion = '1.3.2';
util.bindingVersion = '1.4.0-rc0';
6 changes: 3 additions & 3 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 4 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
{
"name": "@confluentinc/kafka-javascript",
"version": "1.3.2",
"version": "1.4.0-rc0",
"description": "Node.js bindings for librdkafka",
"librdkafka": "2.10.1",
"librdkafka_win": "2.10.1",
"librdkafka": "2.11.0-RC4",
"librdkafka_win": "2.11.0-RC4",
"main": "lib/index.js",
"types": "types/index.d.ts",
"scripts": {
Expand Down Expand Up @@ -65,4 +65,4 @@
"schemaregistry",
"schemaregistry-examples"
]
}
}
2 changes: 1 addition & 1 deletion schemaregistry/docker-compose.schemaregistry.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ services:
environment:
ZOOKEEPER_CLIENT_PORT: 2181
kafka:
image: confluentinc/cp-kafka
image: confluentinc/cp-kafka:7.9.2
restart: always
depends_on:
- zookeeper
Expand Down
2 changes: 1 addition & 1 deletion schemaregistry/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@confluentinc/schemaregistry",
"version": "1.3.1",
"version": "1.4.0-rc0",
"description": "Node.js client for Confluent Schema Registry",
"main": "dist/index.js",
"types": "dist/index.d.ts",
Expand Down
Loading