@point3/node-rdkafka 3.6.0-1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE.txt +20 -0
- package/README.md +636 -0
- package/binding.gyp +154 -0
- package/deps/librdkafka/.clang-format +136 -0
- package/deps/librdkafka/.clang-format-cpp +103 -0
- package/deps/librdkafka/.dir-locals.el +10 -0
- package/deps/librdkafka/.formatignore +33 -0
- package/deps/librdkafka/.gdbmacros +19 -0
- package/deps/librdkafka/.github/CODEOWNERS +1 -0
- package/deps/librdkafka/.github/ISSUE_TEMPLATE +34 -0
- package/deps/librdkafka/.semaphore/run-all-tests.yml +77 -0
- package/deps/librdkafka/.semaphore/semaphore-integration.yml +250 -0
- package/deps/librdkafka/.semaphore/semaphore.yml +378 -0
- package/deps/librdkafka/.semaphore/verify-linux-packages.yml +41 -0
- package/deps/librdkafka/CHANGELOG.md +2208 -0
- package/deps/librdkafka/CMakeLists.txt +291 -0
- package/deps/librdkafka/CODE_OF_CONDUCT.md +46 -0
- package/deps/librdkafka/CONFIGURATION.md +209 -0
- package/deps/librdkafka/CONTRIBUTING.md +431 -0
- package/deps/librdkafka/Doxyfile +2375 -0
- package/deps/librdkafka/INTRODUCTION.md +2481 -0
- package/deps/librdkafka/LICENSE +26 -0
- package/deps/librdkafka/LICENSE.cjson +22 -0
- package/deps/librdkafka/LICENSE.crc32c +28 -0
- package/deps/librdkafka/LICENSE.fnv1a +18 -0
- package/deps/librdkafka/LICENSE.hdrhistogram +27 -0
- package/deps/librdkafka/LICENSE.lz4 +26 -0
- package/deps/librdkafka/LICENSE.murmur2 +25 -0
- package/deps/librdkafka/LICENSE.nanopb +22 -0
- package/deps/librdkafka/LICENSE.opentelemetry +203 -0
- package/deps/librdkafka/LICENSE.pycrc +23 -0
- package/deps/librdkafka/LICENSE.queue +31 -0
- package/deps/librdkafka/LICENSE.regexp +5 -0
- package/deps/librdkafka/LICENSE.snappy +36 -0
- package/deps/librdkafka/LICENSE.tinycthread +26 -0
- package/deps/librdkafka/LICENSE.wingetopt +49 -0
- package/deps/librdkafka/LICENSES.txt +625 -0
- package/deps/librdkafka/Makefile +125 -0
- package/deps/librdkafka/README.md +199 -0
- package/deps/librdkafka/README.win32 +26 -0
- package/deps/librdkafka/STATISTICS.md +624 -0
- package/deps/librdkafka/configure +214 -0
- package/deps/librdkafka/configure.self +331 -0
- package/deps/librdkafka/debian/changelog +111 -0
- package/deps/librdkafka/debian/compat +1 -0
- package/deps/librdkafka/debian/control +71 -0
- package/deps/librdkafka/debian/copyright +99 -0
- package/deps/librdkafka/debian/gbp.conf +9 -0
- package/deps/librdkafka/debian/librdkafka++1.install +1 -0
- package/deps/librdkafka/debian/librdkafka-dev.examples +2 -0
- package/deps/librdkafka/debian/librdkafka-dev.install +9 -0
- package/deps/librdkafka/debian/librdkafka1.docs +5 -0
- package/deps/librdkafka/debian/librdkafka1.install +1 -0
- package/deps/librdkafka/debian/librdkafka1.symbols +135 -0
- package/deps/librdkafka/debian/rules +19 -0
- package/deps/librdkafka/debian/source/format +1 -0
- package/deps/librdkafka/debian/watch +2 -0
- package/deps/librdkafka/dev-conf.sh +123 -0
- package/deps/librdkafka/examples/CMakeLists.txt +79 -0
- package/deps/librdkafka/examples/Makefile +167 -0
- package/deps/librdkafka/examples/README.md +42 -0
- package/deps/librdkafka/examples/alter_consumer_group_offsets.c +338 -0
- package/deps/librdkafka/examples/consumer.c +271 -0
- package/deps/librdkafka/examples/delete_records.c +233 -0
- package/deps/librdkafka/examples/describe_cluster.c +322 -0
- package/deps/librdkafka/examples/describe_consumer_groups.c +455 -0
- package/deps/librdkafka/examples/describe_topics.c +427 -0
- package/deps/librdkafka/examples/elect_leaders.c +317 -0
- package/deps/librdkafka/examples/globals.json +11 -0
- package/deps/librdkafka/examples/idempotent_producer.c +344 -0
- package/deps/librdkafka/examples/incremental_alter_configs.c +347 -0
- package/deps/librdkafka/examples/kafkatest_verifiable_client.cpp +945 -0
- package/deps/librdkafka/examples/list_consumer_group_offsets.c +359 -0
- package/deps/librdkafka/examples/list_consumer_groups.c +365 -0
- package/deps/librdkafka/examples/list_offsets.c +327 -0
- package/deps/librdkafka/examples/misc.c +287 -0
- package/deps/librdkafka/examples/openssl_engine_example.cpp +248 -0
- package/deps/librdkafka/examples/producer.c +251 -0
- package/deps/librdkafka/examples/producer.cpp +228 -0
- package/deps/librdkafka/examples/rdkafka_complex_consumer_example.c +617 -0
- package/deps/librdkafka/examples/rdkafka_complex_consumer_example.cpp +467 -0
- package/deps/librdkafka/examples/rdkafka_consume_batch.cpp +264 -0
- package/deps/librdkafka/examples/rdkafka_example.c +853 -0
- package/deps/librdkafka/examples/rdkafka_example.cpp +679 -0
- package/deps/librdkafka/examples/rdkafka_performance.c +1781 -0
- package/deps/librdkafka/examples/transactions-older-broker.c +668 -0
- package/deps/librdkafka/examples/transactions.c +665 -0
- package/deps/librdkafka/examples/user_scram.c +491 -0
- package/deps/librdkafka/examples/win_ssl_cert_store.cpp +396 -0
- package/deps/librdkafka/lds-gen.py +73 -0
- package/deps/librdkafka/mainpage.doxy +40 -0
- package/deps/librdkafka/mklove/Makefile.base +329 -0
- package/deps/librdkafka/mklove/modules/configure.atomics +144 -0
- package/deps/librdkafka/mklove/modules/configure.base +2484 -0
- package/deps/librdkafka/mklove/modules/configure.builtin +70 -0
- package/deps/librdkafka/mklove/modules/configure.cc +186 -0
- package/deps/librdkafka/mklove/modules/configure.cxx +8 -0
- package/deps/librdkafka/mklove/modules/configure.fileversion +65 -0
- package/deps/librdkafka/mklove/modules/configure.gitversion +29 -0
- package/deps/librdkafka/mklove/modules/configure.good_cflags +18 -0
- package/deps/librdkafka/mklove/modules/configure.host +132 -0
- package/deps/librdkafka/mklove/modules/configure.lib +49 -0
- package/deps/librdkafka/mklove/modules/configure.libcurl +99 -0
- package/deps/librdkafka/mklove/modules/configure.libsasl2 +36 -0
- package/deps/librdkafka/mklove/modules/configure.libssl +147 -0
- package/deps/librdkafka/mklove/modules/configure.libzstd +58 -0
- package/deps/librdkafka/mklove/modules/configure.parseversion +95 -0
- package/deps/librdkafka/mklove/modules/configure.pic +16 -0
- package/deps/librdkafka/mklove/modules/configure.socket +20 -0
- package/deps/librdkafka/mklove/modules/configure.zlib +61 -0
- package/deps/librdkafka/mklove/modules/patches/README.md +8 -0
- package/deps/librdkafka/mklove/modules/patches/libcurl.0000-no-runtime-linking-check.patch +11 -0
- package/deps/librdkafka/mklove/modules/patches/libssl.0000-osx-rand-include-fix-OpenSSL-PR16409.patch +56 -0
- package/deps/librdkafka/packaging/RELEASE.md +319 -0
- package/deps/librdkafka/packaging/alpine/build-alpine.sh +38 -0
- package/deps/librdkafka/packaging/archlinux/PKGBUILD +30 -0
- package/deps/librdkafka/packaging/cmake/Config.cmake.in +37 -0
- package/deps/librdkafka/packaging/cmake/Modules/FindLZ4.cmake +38 -0
- package/deps/librdkafka/packaging/cmake/Modules/FindZSTD.cmake +27 -0
- package/deps/librdkafka/packaging/cmake/Modules/LICENSE.FindZstd +178 -0
- package/deps/librdkafka/packaging/cmake/README.md +38 -0
- package/deps/librdkafka/packaging/cmake/config.h.in +52 -0
- package/deps/librdkafka/packaging/cmake/parseversion.cmake +60 -0
- package/deps/librdkafka/packaging/cmake/rdkafka.pc.in +12 -0
- package/deps/librdkafka/packaging/cmake/try_compile/atomic_32_test.c +8 -0
- package/deps/librdkafka/packaging/cmake/try_compile/atomic_64_test.c +8 -0
- package/deps/librdkafka/packaging/cmake/try_compile/c11threads_test.c +14 -0
- package/deps/librdkafka/packaging/cmake/try_compile/crc32c_hw_test.c +27 -0
- package/deps/librdkafka/packaging/cmake/try_compile/dlopen_test.c +11 -0
- package/deps/librdkafka/packaging/cmake/try_compile/libsasl2_test.c +7 -0
- package/deps/librdkafka/packaging/cmake/try_compile/pthread_setname_darwin_test.c +6 -0
- package/deps/librdkafka/packaging/cmake/try_compile/pthread_setname_freebsd_test.c +7 -0
- package/deps/librdkafka/packaging/cmake/try_compile/pthread_setname_gnu_test.c +5 -0
- package/deps/librdkafka/packaging/cmake/try_compile/rand_r_test.c +7 -0
- package/deps/librdkafka/packaging/cmake/try_compile/rdkafka_setup.cmake +122 -0
- package/deps/librdkafka/packaging/cmake/try_compile/regex_test.c +10 -0
- package/deps/librdkafka/packaging/cmake/try_compile/strndup_test.c +5 -0
- package/deps/librdkafka/packaging/cmake/try_compile/sync_32_test.c +8 -0
- package/deps/librdkafka/packaging/cmake/try_compile/sync_64_test.c +8 -0
- package/deps/librdkafka/packaging/cp/README.md +16 -0
- package/deps/librdkafka/packaging/cp/check_features.c +72 -0
- package/deps/librdkafka/packaging/cp/verify-deb.sh +33 -0
- package/deps/librdkafka/packaging/cp/verify-packages.sh +69 -0
- package/deps/librdkafka/packaging/cp/verify-rpm.sh +32 -0
- package/deps/librdkafka/packaging/debian/changelog +66 -0
- package/deps/librdkafka/packaging/debian/compat +1 -0
- package/deps/librdkafka/packaging/debian/control +49 -0
- package/deps/librdkafka/packaging/debian/copyright +84 -0
- package/deps/librdkafka/packaging/debian/docs +5 -0
- package/deps/librdkafka/packaging/debian/gbp.conf +9 -0
- package/deps/librdkafka/packaging/debian/librdkafka-dev.dirs +2 -0
- package/deps/librdkafka/packaging/debian/librdkafka-dev.examples +2 -0
- package/deps/librdkafka/packaging/debian/librdkafka-dev.install +6 -0
- package/deps/librdkafka/packaging/debian/librdkafka-dev.substvars +1 -0
- package/deps/librdkafka/packaging/debian/librdkafka.dsc +16 -0
- package/deps/librdkafka/packaging/debian/librdkafka1-dbg.substvars +1 -0
- package/deps/librdkafka/packaging/debian/librdkafka1.dirs +1 -0
- package/deps/librdkafka/packaging/debian/librdkafka1.install +2 -0
- package/deps/librdkafka/packaging/debian/librdkafka1.postinst.debhelper +5 -0
- package/deps/librdkafka/packaging/debian/librdkafka1.postrm.debhelper +5 -0
- package/deps/librdkafka/packaging/debian/librdkafka1.symbols +64 -0
- package/deps/librdkafka/packaging/debian/rules +19 -0
- package/deps/librdkafka/packaging/debian/source/format +1 -0
- package/deps/librdkafka/packaging/debian/watch +2 -0
- package/deps/librdkafka/packaging/get_version.py +21 -0
- package/deps/librdkafka/packaging/homebrew/README.md +15 -0
- package/deps/librdkafka/packaging/homebrew/brew-update-pr.sh +31 -0
- package/deps/librdkafka/packaging/mingw-w64/configure-build-msys2-mingw-static.sh +52 -0
- package/deps/librdkafka/packaging/mingw-w64/configure-build-msys2-mingw.sh +21 -0
- package/deps/librdkafka/packaging/mingw-w64/export-variables.sh +13 -0
- package/deps/librdkafka/packaging/mingw-w64/run-tests.sh +6 -0
- package/deps/librdkafka/packaging/mingw-w64/semaphoreci-build.sh +38 -0
- package/deps/librdkafka/packaging/nuget/README.md +84 -0
- package/deps/librdkafka/packaging/nuget/artifact.py +177 -0
- package/deps/librdkafka/packaging/nuget/cleanup-s3.py +143 -0
- package/deps/librdkafka/packaging/nuget/common/p-common__plat-windows__arch-win32__bldtype-Release/msvcr120.zip +0 -0
- package/deps/librdkafka/packaging/nuget/common/p-common__plat-windows__arch-win32__bldtype-Release/msvcr140.zip +0 -0
- package/deps/librdkafka/packaging/nuget/common/p-common__plat-windows__arch-x64__bldtype-Release/msvcr120.zip +0 -0
- package/deps/librdkafka/packaging/nuget/common/p-common__plat-windows__arch-x64__bldtype-Release/msvcr140.zip +0 -0
- package/deps/librdkafka/packaging/nuget/nuget.sh +21 -0
- package/deps/librdkafka/packaging/nuget/nugetpackage.py +278 -0
- package/deps/librdkafka/packaging/nuget/packaging.py +448 -0
- package/deps/librdkafka/packaging/nuget/push-to-nuget.sh +21 -0
- package/deps/librdkafka/packaging/nuget/release.py +167 -0
- package/deps/librdkafka/packaging/nuget/requirements.txt +3 -0
- package/deps/librdkafka/packaging/nuget/staticpackage.py +178 -0
- package/deps/librdkafka/packaging/nuget/templates/librdkafka.redist.nuspec +21 -0
- package/deps/librdkafka/packaging/nuget/templates/librdkafka.redist.props +18 -0
- package/deps/librdkafka/packaging/nuget/templates/librdkafka.redist.targets +19 -0
- package/deps/librdkafka/packaging/nuget/zfile/__init__.py +0 -0
- package/deps/librdkafka/packaging/nuget/zfile/zfile.py +98 -0
- package/deps/librdkafka/packaging/rpm/Makefile +92 -0
- package/deps/librdkafka/packaging/rpm/README.md +23 -0
- package/deps/librdkafka/packaging/rpm/el7-x86_64.cfg +40 -0
- package/deps/librdkafka/packaging/rpm/librdkafka.spec +118 -0
- package/deps/librdkafka/packaging/rpm/mock-on-docker.sh +96 -0
- package/deps/librdkafka/packaging/rpm/tests/Makefile +25 -0
- package/deps/librdkafka/packaging/rpm/tests/README.md +8 -0
- package/deps/librdkafka/packaging/rpm/tests/run-test.sh +42 -0
- package/deps/librdkafka/packaging/rpm/tests/test-on-docker.sh +56 -0
- package/deps/librdkafka/packaging/rpm/tests/test.c +77 -0
- package/deps/librdkafka/packaging/rpm/tests/test.cpp +34 -0
- package/deps/librdkafka/packaging/tools/Dockerfile +31 -0
- package/deps/librdkafka/packaging/tools/build-configurations-checks.sh +12 -0
- package/deps/librdkafka/packaging/tools/build-deb-package.sh +64 -0
- package/deps/librdkafka/packaging/tools/build-debian.sh +65 -0
- package/deps/librdkafka/packaging/tools/build-manylinux.sh +68 -0
- package/deps/librdkafka/packaging/tools/build-release-artifacts.sh +139 -0
- package/deps/librdkafka/packaging/tools/distro-build.sh +38 -0
- package/deps/librdkafka/packaging/tools/gh-release-checksums.py +39 -0
- package/deps/librdkafka/packaging/tools/rdutcoverage.sh +25 -0
- package/deps/librdkafka/packaging/tools/requirements.txt +2 -0
- package/deps/librdkafka/packaging/tools/run-in-docker.sh +28 -0
- package/deps/librdkafka/packaging/tools/run-integration-tests.sh +31 -0
- package/deps/librdkafka/packaging/tools/run-style-check.sh +4 -0
- package/deps/librdkafka/packaging/tools/style-format.sh +149 -0
- package/deps/librdkafka/packaging/tools/update_rpcs_max_versions.py +100 -0
- package/deps/librdkafka/service.yml +172 -0
- package/deps/librdkafka/src/CMakeLists.txt +374 -0
- package/deps/librdkafka/src/Makefile +103 -0
- package/deps/librdkafka/src/README.lz4.md +30 -0
- package/deps/librdkafka/src/cJSON.c +2834 -0
- package/deps/librdkafka/src/cJSON.h +398 -0
- package/deps/librdkafka/src/crc32c.c +430 -0
- package/deps/librdkafka/src/crc32c.h +38 -0
- package/deps/librdkafka/src/generate_proto.sh +66 -0
- package/deps/librdkafka/src/librdkafka_cgrp_synch.png +0 -0
- package/deps/librdkafka/src/lz4.c +2727 -0
- package/deps/librdkafka/src/lz4.h +842 -0
- package/deps/librdkafka/src/lz4frame.c +2078 -0
- package/deps/librdkafka/src/lz4frame.h +692 -0
- package/deps/librdkafka/src/lz4frame_static.h +47 -0
- package/deps/librdkafka/src/lz4hc.c +1631 -0
- package/deps/librdkafka/src/lz4hc.h +413 -0
- package/deps/librdkafka/src/nanopb/pb.h +917 -0
- package/deps/librdkafka/src/nanopb/pb_common.c +388 -0
- package/deps/librdkafka/src/nanopb/pb_common.h +49 -0
- package/deps/librdkafka/src/nanopb/pb_decode.c +1727 -0
- package/deps/librdkafka/src/nanopb/pb_decode.h +193 -0
- package/deps/librdkafka/src/nanopb/pb_encode.c +1000 -0
- package/deps/librdkafka/src/nanopb/pb_encode.h +185 -0
- package/deps/librdkafka/src/opentelemetry/common.pb.c +32 -0
- package/deps/librdkafka/src/opentelemetry/common.pb.h +170 -0
- package/deps/librdkafka/src/opentelemetry/metrics.options +2 -0
- package/deps/librdkafka/src/opentelemetry/metrics.pb.c +67 -0
- package/deps/librdkafka/src/opentelemetry/metrics.pb.h +966 -0
- package/deps/librdkafka/src/opentelemetry/resource.pb.c +12 -0
- package/deps/librdkafka/src/opentelemetry/resource.pb.h +58 -0
- package/deps/librdkafka/src/queue.h +850 -0
- package/deps/librdkafka/src/rd.h +584 -0
- package/deps/librdkafka/src/rdaddr.c +255 -0
- package/deps/librdkafka/src/rdaddr.h +202 -0
- package/deps/librdkafka/src/rdatomic.h +230 -0
- package/deps/librdkafka/src/rdavg.h +260 -0
- package/deps/librdkafka/src/rdavl.c +210 -0
- package/deps/librdkafka/src/rdavl.h +250 -0
- package/deps/librdkafka/src/rdbase64.c +200 -0
- package/deps/librdkafka/src/rdbase64.h +43 -0
- package/deps/librdkafka/src/rdbuf.c +1884 -0
- package/deps/librdkafka/src/rdbuf.h +375 -0
- package/deps/librdkafka/src/rdcrc32.c +114 -0
- package/deps/librdkafka/src/rdcrc32.h +170 -0
- package/deps/librdkafka/src/rddl.c +179 -0
- package/deps/librdkafka/src/rddl.h +43 -0
- package/deps/librdkafka/src/rdendian.h +175 -0
- package/deps/librdkafka/src/rdfloat.h +67 -0
- package/deps/librdkafka/src/rdfnv1a.c +113 -0
- package/deps/librdkafka/src/rdfnv1a.h +35 -0
- package/deps/librdkafka/src/rdgz.c +120 -0
- package/deps/librdkafka/src/rdgz.h +46 -0
- package/deps/librdkafka/src/rdhdrhistogram.c +721 -0
- package/deps/librdkafka/src/rdhdrhistogram.h +87 -0
- package/deps/librdkafka/src/rdhttp.c +830 -0
- package/deps/librdkafka/src/rdhttp.h +101 -0
- package/deps/librdkafka/src/rdinterval.h +177 -0
- package/deps/librdkafka/src/rdkafka.c +5505 -0
- package/deps/librdkafka/src/rdkafka.h +10686 -0
- package/deps/librdkafka/src/rdkafka_admin.c +9794 -0
- package/deps/librdkafka/src/rdkafka_admin.h +661 -0
- package/deps/librdkafka/src/rdkafka_assignment.c +1010 -0
- package/deps/librdkafka/src/rdkafka_assignment.h +73 -0
- package/deps/librdkafka/src/rdkafka_assignor.c +1786 -0
- package/deps/librdkafka/src/rdkafka_assignor.h +402 -0
- package/deps/librdkafka/src/rdkafka_aux.c +409 -0
- package/deps/librdkafka/src/rdkafka_aux.h +174 -0
- package/deps/librdkafka/src/rdkafka_background.c +221 -0
- package/deps/librdkafka/src/rdkafka_broker.c +6337 -0
- package/deps/librdkafka/src/rdkafka_broker.h +744 -0
- package/deps/librdkafka/src/rdkafka_buf.c +543 -0
- package/deps/librdkafka/src/rdkafka_buf.h +1525 -0
- package/deps/librdkafka/src/rdkafka_cert.c +576 -0
- package/deps/librdkafka/src/rdkafka_cert.h +62 -0
- package/deps/librdkafka/src/rdkafka_cgrp.c +7587 -0
- package/deps/librdkafka/src/rdkafka_cgrp.h +477 -0
- package/deps/librdkafka/src/rdkafka_conf.c +4880 -0
- package/deps/librdkafka/src/rdkafka_conf.h +732 -0
- package/deps/librdkafka/src/rdkafka_confval.h +97 -0
- package/deps/librdkafka/src/rdkafka_coord.c +623 -0
- package/deps/librdkafka/src/rdkafka_coord.h +132 -0
- package/deps/librdkafka/src/rdkafka_error.c +228 -0
- package/deps/librdkafka/src/rdkafka_error.h +80 -0
- package/deps/librdkafka/src/rdkafka_event.c +502 -0
- package/deps/librdkafka/src/rdkafka_event.h +126 -0
- package/deps/librdkafka/src/rdkafka_feature.c +898 -0
- package/deps/librdkafka/src/rdkafka_feature.h +104 -0
- package/deps/librdkafka/src/rdkafka_fetcher.c +1422 -0
- package/deps/librdkafka/src/rdkafka_fetcher.h +44 -0
- package/deps/librdkafka/src/rdkafka_header.c +220 -0
- package/deps/librdkafka/src/rdkafka_header.h +76 -0
- package/deps/librdkafka/src/rdkafka_idempotence.c +807 -0
- package/deps/librdkafka/src/rdkafka_idempotence.h +144 -0
- package/deps/librdkafka/src/rdkafka_int.h +1260 -0
- package/deps/librdkafka/src/rdkafka_interceptor.c +819 -0
- package/deps/librdkafka/src/rdkafka_interceptor.h +104 -0
- package/deps/librdkafka/src/rdkafka_lz4.c +450 -0
- package/deps/librdkafka/src/rdkafka_lz4.h +49 -0
- package/deps/librdkafka/src/rdkafka_metadata.c +2209 -0
- package/deps/librdkafka/src/rdkafka_metadata.h +345 -0
- package/deps/librdkafka/src/rdkafka_metadata_cache.c +1183 -0
- package/deps/librdkafka/src/rdkafka_mock.c +3661 -0
- package/deps/librdkafka/src/rdkafka_mock.h +610 -0
- package/deps/librdkafka/src/rdkafka_mock_cgrp.c +1876 -0
- package/deps/librdkafka/src/rdkafka_mock_handlers.c +3113 -0
- package/deps/librdkafka/src/rdkafka_mock_int.h +710 -0
- package/deps/librdkafka/src/rdkafka_msg.c +2589 -0
- package/deps/librdkafka/src/rdkafka_msg.h +614 -0
- package/deps/librdkafka/src/rdkafka_msgbatch.h +62 -0
- package/deps/librdkafka/src/rdkafka_msgset.h +98 -0
- package/deps/librdkafka/src/rdkafka_msgset_reader.c +1806 -0
- package/deps/librdkafka/src/rdkafka_msgset_writer.c +1474 -0
- package/deps/librdkafka/src/rdkafka_offset.c +1565 -0
- package/deps/librdkafka/src/rdkafka_offset.h +150 -0
- package/deps/librdkafka/src/rdkafka_op.c +997 -0
- package/deps/librdkafka/src/rdkafka_op.h +858 -0
- package/deps/librdkafka/src/rdkafka_partition.c +4896 -0
- package/deps/librdkafka/src/rdkafka_partition.h +1182 -0
- package/deps/librdkafka/src/rdkafka_pattern.c +228 -0
- package/deps/librdkafka/src/rdkafka_pattern.h +70 -0
- package/deps/librdkafka/src/rdkafka_plugin.c +213 -0
- package/deps/librdkafka/src/rdkafka_plugin.h +41 -0
- package/deps/librdkafka/src/rdkafka_proto.h +736 -0
- package/deps/librdkafka/src/rdkafka_protocol.h +128 -0
- package/deps/librdkafka/src/rdkafka_queue.c +1230 -0
- package/deps/librdkafka/src/rdkafka_queue.h +1220 -0
- package/deps/librdkafka/src/rdkafka_range_assignor.c +1748 -0
- package/deps/librdkafka/src/rdkafka_request.c +7089 -0
- package/deps/librdkafka/src/rdkafka_request.h +732 -0
- package/deps/librdkafka/src/rdkafka_roundrobin_assignor.c +123 -0
- package/deps/librdkafka/src/rdkafka_sasl.c +530 -0
- package/deps/librdkafka/src/rdkafka_sasl.h +63 -0
- package/deps/librdkafka/src/rdkafka_sasl_cyrus.c +722 -0
- package/deps/librdkafka/src/rdkafka_sasl_int.h +89 -0
- package/deps/librdkafka/src/rdkafka_sasl_oauthbearer.c +1833 -0
- package/deps/librdkafka/src/rdkafka_sasl_oauthbearer.h +52 -0
- package/deps/librdkafka/src/rdkafka_sasl_oauthbearer_oidc.c +1666 -0
- package/deps/librdkafka/src/rdkafka_sasl_oauthbearer_oidc.h +47 -0
- package/deps/librdkafka/src/rdkafka_sasl_plain.c +142 -0
- package/deps/librdkafka/src/rdkafka_sasl_scram.c +858 -0
- package/deps/librdkafka/src/rdkafka_sasl_win32.c +550 -0
- package/deps/librdkafka/src/rdkafka_ssl.c +2129 -0
- package/deps/librdkafka/src/rdkafka_ssl.h +86 -0
- package/deps/librdkafka/src/rdkafka_sticky_assignor.c +4785 -0
- package/deps/librdkafka/src/rdkafka_subscription.c +278 -0
- package/deps/librdkafka/src/rdkafka_telemetry.c +760 -0
- package/deps/librdkafka/src/rdkafka_telemetry.h +52 -0
- package/deps/librdkafka/src/rdkafka_telemetry_decode.c +1053 -0
- package/deps/librdkafka/src/rdkafka_telemetry_decode.h +59 -0
- package/deps/librdkafka/src/rdkafka_telemetry_encode.c +997 -0
- package/deps/librdkafka/src/rdkafka_telemetry_encode.h +301 -0
- package/deps/librdkafka/src/rdkafka_timer.c +402 -0
- package/deps/librdkafka/src/rdkafka_timer.h +117 -0
- package/deps/librdkafka/src/rdkafka_topic.c +2161 -0
- package/deps/librdkafka/src/rdkafka_topic.h +334 -0
- package/deps/librdkafka/src/rdkafka_transport.c +1309 -0
- package/deps/librdkafka/src/rdkafka_transport.h +99 -0
- package/deps/librdkafka/src/rdkafka_transport_int.h +100 -0
- package/deps/librdkafka/src/rdkafka_txnmgr.c +3256 -0
- package/deps/librdkafka/src/rdkafka_txnmgr.h +171 -0
- package/deps/librdkafka/src/rdkafka_zstd.c +226 -0
- package/deps/librdkafka/src/rdkafka_zstd.h +57 -0
- package/deps/librdkafka/src/rdlist.c +576 -0
- package/deps/librdkafka/src/rdlist.h +434 -0
- package/deps/librdkafka/src/rdlog.c +89 -0
- package/deps/librdkafka/src/rdlog.h +41 -0
- package/deps/librdkafka/src/rdmap.c +508 -0
- package/deps/librdkafka/src/rdmap.h +492 -0
- package/deps/librdkafka/src/rdmurmur2.c +167 -0
- package/deps/librdkafka/src/rdmurmur2.h +35 -0
- package/deps/librdkafka/src/rdports.c +61 -0
- package/deps/librdkafka/src/rdports.h +38 -0
- package/deps/librdkafka/src/rdposix.h +250 -0
- package/deps/librdkafka/src/rdrand.c +80 -0
- package/deps/librdkafka/src/rdrand.h +43 -0
- package/deps/librdkafka/src/rdregex.c +156 -0
- package/deps/librdkafka/src/rdregex.h +43 -0
- package/deps/librdkafka/src/rdsignal.h +57 -0
- package/deps/librdkafka/src/rdstring.c +645 -0
- package/deps/librdkafka/src/rdstring.h +98 -0
- package/deps/librdkafka/src/rdsysqueue.h +404 -0
- package/deps/librdkafka/src/rdtime.h +356 -0
- package/deps/librdkafka/src/rdtypes.h +86 -0
- package/deps/librdkafka/src/rdunittest.c +549 -0
- package/deps/librdkafka/src/rdunittest.h +232 -0
- package/deps/librdkafka/src/rdvarint.c +134 -0
- package/deps/librdkafka/src/rdvarint.h +165 -0
- package/deps/librdkafka/src/rdwin32.h +382 -0
- package/deps/librdkafka/src/rdxxhash.c +1030 -0
- package/deps/librdkafka/src/rdxxhash.h +328 -0
- package/deps/librdkafka/src/regexp.c +1352 -0
- package/deps/librdkafka/src/regexp.h +41 -0
- package/deps/librdkafka/src/snappy.c +1866 -0
- package/deps/librdkafka/src/snappy.h +62 -0
- package/deps/librdkafka/src/snappy_compat.h +138 -0
- package/deps/librdkafka/src/statistics_schema.json +444 -0
- package/deps/librdkafka/src/tinycthread.c +932 -0
- package/deps/librdkafka/src/tinycthread.h +503 -0
- package/deps/librdkafka/src/tinycthread_extra.c +199 -0
- package/deps/librdkafka/src/tinycthread_extra.h +212 -0
- package/deps/librdkafka/src/win32_config.h +58 -0
- package/deps/librdkafka/src-cpp/CMakeLists.txt +90 -0
- package/deps/librdkafka/src-cpp/ConfImpl.cpp +84 -0
- package/deps/librdkafka/src-cpp/ConsumerImpl.cpp +244 -0
- package/deps/librdkafka/src-cpp/HandleImpl.cpp +436 -0
- package/deps/librdkafka/src-cpp/HeadersImpl.cpp +48 -0
- package/deps/librdkafka/src-cpp/KafkaConsumerImpl.cpp +296 -0
- package/deps/librdkafka/src-cpp/Makefile +55 -0
- package/deps/librdkafka/src-cpp/MessageImpl.cpp +38 -0
- package/deps/librdkafka/src-cpp/MetadataImpl.cpp +170 -0
- package/deps/librdkafka/src-cpp/ProducerImpl.cpp +197 -0
- package/deps/librdkafka/src-cpp/QueueImpl.cpp +70 -0
- package/deps/librdkafka/src-cpp/README.md +16 -0
- package/deps/librdkafka/src-cpp/RdKafka.cpp +59 -0
- package/deps/librdkafka/src-cpp/TopicImpl.cpp +124 -0
- package/deps/librdkafka/src-cpp/TopicPartitionImpl.cpp +57 -0
- package/deps/librdkafka/src-cpp/rdkafkacpp.h +3797 -0
- package/deps/librdkafka/src-cpp/rdkafkacpp_int.h +1641 -0
- package/deps/librdkafka/tests/0000-unittests.c +72 -0
- package/deps/librdkafka/tests/0001-multiobj.c +102 -0
- package/deps/librdkafka/tests/0002-unkpart.c +244 -0
- package/deps/librdkafka/tests/0003-msgmaxsize.c +173 -0
- package/deps/librdkafka/tests/0004-conf.c +934 -0
- package/deps/librdkafka/tests/0005-order.c +133 -0
- package/deps/librdkafka/tests/0006-symbols.c +163 -0
- package/deps/librdkafka/tests/0007-autotopic.c +136 -0
- package/deps/librdkafka/tests/0008-reqacks.c +179 -0
- package/deps/librdkafka/tests/0009-mock_cluster.c +97 -0
- package/deps/librdkafka/tests/0011-produce_batch.c +753 -0
- package/deps/librdkafka/tests/0012-produce_consume.c +537 -0
- package/deps/librdkafka/tests/0013-null-msgs.c +473 -0
- package/deps/librdkafka/tests/0014-reconsume-191.c +512 -0
- package/deps/librdkafka/tests/0015-offset_seeks.c +172 -0
- package/deps/librdkafka/tests/0016-client_swname.c +181 -0
- package/deps/librdkafka/tests/0017-compression.c +140 -0
- package/deps/librdkafka/tests/0018-cgrp_term.c +338 -0
- package/deps/librdkafka/tests/0019-list_groups.c +289 -0
- package/deps/librdkafka/tests/0020-destroy_hang.c +162 -0
- package/deps/librdkafka/tests/0021-rkt_destroy.c +72 -0
- package/deps/librdkafka/tests/0022-consume_batch.c +279 -0
- package/deps/librdkafka/tests/0025-timers.c +147 -0
- package/deps/librdkafka/tests/0026-consume_pause.c +547 -0
- package/deps/librdkafka/tests/0028-long_topicnames.c +79 -0
- package/deps/librdkafka/tests/0029-assign_offset.c +202 -0
- package/deps/librdkafka/tests/0030-offset_commit.c +589 -0
- package/deps/librdkafka/tests/0031-get_offsets.c +235 -0
- package/deps/librdkafka/tests/0033-regex_subscribe.c +536 -0
- package/deps/librdkafka/tests/0034-offset_reset.c +398 -0
- package/deps/librdkafka/tests/0035-api_version.c +73 -0
- package/deps/librdkafka/tests/0036-partial_fetch.c +87 -0
- package/deps/librdkafka/tests/0037-destroy_hang_local.c +85 -0
- package/deps/librdkafka/tests/0038-performance.c +121 -0
- package/deps/librdkafka/tests/0039-event.c +284 -0
- package/deps/librdkafka/tests/0040-io_event.c +257 -0
- package/deps/librdkafka/tests/0041-fetch_max_bytes.c +97 -0
- package/deps/librdkafka/tests/0042-many_topics.c +252 -0
- package/deps/librdkafka/tests/0043-no_connection.c +77 -0
- package/deps/librdkafka/tests/0044-partition_cnt.c +94 -0
- package/deps/librdkafka/tests/0045-subscribe_update.c +1010 -0
- package/deps/librdkafka/tests/0046-rkt_cache.c +65 -0
- package/deps/librdkafka/tests/0047-partial_buf_tmout.c +98 -0
- package/deps/librdkafka/tests/0048-partitioner.c +283 -0
- package/deps/librdkafka/tests/0049-consume_conn_close.c +162 -0
- package/deps/librdkafka/tests/0050-subscribe_adds.c +145 -0
- package/deps/librdkafka/tests/0051-assign_adds.c +126 -0
- package/deps/librdkafka/tests/0052-msg_timestamps.c +238 -0
- package/deps/librdkafka/tests/0053-stats_cb.cpp +527 -0
- package/deps/librdkafka/tests/0054-offset_time.cpp +236 -0
- package/deps/librdkafka/tests/0055-producer_latency.c +539 -0
- package/deps/librdkafka/tests/0056-balanced_group_mt.c +315 -0
- package/deps/librdkafka/tests/0057-invalid_topic.cpp +112 -0
- package/deps/librdkafka/tests/0058-log.cpp +123 -0
- package/deps/librdkafka/tests/0059-bsearch.cpp +241 -0
- package/deps/librdkafka/tests/0060-op_prio.cpp +163 -0
- package/deps/librdkafka/tests/0061-consumer_lag.cpp +295 -0
- package/deps/librdkafka/tests/0062-stats_event.c +126 -0
- package/deps/librdkafka/tests/0063-clusterid.cpp +180 -0
- package/deps/librdkafka/tests/0064-interceptors.c +481 -0
- package/deps/librdkafka/tests/0065-yield.cpp +140 -0
- package/deps/librdkafka/tests/0066-plugins.cpp +129 -0
- package/deps/librdkafka/tests/0067-empty_topic.cpp +151 -0
- package/deps/librdkafka/tests/0068-produce_timeout.c +136 -0
- package/deps/librdkafka/tests/0069-consumer_add_parts.c +119 -0
- package/deps/librdkafka/tests/0070-null_empty.cpp +197 -0
- package/deps/librdkafka/tests/0072-headers_ut.c +448 -0
- package/deps/librdkafka/tests/0073-headers.c +381 -0
- package/deps/librdkafka/tests/0074-producev.c +87 -0
- package/deps/librdkafka/tests/0075-retry.c +290 -0
- package/deps/librdkafka/tests/0076-produce_retry.c +452 -0
- package/deps/librdkafka/tests/0077-compaction.c +363 -0
- package/deps/librdkafka/tests/0078-c_from_cpp.cpp +96 -0
- package/deps/librdkafka/tests/0079-fork.c +93 -0
- package/deps/librdkafka/tests/0080-admin_ut.c +3095 -0
- package/deps/librdkafka/tests/0081-admin.c +5633 -0
- package/deps/librdkafka/tests/0082-fetch_max_bytes.cpp +137 -0
- package/deps/librdkafka/tests/0083-cb_event.c +233 -0
- package/deps/librdkafka/tests/0084-destroy_flags.c +208 -0
- package/deps/librdkafka/tests/0085-headers.cpp +392 -0
- package/deps/librdkafka/tests/0086-purge.c +368 -0
- package/deps/librdkafka/tests/0088-produce_metadata_timeout.c +162 -0
- package/deps/librdkafka/tests/0089-max_poll_interval.c +511 -0
- package/deps/librdkafka/tests/0090-idempotence.c +171 -0
- package/deps/librdkafka/tests/0091-max_poll_interval_timeout.c +295 -0
- package/deps/librdkafka/tests/0092-mixed_msgver.c +103 -0
- package/deps/librdkafka/tests/0093-holb.c +200 -0
- package/deps/librdkafka/tests/0094-idempotence_msg_timeout.c +231 -0
- package/deps/librdkafka/tests/0095-all_brokers_down.cpp +122 -0
- package/deps/librdkafka/tests/0097-ssl_verify.cpp +658 -0
- package/deps/librdkafka/tests/0098-consumer-txn.cpp +1218 -0
- package/deps/librdkafka/tests/0099-commit_metadata.c +194 -0
- package/deps/librdkafka/tests/0100-thread_interceptors.cpp +195 -0
- package/deps/librdkafka/tests/0101-fetch-from-follower.cpp +446 -0
- package/deps/librdkafka/tests/0102-static_group_rebalance.c +836 -0
- package/deps/librdkafka/tests/0103-transactions.c +1383 -0
- package/deps/librdkafka/tests/0104-fetch_from_follower_mock.c +625 -0
- package/deps/librdkafka/tests/0105-transactions_mock.c +3930 -0
- package/deps/librdkafka/tests/0106-cgrp_sess_timeout.c +318 -0
- package/deps/librdkafka/tests/0107-topic_recreate.c +259 -0
- package/deps/librdkafka/tests/0109-auto_create_topics.cpp +278 -0
- package/deps/librdkafka/tests/0110-batch_size.cpp +182 -0
- package/deps/librdkafka/tests/0111-delay_create_topics.cpp +127 -0
- package/deps/librdkafka/tests/0112-assign_unknown_part.c +87 -0
- package/deps/librdkafka/tests/0113-cooperative_rebalance.cpp +3473 -0
- package/deps/librdkafka/tests/0114-sticky_partitioning.cpp +176 -0
- package/deps/librdkafka/tests/0115-producer_auth.cpp +182 -0
- package/deps/librdkafka/tests/0116-kafkaconsumer_close.cpp +216 -0
- package/deps/librdkafka/tests/0117-mock_errors.c +331 -0
- package/deps/librdkafka/tests/0118-commit_rebalance.c +154 -0
- package/deps/librdkafka/tests/0119-consumer_auth.cpp +167 -0
- package/deps/librdkafka/tests/0120-asymmetric_subscription.c +185 -0
- package/deps/librdkafka/tests/0121-clusterid.c +115 -0
- package/deps/librdkafka/tests/0122-buffer_cleaning_after_rebalance.c +227 -0
- package/deps/librdkafka/tests/0123-connections_max_idle.c +98 -0
- package/deps/librdkafka/tests/0124-openssl_invalid_engine.c +69 -0
- package/deps/librdkafka/tests/0125-immediate_flush.c +144 -0
- package/deps/librdkafka/tests/0126-oauthbearer_oidc.c +528 -0
- package/deps/librdkafka/tests/0127-fetch_queue_backoff.cpp +165 -0
- package/deps/librdkafka/tests/0128-sasl_callback_queue.cpp +125 -0
- package/deps/librdkafka/tests/0129-fetch_aborted_msgs.c +79 -0
- package/deps/librdkafka/tests/0130-store_offsets.c +178 -0
- package/deps/librdkafka/tests/0131-connect_timeout.c +81 -0
- package/deps/librdkafka/tests/0132-strategy_ordering.c +179 -0
- package/deps/librdkafka/tests/0133-ssl_keys.c +150 -0
- package/deps/librdkafka/tests/0134-ssl_provider.c +92 -0
- package/deps/librdkafka/tests/0135-sasl_credentials.cpp +143 -0
- package/deps/librdkafka/tests/0136-resolve_cb.c +181 -0
- package/deps/librdkafka/tests/0137-barrier_batch_consume.c +619 -0
- package/deps/librdkafka/tests/0138-admin_mock.c +281 -0
- package/deps/librdkafka/tests/0139-offset_validation_mock.c +950 -0
- package/deps/librdkafka/tests/0140-commit_metadata.cpp +108 -0
- package/deps/librdkafka/tests/0142-reauthentication.c +515 -0
- package/deps/librdkafka/tests/0143-exponential_backoff_mock.c +552 -0
- package/deps/librdkafka/tests/0144-idempotence_mock.c +373 -0
- package/deps/librdkafka/tests/0145-pause_resume_mock.c +119 -0
- package/deps/librdkafka/tests/0146-metadata_mock.c +505 -0
- package/deps/librdkafka/tests/0147-consumer_group_consumer_mock.c +952 -0
- package/deps/librdkafka/tests/0148-offset_fetch_commit_error_mock.c +563 -0
- package/deps/librdkafka/tests/0149-broker-same-host-port.c +140 -0
- package/deps/librdkafka/tests/0150-telemetry_mock.c +651 -0
- package/deps/librdkafka/tests/0151-purge-brokers.c +566 -0
- package/deps/librdkafka/tests/0152-rebootstrap.c +59 -0
- package/deps/librdkafka/tests/0153-memberid.c +128 -0
- package/deps/librdkafka/tests/1000-unktopic.c +164 -0
- package/deps/librdkafka/tests/8000-idle.cpp +60 -0
- package/deps/librdkafka/tests/8001-fetch_from_follower_mock_manual.c +113 -0
- package/deps/librdkafka/tests/CMakeLists.txt +170 -0
- package/deps/librdkafka/tests/LibrdkafkaTestApp.py +291 -0
- package/deps/librdkafka/tests/Makefile +182 -0
- package/deps/librdkafka/tests/README.md +509 -0
- package/deps/librdkafka/tests/autotest.sh +33 -0
- package/deps/librdkafka/tests/backtrace.gdb +30 -0
- package/deps/librdkafka/tests/broker_version_tests.py +315 -0
- package/deps/librdkafka/tests/buildbox.sh +17 -0
- package/deps/librdkafka/tests/cleanup-checker-tests.sh +20 -0
- package/deps/librdkafka/tests/cluster_testing.py +191 -0
- package/deps/librdkafka/tests/delete-test-topics.sh +56 -0
- package/deps/librdkafka/tests/fixtures/oauthbearer/jwt_assertion_template.json +10 -0
- package/deps/librdkafka/tests/fixtures/ssl/Makefile +8 -0
- package/deps/librdkafka/tests/fixtures/ssl/README.md +13 -0
- package/deps/librdkafka/tests/fixtures/ssl/client.keystore.intermediate.p12 +0 -0
- package/deps/librdkafka/tests/fixtures/ssl/client.keystore.p12 +0 -0
- package/deps/librdkafka/tests/fixtures/ssl/client2.certificate.intermediate.pem +72 -0
- package/deps/librdkafka/tests/fixtures/ssl/client2.certificate.pem +50 -0
- package/deps/librdkafka/tests/fixtures/ssl/client2.intermediate.key +46 -0
- package/deps/librdkafka/tests/fixtures/ssl/client2.key +46 -0
- package/deps/librdkafka/tests/fixtures/ssl/create_keys.sh +168 -0
- package/deps/librdkafka/tests/fuzzers/Makefile +12 -0
- package/deps/librdkafka/tests/fuzzers/README.md +31 -0
- package/deps/librdkafka/tests/fuzzers/fuzz_regex.c +74 -0
- package/deps/librdkafka/tests/fuzzers/helpers.h +90 -0
- package/deps/librdkafka/tests/gen-ssl-certs.sh +165 -0
- package/deps/librdkafka/tests/interactive_broker_version.py +170 -0
- package/deps/librdkafka/tests/interceptor_test/CMakeLists.txt +16 -0
- package/deps/librdkafka/tests/interceptor_test/Makefile +22 -0
- package/deps/librdkafka/tests/interceptor_test/interceptor_test.c +314 -0
- package/deps/librdkafka/tests/interceptor_test/interceptor_test.h +54 -0
- package/deps/librdkafka/tests/java/IncrementalRebalanceCli.java +97 -0
- package/deps/librdkafka/tests/java/Makefile +13 -0
- package/deps/librdkafka/tests/java/Murmur2Cli.java +46 -0
- package/deps/librdkafka/tests/java/README.md +14 -0
- package/deps/librdkafka/tests/java/TransactionProducerCli.java +162 -0
- package/deps/librdkafka/tests/java/run-class.sh +11 -0
- package/deps/librdkafka/tests/librdkafka.suppressions +483 -0
- package/deps/librdkafka/tests/lz4_manual_test.sh +59 -0
- package/deps/librdkafka/tests/multi-broker-version-test.sh +50 -0
- package/deps/librdkafka/tests/parse-refcnt.sh +43 -0
- package/deps/librdkafka/tests/performance_plot.py +115 -0
- package/deps/librdkafka/tests/plugin_test/Makefile +19 -0
- package/deps/librdkafka/tests/plugin_test/plugin_test.c +58 -0
- package/deps/librdkafka/tests/requirements.txt +2 -0
- package/deps/librdkafka/tests/run-all-tests.sh +79 -0
- package/deps/librdkafka/tests/run-consumer-tests.sh +16 -0
- package/deps/librdkafka/tests/run-producer-tests.sh +16 -0
- package/deps/librdkafka/tests/run-test-batches.py +157 -0
- package/deps/librdkafka/tests/run-test.sh +140 -0
- package/deps/librdkafka/tests/rusage.c +249 -0
- package/deps/librdkafka/tests/sasl_test.py +289 -0
- package/deps/librdkafka/tests/scenarios/README.md +6 -0
- package/deps/librdkafka/tests/scenarios/ak23.json +6 -0
- package/deps/librdkafka/tests/scenarios/default.json +5 -0
- package/deps/librdkafka/tests/scenarios/noautocreate.json +5 -0
- package/deps/librdkafka/tests/sockem.c +801 -0
- package/deps/librdkafka/tests/sockem.h +85 -0
- package/deps/librdkafka/tests/sockem_ctrl.c +145 -0
- package/deps/librdkafka/tests/sockem_ctrl.h +61 -0
- package/deps/librdkafka/tests/test.c +7778 -0
- package/deps/librdkafka/tests/test.conf.example +27 -0
- package/deps/librdkafka/tests/test.h +1028 -0
- package/deps/librdkafka/tests/testcpp.cpp +131 -0
- package/deps/librdkafka/tests/testcpp.h +388 -0
- package/deps/librdkafka/tests/testshared.h +416 -0
- package/deps/librdkafka/tests/tools/README.md +4 -0
- package/deps/librdkafka/tests/tools/stats/README.md +21 -0
- package/deps/librdkafka/tests/tools/stats/filter.jq +42 -0
- package/deps/librdkafka/tests/tools/stats/graph.py +150 -0
- package/deps/librdkafka/tests/tools/stats/requirements.txt +3 -0
- package/deps/librdkafka/tests/tools/stats/to_csv.py +124 -0
- package/deps/librdkafka/tests/trivup/trivup-0.14.0.tar.gz +0 -0
- package/deps/librdkafka/tests/until-fail.sh +87 -0
- package/deps/librdkafka/tests/xxxx-assign_partition.c +122 -0
- package/deps/librdkafka/tests/xxxx-metadata.cpp +159 -0
- package/deps/librdkafka/vcpkg.json +23 -0
- package/deps/librdkafka/win32/README.md +5 -0
- package/deps/librdkafka/win32/build-package.bat +3 -0
- package/deps/librdkafka/win32/build.bat +19 -0
- package/deps/librdkafka/win32/common.vcxproj +84 -0
- package/deps/librdkafka/win32/interceptor_test/interceptor_test.vcxproj +87 -0
- package/deps/librdkafka/win32/librdkafka.autopkg.template +54 -0
- package/deps/librdkafka/win32/librdkafka.master.testing.targets +13 -0
- package/deps/librdkafka/win32/librdkafka.sln +226 -0
- package/deps/librdkafka/win32/librdkafka.vcxproj +276 -0
- package/deps/librdkafka/win32/librdkafkacpp/librdkafkacpp.vcxproj +104 -0
- package/deps/librdkafka/win32/msbuild.ps1 +15 -0
- package/deps/librdkafka/win32/openssl_engine_example/openssl_engine_example.vcxproj +132 -0
- package/deps/librdkafka/win32/package-zip.ps1 +46 -0
- package/deps/librdkafka/win32/packages/repositories.config +4 -0
- package/deps/librdkafka/win32/push-package.bat +4 -0
- package/deps/librdkafka/win32/rdkafka_complex_consumer_example_cpp/rdkafka_complex_consumer_example_cpp.vcxproj +67 -0
- package/deps/librdkafka/win32/rdkafka_example/rdkafka_example.vcxproj +97 -0
- package/deps/librdkafka/win32/rdkafka_performance/rdkafka_performance.vcxproj +97 -0
- package/deps/librdkafka/win32/setup-msys2.ps1 +47 -0
- package/deps/librdkafka/win32/setup-vcpkg.ps1 +34 -0
- package/deps/librdkafka/win32/tests/test.conf.example +25 -0
- package/deps/librdkafka/win32/tests/tests.vcxproj +253 -0
- package/deps/librdkafka/win32/win_ssl_cert_store/win_ssl_cert_store.vcxproj +132 -0
- package/deps/librdkafka/win32/wingetopt.c +564 -0
- package/deps/librdkafka/win32/wingetopt.h +101 -0
- package/deps/librdkafka/win32/wintime.h +33 -0
- package/deps/librdkafka.gyp +62 -0
- package/lib/admin.js +233 -0
- package/lib/client.js +573 -0
- package/lib/error.js +500 -0
- package/lib/index.js +34 -0
- package/lib/kafka-consumer-stream.js +397 -0
- package/lib/kafka-consumer.js +698 -0
- package/lib/producer/high-level-producer.js +323 -0
- package/lib/producer-stream.js +307 -0
- package/lib/producer.js +375 -0
- package/lib/tools/ref-counter.js +52 -0
- package/lib/topic-partition.js +88 -0
- package/lib/topic.js +42 -0
- package/lib/util.js +29 -0
- package/package.json +61 -0
- package/prebuilds/darwin-arm64/@point3+node-rdkafka.node +0 -0
- package/prebuilds/linux-x64/@point3+node-rdkafka.node +0 -0
- package/util/configure.js +30 -0
- package/util/get-env.js +6 -0
- package/util/test-compile.js +11 -0
- package/util/test-producer-delivery.js +100 -0
|
@@ -0,0 +1,144 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* librdkafka - Apache Kafka C library
|
|
3
|
+
*
|
|
4
|
+
* Copyright (c) 2012-2022, Magnus Edenhill
|
|
5
|
+
* 2023, Confluent Inc.
|
|
6
|
+
* All rights reserved.
|
|
7
|
+
*
|
|
8
|
+
* Redistribution and use in source and binary forms, with or without
|
|
9
|
+
* modification, are permitted provided that the following conditions are met:
|
|
10
|
+
*
|
|
11
|
+
* 1. Redistributions of source code must retain the above copyright notice,
|
|
12
|
+
* this list of conditions and the following disclaimer.
|
|
13
|
+
* 2. Redistributions in binary form must reproduce the above copyright notice,
|
|
14
|
+
* this list of conditions and the following disclaimer in the documentation
|
|
15
|
+
* and/or other materials provided with the distribution.
|
|
16
|
+
*
|
|
17
|
+
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
|
18
|
+
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
|
19
|
+
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
|
20
|
+
* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
|
|
21
|
+
* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
|
22
|
+
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
|
|
23
|
+
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
|
24
|
+
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
|
|
25
|
+
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
|
26
|
+
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
|
27
|
+
* POSSIBILITY OF SUCH DAMAGE.
|
|
28
|
+
*/
|
|
29
|
+
|
|
30
|
+
#include "test.h"
|
|
31
|
+
|
|
32
|
+
|
|
33
|
+
/**
|
|
34
|
+
* Verify that flush() overrides the linger.ms time.
|
|
35
|
+
*
|
|
36
|
+
*/
|
|
37
|
+
void do_test_flush_overrides_linger_ms_time() {
|
|
38
|
+
rd_kafka_t *rk;
|
|
39
|
+
rd_kafka_conf_t *conf;
|
|
40
|
+
const char *topic = test_mk_topic_name("0125_immediate_flush", 1);
|
|
41
|
+
const int msgcnt = 100;
|
|
42
|
+
int remains = 0;
|
|
43
|
+
test_timing_t t_time;
|
|
44
|
+
|
|
45
|
+
test_conf_init(&conf, NULL, 30);
|
|
46
|
+
|
|
47
|
+
test_conf_set(conf, "linger.ms", "10000");
|
|
48
|
+
rd_kafka_conf_set_dr_msg_cb(conf, test_dr_msg_cb);
|
|
49
|
+
rk = test_create_handle(RD_KAFKA_PRODUCER, conf);
|
|
50
|
+
|
|
51
|
+
test_create_topic_wait_exists(rk, topic, 1, 1, 5000);
|
|
52
|
+
|
|
53
|
+
/* Produce half set of messages without waiting for delivery. */
|
|
54
|
+
test_produce_msgs2_nowait(rk, topic, 0, 0, 0, msgcnt / 2, NULL, 50,
|
|
55
|
+
&remains);
|
|
56
|
+
|
|
57
|
+
TIMING_START(&t_time, "NO_FLUSH");
|
|
58
|
+
do {
|
|
59
|
+
rd_kafka_poll(rk, 1000);
|
|
60
|
+
} while (remains > 0);
|
|
61
|
+
TIMING_ASSERT(&t_time, 10000, 15000);
|
|
62
|
+
|
|
63
|
+
/* Produce remaining messages without waiting for delivery. */
|
|
64
|
+
test_produce_msgs2_nowait(rk, topic, 0, 0, 0, msgcnt / 2, NULL, 50,
|
|
65
|
+
&remains);
|
|
66
|
+
|
|
67
|
+
/* The linger time should be overriden when flushing */
|
|
68
|
+
TIMING_START(&t_time, "FLUSH");
|
|
69
|
+
TEST_CALL_ERR__(rd_kafka_flush(rk, 2000));
|
|
70
|
+
TIMING_ASSERT(&t_time, 0, 2500);
|
|
71
|
+
|
|
72
|
+
rd_kafka_destroy(rk);
|
|
73
|
+
|
|
74
|
+
|
|
75
|
+
/* Verify messages were actually produced by consuming them back. */
|
|
76
|
+
test_consume_msgs_easy(topic, topic, 0, 1, msgcnt, NULL);
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
/**
|
|
80
|
+
* @brief Tests if the first metadata call is able to update leader for the
|
|
81
|
+
* topic or not. If it is not able to update the leader for some partitions,
|
|
82
|
+
* flush call waits for 1s to refresh the leader and then flush is completed.
|
|
83
|
+
* Ideally, it should update in the first call itself.
|
|
84
|
+
*
|
|
85
|
+
* Number of brokers in the cluster should be more than the number of
|
|
86
|
+
* brokers in the bootstrap.servers list for this test case to work correctly
|
|
87
|
+
*
|
|
88
|
+
*/
|
|
89
|
+
void do_test_first_flush_immediate() {
|
|
90
|
+
rd_kafka_mock_cluster_t *mock_cluster;
|
|
91
|
+
rd_kafka_t *produce_rk;
|
|
92
|
+
const char *brokers;
|
|
93
|
+
char *bootstrap_server;
|
|
94
|
+
test_timing_t t_time;
|
|
95
|
+
size_t i;
|
|
96
|
+
rd_kafka_conf_t *conf = NULL;
|
|
97
|
+
const char *topic = test_mk_topic_name("0125_immediate_flush", 1);
|
|
98
|
+
size_t partition_cnt = 9;
|
|
99
|
+
int remains = 0;
|
|
100
|
+
|
|
101
|
+
mock_cluster = test_mock_cluster_new(3, &brokers);
|
|
102
|
+
|
|
103
|
+
for (i = 0; brokers[i]; i++)
|
|
104
|
+
if (brokers[i] == ',' || brokers[i] == ' ')
|
|
105
|
+
break;
|
|
106
|
+
bootstrap_server = rd_strndup(brokers, i);
|
|
107
|
+
|
|
108
|
+
test_conf_init(&conf, NULL, 30);
|
|
109
|
+
rd_kafka_conf_set_dr_msg_cb(conf, test_dr_msg_cb);
|
|
110
|
+
test_conf_set(conf, "bootstrap.servers", bootstrap_server);
|
|
111
|
+
free(bootstrap_server);
|
|
112
|
+
|
|
113
|
+
rd_kafka_mock_topic_create(mock_cluster, topic, partition_cnt, 1);
|
|
114
|
+
|
|
115
|
+
produce_rk = test_create_handle(RD_KAFKA_PRODUCER, conf);
|
|
116
|
+
|
|
117
|
+
for (i = 0; i < partition_cnt; i++) {
|
|
118
|
+
test_produce_msgs2_nowait(produce_rk, topic, 0, i, 0, 1, NULL,
|
|
119
|
+
0, &remains);
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
TIMING_START(&t_time, "FLUSH");
|
|
123
|
+
TEST_CALL_ERR__(rd_kafka_flush(produce_rk, 5000));
|
|
124
|
+
TIMING_ASSERT(&t_time, 0, 999);
|
|
125
|
+
|
|
126
|
+
rd_kafka_destroy(produce_rk);
|
|
127
|
+
test_mock_cluster_destroy(mock_cluster);
|
|
128
|
+
}
|
|
129
|
+
|
|
130
|
+
int main_0125_immediate_flush(int argc, char **argv) {
|
|
131
|
+
|
|
132
|
+
do_test_flush_overrides_linger_ms_time();
|
|
133
|
+
|
|
134
|
+
return 0;
|
|
135
|
+
}
|
|
136
|
+
|
|
137
|
+
int main_0125_immediate_flush_mock(int argc, char **argv) {
|
|
138
|
+
|
|
139
|
+
TEST_SKIP_MOCK_CLUSTER(0);
|
|
140
|
+
|
|
141
|
+
do_test_first_flush_immediate();
|
|
142
|
+
|
|
143
|
+
return 0;
|
|
144
|
+
}
|
|
@@ -0,0 +1,528 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* librdkafka - Apache Kafka C library
|
|
3
|
+
*
|
|
4
|
+
* Copyright (c) 2021-2022, Magnus Edenhill
|
|
5
|
+
* 2025, Confluent Inc.
|
|
6
|
+
* All rights reserved.
|
|
7
|
+
*
|
|
8
|
+
* Redistribution and use in source and binary forms, with or without
|
|
9
|
+
* modification, are permitted provided that the following conditions are met:
|
|
10
|
+
*
|
|
11
|
+
* 1. Redistributions of source code must retain the above copyright notice,
|
|
12
|
+
* this list of conditions and the following disclaimer.
|
|
13
|
+
* 2. Redistributions in binary form must reproduce the above copyright notice,
|
|
14
|
+
* this list of conditions and the following disclaimer in the documentation
|
|
15
|
+
* and/or other materials provided with the distribution.
|
|
16
|
+
*
|
|
17
|
+
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
|
18
|
+
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
|
19
|
+
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
|
20
|
+
* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
|
|
21
|
+
* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
|
22
|
+
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
|
|
23
|
+
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
|
24
|
+
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
|
|
25
|
+
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
|
26
|
+
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
|
27
|
+
* POSSIBILITY OF SUCH DAMAGE.
|
|
28
|
+
*/
|
|
29
|
+
|
|
30
|
+
#include "test.h"
|
|
31
|
+
/* Typical include path would be <librdkafka/rdkafka.h>, but this program
|
|
32
|
+
* is built from within the librdkafka source tree and thus differs. */
|
|
33
|
+
#include "rdkafka.h" /* for Kafka driver */
|
|
34
|
+
|
|
35
|
+
#define TEST_FIXTURES_FOLDER "./fixtures"
|
|
36
|
+
#define TEST_FIXTURES_OAUTHBEARER_FOLDER TEST_FIXTURES_FOLDER "/oauthbearer/"
|
|
37
|
+
#define TEST_FIXTURES_JWT_ASSERTION_TEMPLATE \
|
|
38
|
+
TEST_FIXTURES_OAUTHBEARER_FOLDER "jwt_assertion_template.json"
|
|
39
|
+
|
|
40
|
+
static rd_bool_t error_seen;
|
|
41
|
+
/**
|
|
42
|
+
* @brief After config OIDC, make sure the producer and consumer
|
|
43
|
+
* can work successfully.
|
|
44
|
+
*
|
|
45
|
+
*/
|
|
46
|
+
static void
|
|
47
|
+
do_test_produce_consumer_with_OIDC(const char *test_name,
|
|
48
|
+
const rd_kafka_conf_t *base_conf) {
|
|
49
|
+
const char *topic;
|
|
50
|
+
uint64_t testid;
|
|
51
|
+
rd_kafka_t *p1;
|
|
52
|
+
rd_kafka_t *c1;
|
|
53
|
+
rd_kafka_conf_t *conf;
|
|
54
|
+
|
|
55
|
+
const char *url = test_getenv("VALID_OIDC_URL", NULL);
|
|
56
|
+
|
|
57
|
+
SUB_TEST("Test producer and consumer with oidc configuration: %s",
|
|
58
|
+
test_name);
|
|
59
|
+
|
|
60
|
+
if (!url) {
|
|
61
|
+
SUB_TEST_SKIP(
|
|
62
|
+
"VALID_OIDC_URL environment variable is not set\n");
|
|
63
|
+
return;
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
conf = rd_kafka_conf_dup(base_conf);
|
|
67
|
+
test_conf_set(conf, "sasl.oauthbearer.token.endpoint.url", url);
|
|
68
|
+
|
|
69
|
+
testid = test_id_generate();
|
|
70
|
+
|
|
71
|
+
rd_kafka_conf_set_dr_msg_cb(conf, test_dr_msg_cb);
|
|
72
|
+
|
|
73
|
+
p1 = test_create_handle(RD_KAFKA_PRODUCER, rd_kafka_conf_dup(conf));
|
|
74
|
+
|
|
75
|
+
topic = test_mk_topic_name("0126-oauthbearer_oidc", 1);
|
|
76
|
+
test_create_topic_wait_exists(p1, topic, 1, 3, 5000);
|
|
77
|
+
TEST_SAY("Topic: %s is created\n", topic);
|
|
78
|
+
|
|
79
|
+
test_produce_msgs2(p1, topic, testid, 0, 0, 1, NULL, 0);
|
|
80
|
+
|
|
81
|
+
test_conf_set(conf, "auto.offset.reset", "earliest");
|
|
82
|
+
c1 = test_create_consumer(topic, NULL, conf, NULL);
|
|
83
|
+
test_consumer_subscribe(c1, topic);
|
|
84
|
+
|
|
85
|
+
/* Give it some time to trigger the token refresh. */
|
|
86
|
+
rd_usleep(5 * 1000 * 1000, NULL);
|
|
87
|
+
test_consumer_poll("OIDC.C1", c1, testid, 1, -1, 1, NULL);
|
|
88
|
+
|
|
89
|
+
test_consumer_close(c1);
|
|
90
|
+
|
|
91
|
+
rd_kafka_destroy(p1);
|
|
92
|
+
rd_kafka_destroy(c1);
|
|
93
|
+
SUB_TEST_PASS();
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
|
|
97
|
+
static void
|
|
98
|
+
auth_error_cb(rd_kafka_t *rk, int err, const char *reason, void *opaque) {
|
|
99
|
+
if (err == RD_KAFKA_RESP_ERR__AUTHENTICATION ||
|
|
100
|
+
err == RD_KAFKA_RESP_ERR__ALL_BROKERS_DOWN) {
|
|
101
|
+
TEST_SAY("Expected error: %s: %s\n", rd_kafka_err2str(err),
|
|
102
|
+
reason);
|
|
103
|
+
error_seen = rd_true;
|
|
104
|
+
} else
|
|
105
|
+
TEST_FAIL("Unexpected error: %s: %s", rd_kafka_err2str(err),
|
|
106
|
+
reason);
|
|
107
|
+
rd_kafka_yield(rk);
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
|
|
111
|
+
/**
|
|
112
|
+
* @brief After config OIDC, if the token is expired, make sure
|
|
113
|
+
* the authentication fail as expected.
|
|
114
|
+
*
|
|
115
|
+
*/
|
|
116
|
+
static void do_test_produce_consumer_with_OIDC_expired_token_should_fail(
|
|
117
|
+
const rd_kafka_conf_t *base_conf) {
|
|
118
|
+
rd_kafka_t *c1;
|
|
119
|
+
uint64_t testid;
|
|
120
|
+
rd_kafka_conf_t *conf;
|
|
121
|
+
|
|
122
|
+
const char *expired_url = test_getenv("EXPIRED_TOKEN_OIDC_URL", NULL);
|
|
123
|
+
|
|
124
|
+
SUB_TEST("Test OAUTHBEARER/OIDC failing with expired JWT");
|
|
125
|
+
|
|
126
|
+
if (!expired_url) {
|
|
127
|
+
SUB_TEST_SKIP(
|
|
128
|
+
"EXPIRED_TOKEN_OIDC_URL environment variable is not set\n");
|
|
129
|
+
return;
|
|
130
|
+
}
|
|
131
|
+
|
|
132
|
+
conf = rd_kafka_conf_dup(base_conf);
|
|
133
|
+
|
|
134
|
+
error_seen = rd_false;
|
|
135
|
+
test_conf_set(conf, "sasl.oauthbearer.token.endpoint.url", expired_url);
|
|
136
|
+
|
|
137
|
+
rd_kafka_conf_set_error_cb(conf, auth_error_cb);
|
|
138
|
+
|
|
139
|
+
testid = test_id_generate();
|
|
140
|
+
|
|
141
|
+
c1 = test_create_consumer("OIDC.fail.C1", NULL, conf, NULL);
|
|
142
|
+
|
|
143
|
+
test_consumer_poll_no_msgs("OIDC.fail.C1", c1, testid, 10 * 1000);
|
|
144
|
+
TEST_ASSERT(error_seen);
|
|
145
|
+
|
|
146
|
+
test_consumer_close(c1);
|
|
147
|
+
rd_kafka_destroy(c1);
|
|
148
|
+
SUB_TEST_PASS();
|
|
149
|
+
}
|
|
150
|
+
|
|
151
|
+
|
|
152
|
+
/**
|
|
153
|
+
* @brief After configiguring OIDC, make sure the
|
|
154
|
+
* authentication fails as expected.
|
|
155
|
+
*/
|
|
156
|
+
static void do_test_produce_consumer_with_OIDC_should_fail(
|
|
157
|
+
const char *test_name,
|
|
158
|
+
const rd_kafka_conf_t *base_conf) {
|
|
159
|
+
rd_kafka_t *c1;
|
|
160
|
+
uint64_t testid;
|
|
161
|
+
rd_kafka_conf_t *conf;
|
|
162
|
+
|
|
163
|
+
const char *url = test_getenv("VALID_OIDC_URL", NULL);
|
|
164
|
+
|
|
165
|
+
SUB_TEST("Test authentication failure with oidc configuration: %s",
|
|
166
|
+
test_name);
|
|
167
|
+
if (!url) {
|
|
168
|
+
SUB_TEST_SKIP(
|
|
169
|
+
"VALID_OIDC_URL environment variable is not set\n");
|
|
170
|
+
return;
|
|
171
|
+
}
|
|
172
|
+
|
|
173
|
+
error_seen = rd_false;
|
|
174
|
+
|
|
175
|
+
conf = rd_kafka_conf_dup(base_conf);
|
|
176
|
+
test_conf_set(conf, "sasl.oauthbearer.token.endpoint.url", url);
|
|
177
|
+
|
|
178
|
+
rd_kafka_conf_set_error_cb(conf, auth_error_cb);
|
|
179
|
+
|
|
180
|
+
testid = test_id_generate();
|
|
181
|
+
|
|
182
|
+
c1 = test_create_consumer("OIDC.fail.C1", NULL, conf, NULL);
|
|
183
|
+
|
|
184
|
+
test_consumer_poll_no_msgs("OIDC.fail.C1", c1, testid, 5 * 1000);
|
|
185
|
+
|
|
186
|
+
TEST_ASSERT(error_seen);
|
|
187
|
+
|
|
188
|
+
test_consumer_close(c1);
|
|
189
|
+
rd_kafka_destroy(c1);
|
|
190
|
+
SUB_TEST_PASS();
|
|
191
|
+
}
|
|
192
|
+
|
|
193
|
+
/**
|
|
194
|
+
* @brief After config OIDC, if the token endpoint is not valid, make sure the
|
|
195
|
+
* authentication fail as expected.
|
|
196
|
+
*
|
|
197
|
+
*/
|
|
198
|
+
static void
|
|
199
|
+
do_test_produce_consumer_with_OIDC_should_fail_invalid_token_endpoint(
|
|
200
|
+
const rd_kafka_conf_t *base_conf) {
|
|
201
|
+
rd_kafka_t *c1;
|
|
202
|
+
uint64_t testid;
|
|
203
|
+
rd_kafka_conf_t *conf;
|
|
204
|
+
|
|
205
|
+
const char *invalid_url = test_getenv("INVALID_OIDC_URL", NULL);
|
|
206
|
+
|
|
207
|
+
SUB_TEST("Test OAUTHBEARER/OIDC failing with invalid JWT");
|
|
208
|
+
|
|
209
|
+
if (!invalid_url) {
|
|
210
|
+
SUB_TEST_SKIP(
|
|
211
|
+
"INVALID_OIDC_URL environment variable is not set\n");
|
|
212
|
+
return;
|
|
213
|
+
}
|
|
214
|
+
|
|
215
|
+
conf = rd_kafka_conf_dup(base_conf);
|
|
216
|
+
|
|
217
|
+
error_seen = rd_false;
|
|
218
|
+
|
|
219
|
+
test_conf_set(conf, "sasl.oauthbearer.token.endpoint.url", invalid_url);
|
|
220
|
+
|
|
221
|
+
rd_kafka_conf_set_error_cb(conf, auth_error_cb);
|
|
222
|
+
|
|
223
|
+
testid = test_id_generate();
|
|
224
|
+
|
|
225
|
+
c1 = test_create_consumer("OIDC.fail.C1", NULL, conf, NULL);
|
|
226
|
+
|
|
227
|
+
test_consumer_poll_no_msgs("OIDC.fail.C1", c1, testid, 10 * 1000);
|
|
228
|
+
|
|
229
|
+
TEST_ASSERT(error_seen);
|
|
230
|
+
|
|
231
|
+
test_consumer_close(c1);
|
|
232
|
+
rd_kafka_destroy(c1);
|
|
233
|
+
SUB_TEST_PASS();
|
|
234
|
+
}
|
|
235
|
+
|
|
236
|
+
typedef enum oidc_configuration_jwt_bearer_variation_t {
|
|
237
|
+
/** Use a private key file. */
|
|
238
|
+
OIDC_CONFIGURATION_JWT_BEARER_VARIATION_PRIVATE_KEY_FILE,
|
|
239
|
+
/** Use an encrypted private key file. */
|
|
240
|
+
OIDC_CONFIGURATION_JWT_BEARER_VARIATION_PRIVATE_KEY_FILE_ENCRYPTED,
|
|
241
|
+
/** Use a private key file
|
|
242
|
+
* set as a configuration property. */
|
|
243
|
+
OIDC_CONFIGURATION_JWT_BEARER_VARIATION_PRIVATE_KEY_STRING,
|
|
244
|
+
/** Use an encrypted private key file
|
|
245
|
+
* set as a configuration property. */
|
|
246
|
+
OIDC_CONFIGURATION_JWT_BEARER_VARIATION_PRIVATE_KEY_STRING_ENCRYPTED,
|
|
247
|
+
/** Use a private key file
|
|
248
|
+
* and a template for the JWT assertion. */
|
|
249
|
+
OIDC_CONFIGURATION_JWT_BEARER_VARIATION_TEMPLATE_FILE,
|
|
250
|
+
/** Use a private key file and set the JOSE algorithm to ES256.
|
|
251
|
+
* This variation will fail as the private key is RSA in trivup */
|
|
252
|
+
OIDC_CONFIGURATION_JWT_BEARER_VARIATION_JOSE_ALGORITHM_ES256,
|
|
253
|
+
/** Invalid scope */
|
|
254
|
+
OIDC_CONFIGURATION_JWT_BEARER_VARIATION_INVALID_SCOPE,
|
|
255
|
+
OIDC_CONFIGURATION_JWT_BEARER_VARIATION__CNT
|
|
256
|
+
} oidc_configuration_jwt_bearer_variation_t;
|
|
257
|
+
|
|
258
|
+
#define OIDC_CONFIGURATION_JWT_BEARER_VARIATION__FIRST_FAILING \
|
|
259
|
+
OIDC_CONFIGURATION_JWT_BEARER_VARIATION_JOSE_ALGORITHM_ES256
|
|
260
|
+
|
|
261
|
+
static const char *oidc_configuration_jwt_bearer_variation_name(
|
|
262
|
+
oidc_configuration_jwt_bearer_variation_t variation) {
|
|
263
|
+
rd_assert(
|
|
264
|
+
variation >=
|
|
265
|
+
OIDC_CONFIGURATION_JWT_BEARER_VARIATION_PRIVATE_KEY_FILE &&
|
|
266
|
+
variation < OIDC_CONFIGURATION_JWT_BEARER_VARIATION__CNT);
|
|
267
|
+
static const char *names[] = {
|
|
268
|
+
"private key file", "private key encrypted file",
|
|
269
|
+
"private key pem string", "private key encrypted pem string",
|
|
270
|
+
"template file", "JOSE algorithm ES256",
|
|
271
|
+
"invalid scope"};
|
|
272
|
+
return names[variation];
|
|
273
|
+
}
|
|
274
|
+
|
|
275
|
+
static rd_kafka_conf_t *oidc_configuration_jwt_bearer(
|
|
276
|
+
rd_kafka_conf_t *conf,
|
|
277
|
+
oidc_configuration_jwt_bearer_variation_t variation) {
|
|
278
|
+
char file_content[4096];
|
|
279
|
+
const char *private_key_file =
|
|
280
|
+
test_getenv("OAUTHBEARER_CLIENT_PRIVATE_KEY", NULL);
|
|
281
|
+
const char *private_key_encrypted_file =
|
|
282
|
+
test_getenv("OAUTHBEARER_CLIENT_PRIVATE_KEY_ENCRYPTED", NULL);
|
|
283
|
+
const char *private_key_password =
|
|
284
|
+
test_getenv("OAUTHBEARER_CLIENT_PRIVATE_KEY_PASSWORD", NULL);
|
|
285
|
+
|
|
286
|
+
conf = rd_kafka_conf_dup(conf);
|
|
287
|
+
test_conf_set(conf, "sasl.oauthbearer.grant.type",
|
|
288
|
+
"urn:ietf:params:oauth:grant-type:jwt-bearer");
|
|
289
|
+
/* "sub" isn't mandatory if already defined in the template. */
|
|
290
|
+
if (variation != OIDC_CONFIGURATION_JWT_BEARER_VARIATION_TEMPLATE_FILE)
|
|
291
|
+
test_conf_set(conf, "sasl.oauthbearer.assertion.claim.sub",
|
|
292
|
+
"testuser");
|
|
293
|
+
else
|
|
294
|
+
test_conf_set(conf,
|
|
295
|
+
"sasl.oauthbearer.assertion.jwt.template.file",
|
|
296
|
+
TEST_FIXTURES_JWT_ASSERTION_TEMPLATE);
|
|
297
|
+
|
|
298
|
+
if (variation ==
|
|
299
|
+
OIDC_CONFIGURATION_JWT_BEARER_VARIATION_JOSE_ALGORITHM_ES256)
|
|
300
|
+
test_conf_set(conf, "sasl.oauthbearer.assertion.algorithm",
|
|
301
|
+
"ES256");
|
|
302
|
+
if (variation == OIDC_CONFIGURATION_JWT_BEARER_VARIATION_INVALID_SCOPE)
|
|
303
|
+
test_conf_set(conf, "sasl.oauthbearer.scope", "invalid_scope");
|
|
304
|
+
|
|
305
|
+
switch (variation) {
|
|
306
|
+
case OIDC_CONFIGURATION_JWT_BEARER_VARIATION_PRIVATE_KEY_FILE:
|
|
307
|
+
case OIDC_CONFIGURATION_JWT_BEARER_VARIATION_TEMPLATE_FILE:
|
|
308
|
+
case OIDC_CONFIGURATION_JWT_BEARER_VARIATION_JOSE_ALGORITHM_ES256:
|
|
309
|
+
case OIDC_CONFIGURATION_JWT_BEARER_VARIATION_INVALID_SCOPE:
|
|
310
|
+
if (!private_key_file)
|
|
311
|
+
goto fail;
|
|
312
|
+
|
|
313
|
+
test_conf_set(conf,
|
|
314
|
+
"sasl.oauthbearer.assertion.private.key.file",
|
|
315
|
+
private_key_file);
|
|
316
|
+
break;
|
|
317
|
+
case OIDC_CONFIGURATION_JWT_BEARER_VARIATION_PRIVATE_KEY_FILE_ENCRYPTED:
|
|
318
|
+
if (!private_key_encrypted_file || !private_key_password)
|
|
319
|
+
goto fail;
|
|
320
|
+
test_conf_set(conf,
|
|
321
|
+
"sasl.oauthbearer.assertion.private.key.file",
|
|
322
|
+
private_key_encrypted_file);
|
|
323
|
+
test_conf_set(
|
|
324
|
+
conf, "sasl.oauthbearer.assertion.private.key.passphrase",
|
|
325
|
+
private_key_password);
|
|
326
|
+
break;
|
|
327
|
+
case OIDC_CONFIGURATION_JWT_BEARER_VARIATION_PRIVATE_KEY_STRING:
|
|
328
|
+
if (!private_key_file)
|
|
329
|
+
goto fail;
|
|
330
|
+
TEST_ASSERT(test_read_file(private_key_file, file_content,
|
|
331
|
+
sizeof(file_content)) > 0);
|
|
332
|
+
|
|
333
|
+
test_conf_set(conf,
|
|
334
|
+
"sasl.oauthbearer.assertion.private.key.pem",
|
|
335
|
+
file_content);
|
|
336
|
+
break;
|
|
337
|
+
case OIDC_CONFIGURATION_JWT_BEARER_VARIATION_PRIVATE_KEY_STRING_ENCRYPTED:
|
|
338
|
+
if (!private_key_encrypted_file || !private_key_password)
|
|
339
|
+
goto fail;
|
|
340
|
+
TEST_ASSERT(test_read_file(private_key_file, file_content,
|
|
341
|
+
sizeof(file_content)) > 0);
|
|
342
|
+
|
|
343
|
+
test_conf_set(conf,
|
|
344
|
+
"sasl.oauthbearer.assertion.private.key.pem",
|
|
345
|
+
file_content);
|
|
346
|
+
test_conf_set(
|
|
347
|
+
conf, "sasl.oauthbearer.assertion.private.key.passphrase",
|
|
348
|
+
private_key_password);
|
|
349
|
+
break;
|
|
350
|
+
default:
|
|
351
|
+
rd_assert(!*"Unknown OIDC JWT bearer test variation");
|
|
352
|
+
}
|
|
353
|
+
return conf;
|
|
354
|
+
fail:
|
|
355
|
+
rd_kafka_conf_destroy(conf);
|
|
356
|
+
TEST_WARN("Skipping OIDC JWT bearer test variation: %s",
|
|
357
|
+
oidc_configuration_jwt_bearer_variation_name(variation));
|
|
358
|
+
return NULL;
|
|
359
|
+
}
|
|
360
|
+
|
|
361
|
+
void do_test_produce_consumer_with_OIDC_jwt_bearer(rd_kafka_conf_t *conf) {
|
|
362
|
+
rd_kafka_conf_t *jwt_bearer_conf;
|
|
363
|
+
oidc_configuration_jwt_bearer_variation_t variation;
|
|
364
|
+
for (variation =
|
|
365
|
+
OIDC_CONFIGURATION_JWT_BEARER_VARIATION_PRIVATE_KEY_FILE;
|
|
366
|
+
variation < OIDC_CONFIGURATION_JWT_BEARER_VARIATION__CNT;
|
|
367
|
+
variation++) {
|
|
368
|
+
const char *test_name;
|
|
369
|
+
jwt_bearer_conf =
|
|
370
|
+
oidc_configuration_jwt_bearer(conf, variation);
|
|
371
|
+
if (!jwt_bearer_conf)
|
|
372
|
+
continue;
|
|
373
|
+
|
|
374
|
+
test_name = tsprintf(
|
|
375
|
+
"JWT bearer: %s\n",
|
|
376
|
+
oidc_configuration_jwt_bearer_variation_name(variation));
|
|
377
|
+
|
|
378
|
+
if (variation <
|
|
379
|
+
OIDC_CONFIGURATION_JWT_BEARER_VARIATION__FIRST_FAILING)
|
|
380
|
+
do_test_produce_consumer_with_OIDC(test_name,
|
|
381
|
+
jwt_bearer_conf);
|
|
382
|
+
else
|
|
383
|
+
do_test_produce_consumer_with_OIDC_should_fail(
|
|
384
|
+
test_name, jwt_bearer_conf);
|
|
385
|
+
rd_kafka_conf_destroy(jwt_bearer_conf);
|
|
386
|
+
}
|
|
387
|
+
}
|
|
388
|
+
|
|
389
|
+
|
|
390
|
+
typedef enum oidc_configuration_metadata_authentication_variation_t {
|
|
391
|
+
/** Azure IMDS. Successful case. */
|
|
392
|
+
OIDC_CONFIGURATION_METADATA_AUTHENTICATION_VARIATION_AZURE_IMDS_SUCCESS,
|
|
393
|
+
/** Azure IMDS. Missing client ID. */
|
|
394
|
+
OIDC_CONFIGURATION_METADATA_AUTHENTICATION_VARIATION_AZURE_IMDS_MISSING_CLIENT_ID,
|
|
395
|
+
/** Azure IMDS. Missing resource parameter. */
|
|
396
|
+
OIDC_CONFIGURATION_METADATA_AUTHENTICATION_VARIATION_AZURE_IMDS_MISSING_RESOURCE,
|
|
397
|
+
/** Azure IMDS. Missing API version. */
|
|
398
|
+
OIDC_CONFIGURATION_METADATA_AUTHENTICATION_VARIATION_AZURE_IMDS_MISSING_API_VERSION,
|
|
399
|
+
OIDC_CONFIGURATION_METADATA_AUTHENTICATION_VARIATION__CNT
|
|
400
|
+
} oidc_configuration_metadata_authentication_variation_t;
|
|
401
|
+
|
|
402
|
+
#define OIDC_CONFIGURATION_METADATA_AUTHENTICATION_VARIATION__FIRST_FAILING \
|
|
403
|
+
OIDC_CONFIGURATION_METADATA_AUTHENTICATION_VARIATION_AZURE_IMDS_MISSING_CLIENT_ID
|
|
404
|
+
|
|
405
|
+
static const char *oidc_configuration_metadata_authentication_variation_name(
|
|
406
|
+
oidc_configuration_metadata_authentication_variation_t variation) {
|
|
407
|
+
rd_assert(
|
|
408
|
+
variation >=
|
|
409
|
+
OIDC_CONFIGURATION_METADATA_AUTHENTICATION_VARIATION_AZURE_IMDS_SUCCESS &&
|
|
410
|
+
variation <
|
|
411
|
+
OIDC_CONFIGURATION_METADATA_AUTHENTICATION_VARIATION__CNT);
|
|
412
|
+
static const char *names[] = {
|
|
413
|
+
"Azure IMDS: success", "Azure IMDS: missing client ID",
|
|
414
|
+
"Azure IMDS: missing resource", "Azure IMDS: missing API version"};
|
|
415
|
+
return names[variation];
|
|
416
|
+
}
|
|
417
|
+
|
|
418
|
+
static rd_kafka_conf_t *oidc_configuration_metadata_authentication(
|
|
419
|
+
rd_kafka_conf_t *conf,
|
|
420
|
+
oidc_configuration_metadata_authentication_variation_t variation) {
|
|
421
|
+
conf = rd_kafka_conf_dup(conf);
|
|
422
|
+
switch (variation) {
|
|
423
|
+
case OIDC_CONFIGURATION_METADATA_AUTHENTICATION_VARIATION_AZURE_IMDS_SUCCESS:
|
|
424
|
+
test_conf_set(conf,
|
|
425
|
+
"sasl.oauthbearer.metadata.authentication.type",
|
|
426
|
+
"azure_imds");
|
|
427
|
+
test_conf_set(conf, "sasl.oauthbearer.config",
|
|
428
|
+
"query=__metadata_authentication_type=azure_imds&"
|
|
429
|
+
"api-version=2025-04-07&resource="
|
|
430
|
+
"api://external_resource_id&client_id=client_id");
|
|
431
|
+
break;
|
|
432
|
+
case OIDC_CONFIGURATION_METADATA_AUTHENTICATION_VARIATION_AZURE_IMDS_MISSING_CLIENT_ID:
|
|
433
|
+
test_conf_set(conf,
|
|
434
|
+
"sasl.oauthbearer.metadata.authentication.type",
|
|
435
|
+
"azure_imds");
|
|
436
|
+
test_conf_set(conf, "sasl.oauthbearer.config",
|
|
437
|
+
"query=__metadata_authentication_type=azure_imds&"
|
|
438
|
+
"api-version=2025-04-07&resource="
|
|
439
|
+
"api://external_resource_id");
|
|
440
|
+
break;
|
|
441
|
+
case OIDC_CONFIGURATION_METADATA_AUTHENTICATION_VARIATION_AZURE_IMDS_MISSING_RESOURCE:
|
|
442
|
+
test_conf_set(conf,
|
|
443
|
+
"sasl.oauthbearer.metadata.authentication.type",
|
|
444
|
+
"azure_imds");
|
|
445
|
+
test_conf_set(conf, "sasl.oauthbearer.config",
|
|
446
|
+
"query=__metadata_authentication_type=azure_imds&"
|
|
447
|
+
"api-version=2025-04-07&"
|
|
448
|
+
"client_id=client_id");
|
|
449
|
+
break;
|
|
450
|
+
case OIDC_CONFIGURATION_METADATA_AUTHENTICATION_VARIATION_AZURE_IMDS_MISSING_API_VERSION:
|
|
451
|
+
test_conf_set(conf,
|
|
452
|
+
"sasl.oauthbearer.metadata.authentication.type",
|
|
453
|
+
"azure_imds");
|
|
454
|
+
test_conf_set(conf, "sasl.oauthbearer.config",
|
|
455
|
+
"query=__metadata_authentication_type=azure_imds&"
|
|
456
|
+
"resource="
|
|
457
|
+
"api://external_resource_id&client_id=client_id");
|
|
458
|
+
break;
|
|
459
|
+
default:
|
|
460
|
+
TEST_ASSERT(rd_false,
|
|
461
|
+
"Unknown OIDC metadata authentication type");
|
|
462
|
+
}
|
|
463
|
+
return conf;
|
|
464
|
+
}
|
|
465
|
+
|
|
466
|
+
/* Test metadata-based authentication cases against Trivup. */
|
|
467
|
+
void do_test_produce_consumer_with_OIDC_metadata_authentication(
|
|
468
|
+
rd_kafka_conf_t *conf) {
|
|
469
|
+
rd_kafka_conf_t *metadata_authentication_conf;
|
|
470
|
+
oidc_configuration_metadata_authentication_variation_t variation;
|
|
471
|
+
for (
|
|
472
|
+
variation =
|
|
473
|
+
OIDC_CONFIGURATION_METADATA_AUTHENTICATION_VARIATION_AZURE_IMDS_SUCCESS;
|
|
474
|
+
variation <
|
|
475
|
+
OIDC_CONFIGURATION_METADATA_AUTHENTICATION_VARIATION__CNT;
|
|
476
|
+
variation++) {
|
|
477
|
+
const char *test_name;
|
|
478
|
+
metadata_authentication_conf =
|
|
479
|
+
oidc_configuration_metadata_authentication(conf, variation);
|
|
480
|
+
|
|
481
|
+
test_name = tsprintf(
|
|
482
|
+
"Metadata authentication variation: %s\n",
|
|
483
|
+
oidc_configuration_metadata_authentication_variation_name(
|
|
484
|
+
variation));
|
|
485
|
+
|
|
486
|
+
if (variation <
|
|
487
|
+
OIDC_CONFIGURATION_METADATA_AUTHENTICATION_VARIATION__FIRST_FAILING)
|
|
488
|
+
do_test_produce_consumer_with_OIDC(
|
|
489
|
+
test_name, metadata_authentication_conf);
|
|
490
|
+
else
|
|
491
|
+
do_test_produce_consumer_with_OIDC_should_fail(
|
|
492
|
+
test_name, metadata_authentication_conf);
|
|
493
|
+
rd_kafka_conf_destroy(metadata_authentication_conf);
|
|
494
|
+
}
|
|
495
|
+
}
|
|
496
|
+
|
|
497
|
+
int main_0126_oauthbearer_oidc(int argc, char **argv) {
|
|
498
|
+
rd_kafka_conf_t *conf;
|
|
499
|
+
const char *sec;
|
|
500
|
+
const char *oidc;
|
|
501
|
+
|
|
502
|
+
test_conf_init(&conf, NULL, 60);
|
|
503
|
+
|
|
504
|
+
sec = test_conf_get(conf, "security.protocol");
|
|
505
|
+
if (!strstr(sec, "sasl")) {
|
|
506
|
+
TEST_SKIP("Apache Kafka cluster not configured for SASL\n");
|
|
507
|
+
rd_kafka_conf_destroy(conf);
|
|
508
|
+
return 0;
|
|
509
|
+
}
|
|
510
|
+
|
|
511
|
+
oidc = test_conf_get(conf, "sasl.oauthbearer.method");
|
|
512
|
+
if (rd_strcasecmp(oidc, "OIDC")) {
|
|
513
|
+
TEST_SKIP("`sasl.oauthbearer.method=OIDC` is required\n");
|
|
514
|
+
rd_kafka_conf_destroy(conf);
|
|
515
|
+
return 0;
|
|
516
|
+
}
|
|
517
|
+
|
|
518
|
+
do_test_produce_consumer_with_OIDC("client_credentials", conf);
|
|
519
|
+
do_test_produce_consumer_with_OIDC_should_fail_invalid_token_endpoint(
|
|
520
|
+
conf);
|
|
521
|
+
do_test_produce_consumer_with_OIDC_expired_token_should_fail(conf);
|
|
522
|
+
do_test_produce_consumer_with_OIDC_jwt_bearer(conf);
|
|
523
|
+
do_test_produce_consumer_with_OIDC_metadata_authentication(conf);
|
|
524
|
+
|
|
525
|
+
rd_kafka_conf_destroy(conf);
|
|
526
|
+
|
|
527
|
+
return 0;
|
|
528
|
+
}
|