@ohos-ports/514labs-kafka-javascript 0.0.0-stage → 1.7.1-patch-beta.0
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/.claude/settings.local.json +12 -0
- package/.editorconfig +5 -0
- package/.envrc +1 -0
- package/CHANGELOG.md +380 -0
- package/CONTRIBUTING.md +257 -0
- package/INTRODUCTION.md +1155 -0
- package/LICENSE.kafkajs +31 -0
- package/LICENSE.node-rdkafka +25 -0
- package/LICENSE.txt +20 -0
- package/MIGRATION.md +428 -0
- package/Makefile +84 -0
- package/QUICKSTART.md +70 -0
- package/README.md +127 -2
- package/SECURITY.md +11 -0
- package/binding.gyp +167 -0
- package/buf.gen.yaml +8 -0
- package/build/Release/confluent-kafka-javascript.node +0 -0
- package/configure +15 -0
- package/coverage/mocha/base.css +224 -0
- package/coverage/mocha/block-navigation.js +87 -0
- package/coverage/mocha/coverage-final.json +11 -0
- package/coverage/mocha/favicon.png +0 -0
- package/coverage/mocha/forked-kafkajs/index.html +116 -0
- package/coverage/mocha/forked-kafkajs/lib/client.js.html +2122 -0
- package/coverage/mocha/forked-kafkajs/lib/error.js.html +1588 -0
- package/coverage/mocha/forked-kafkajs/lib/index.html +236 -0
- package/coverage/mocha/forked-kafkajs/lib/kafka-consumer-stream.js.html +1282 -0
- package/coverage/mocha/forked-kafkajs/lib/kafka-consumer.js.html +2476 -0
- package/coverage/mocha/forked-kafkajs/lib/producer-stream.js.html +1096 -0
- package/coverage/mocha/forked-kafkajs/lib/producer.js.html +1300 -0
- package/coverage/mocha/forked-kafkajs/lib/topic-partition.js.html +358 -0
- package/coverage/mocha/forked-kafkajs/lib/topic.js.html +214 -0
- package/coverage/mocha/forked-kafkajs/lib/util.js.html +250 -0
- package/coverage/mocha/forked-kafkajs/librdkafka.js.html +121 -0
- package/coverage/mocha/index.html +131 -0
- package/coverage/mocha/prettify.css +1 -0
- package/coverage/mocha/prettify.js +2 -0
- package/coverage/mocha/sort-arrow-sprite.png +0 -0
- package/coverage/mocha/sorter.js +210 -0
- package/cpplint.py +6970 -0
- package/deploy.enc +0 -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/CHANGELOG.md +2225 -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/dev-conf.sh +123 -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/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 +83 -0
- package/deps/windows-install.py +80 -0
- package/eslint.config.js +75 -0
- package/flake.lock +61 -0
- package/flake.nix +76 -0
- package/index.d.ts +3 -0
- package/jest.config.js +8 -0
- package/jsdoc.conf +23 -0
- package/lib/admin.js +732 -0
- package/lib/client.js +679 -0
- package/lib/error.js +501 -0
- package/lib/index.js +8 -0
- package/lib/kafka-consumer-stream.js +399 -0
- package/lib/kafka-consumer.js +798 -0
- package/lib/kafkajs/_admin.js +1053 -0
- package/lib/kafkajs/_common.js +887 -0
- package/lib/kafkajs/_consumer.js +2143 -0
- package/lib/kafkajs/_consumer_cache.js +310 -0
- package/lib/kafkajs/_error.js +298 -0
- package/lib/kafkajs/_kafka.js +125 -0
- package/lib/kafkajs/_linked-list.js +220 -0
- package/lib/kafkajs/_producer.js +863 -0
- package/lib/kafkajs/index.js +5 -0
- package/lib/producer/high-level-producer.js +400 -0
- package/lib/producer-stream.js +337 -0
- package/lib/producer.js +405 -0
- package/lib/rdkafka.js +44 -0
- package/lib/tools/ref-counter.js +53 -0
- package/lib/topic-partition.js +91 -0
- package/lib/topic.js +43 -0
- package/lib/util.js +55 -0
- package/librdkafka.js +12 -0
- package/make_docs.sh +57 -0
- package/package.json +59 -4
- package/run_docker.sh +42 -0
- package/service.yml +36 -0
- package/sonar-project.properties +9 -0
- package/src/admin.cc +1597 -0
- package/src/admin.h +112 -0
- package/src/binding.cc +76 -0
- package/src/binding.h +25 -0
- package/src/callbacks.cc +676 -0
- package/src/callbacks.h +302 -0
- package/src/common.cc +1601 -0
- package/src/common.h +192 -0
- package/src/config.cc +219 -0
- package/src/config.h +61 -0
- package/src/connection.cc +703 -0
- package/src/connection.h +117 -0
- package/src/errors.cc +119 -0
- package/src/errors.h +60 -0
- package/src/kafka-consumer.cc +1539 -0
- package/src/kafka-consumer.h +147 -0
- package/src/producer.cc +917 -0
- package/src/producer.h +124 -0
- package/src/topic.cc +173 -0
- package/src/topic.h +54 -0
- package/src/workers.cc +1714 -0
- package/src/workers.h +690 -0
- package/tsconfig.json +18 -0
- package/types/config.d.ts +1248 -0
- package/types/errors.d.ts +373 -0
- package/types/kafkajs.d.ts +568 -0
- package/types/rdkafka.d.ts +561 -0
- package/util/configure.js +34 -0
- package/util/generate-docs.sh +18 -0
- package/util/get-env.js +6 -0
- package/util/test-compile.js +11 -0
- package/util/test-producer-delivery.js +100 -0
- package/win_install.ps1 +2 -0
package/.editorconfig
ADDED
package/.envrc
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
use flake
|
package/CHANGELOG.md
ADDED
|
@@ -0,0 +1,380 @@
|
|
|
1
|
+
# confluent-kafka-javascript 1.7.0
|
|
2
|
+
|
|
3
|
+
v1.7.0 is a feature release. It is supported for all usage.
|
|
4
|
+
|
|
5
|
+
### Enhancements
|
|
6
|
+
|
|
7
|
+
1. References librdkafka v2.12.1. Refer to the [librdkafka v2.12.1 release notes](https://github.com/confluentinc/librdkafka/releases/tag/v2.12.1) for more information.
|
|
8
|
+
2. Configurable batch size through the `js.consumer.max.batch.size` property
|
|
9
|
+
and cache size through the `js.consumer.max.cache.size.per.worker.ms`
|
|
10
|
+
property (#393).
|
|
11
|
+
3. Statistics callback now available when using the promisified API with all
|
|
12
|
+
client types (#399).
|
|
13
|
+
4. Fix for at-least-once guarantee not ensured in case a seek happens on one
|
|
14
|
+
partition and there are messages being fetched about other partitions (#393).
|
|
15
|
+
5. Avoid returning a negative lag in case there is no cached offset for
|
|
16
|
+
the HWM (#406).
|
|
17
|
+
|
|
18
|
+
# confluent-kafka-javascript 1.6.0
|
|
19
|
+
|
|
20
|
+
v1.6.0 is a feature release. It is supported for all usage.
|
|
21
|
+
|
|
22
|
+
### Enhancements
|
|
23
|
+
|
|
24
|
+
1. References librdkafka v2.12.0. Refer to the [librdkafka v2.12.0 release notes](https://github.com/confluentinc/librdkafka/releases/tag/v2.12.0) for more information.
|
|
25
|
+
2. OAuth OIDC method example for Kafka metadata based authentication with
|
|
26
|
+
an Azure IMDS endpoint using an attached managed identity as principal (#377).
|
|
27
|
+
|
|
28
|
+
|
|
29
|
+
# confluent-kafka-javascript 1.5.0
|
|
30
|
+
|
|
31
|
+
v1.5.0 is a feature release. It is supported for all usage.
|
|
32
|
+
|
|
33
|
+
### Enhancements
|
|
34
|
+
|
|
35
|
+
1. Adds support for `highWatermark`, `offsetLag()`, and `offsetLagLow()` in `eachBatch` callback (#317).
|
|
36
|
+
|
|
37
|
+
|
|
38
|
+
## Fixes
|
|
39
|
+
|
|
40
|
+
1. Fix issue of delay of up to 5s in receiving messages after pause and resume, or seek (#285, #363).
|
|
41
|
+
|
|
42
|
+
|
|
43
|
+
# confluent-kafka-javascript v1.4.1
|
|
44
|
+
|
|
45
|
+
v1.4.1 is a maintenance release. It is supported for all usage.
|
|
46
|
+
|
|
47
|
+
## Enhancements
|
|
48
|
+
|
|
49
|
+
1. References librdkafka v2.11.1. Refer to the [librdkafka v2.11.1 release notes](https://github.com/confluentinc/librdkafka/releases/tag/v2.11.1) for more information.
|
|
50
|
+
|
|
51
|
+
|
|
52
|
+
# confluent-kafka-javascript v1.4.0
|
|
53
|
+
|
|
54
|
+
v1.4.0 is a feature release. It is supported for all usage.
|
|
55
|
+
|
|
56
|
+
## Enhancements
|
|
57
|
+
|
|
58
|
+
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.
|
|
59
|
+
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).
|
|
60
|
+
3. [KIP-848] Admin API for listing consumer groups now has an optional filter to return only groups of given types (#328).
|
|
61
|
+
4. Add support for Node v24 pre-built binaries (@weyert, #307, #337).
|
|
62
|
+
|
|
63
|
+
|
|
64
|
+
# confluent-kafka-javascript v1.3.2
|
|
65
|
+
|
|
66
|
+
v1.3.2 is a maintenance release. It is supported for all usage.
|
|
67
|
+
|
|
68
|
+
## Enhancements
|
|
69
|
+
|
|
70
|
+
1. References librdkafka v2.10.1. Refer to the [librdkafka v2.10.1 release notes](https://github.com/confluentinc/librdkafka/releases/tag/v2.10.1) for more information.
|
|
71
|
+
2. Support for schema id in header (#303)
|
|
72
|
+
3. Add CEL support for Data Quality rules (#313)
|
|
73
|
+
|
|
74
|
+
## Fixes
|
|
75
|
+
|
|
76
|
+
1. Fix missing await during JSON deserialization (#301)
|
|
77
|
+
2. Fix possible NPE in CSFLE executor (#305)
|
|
78
|
+
|
|
79
|
+
|
|
80
|
+
# confluent-kafka-javascript v1.3.1
|
|
81
|
+
|
|
82
|
+
v1.3.1 is a maintenance release. It is supported for all usage.
|
|
83
|
+
|
|
84
|
+
## Fixes
|
|
85
|
+
|
|
86
|
+
1. Avoid a race condition that causes 100% usage of a CPU core when
|
|
87
|
+
consuming with `partitionsConsumedConcurrently > 1` and all messages
|
|
88
|
+
are consumed (#300)
|
|
89
|
+
2. Fix type definition for `Kafka()` constructor and for passing topic configurations
|
|
90
|
+
to the `producer()` and `consumer()` in the promisified API (@davidkhala, #297, #321).
|
|
91
|
+
|
|
92
|
+
|
|
93
|
+
# confluent-kafka-javascript v1.3.0
|
|
94
|
+
|
|
95
|
+
v1.3.0 is a feature release. It is supported for all usage.
|
|
96
|
+
|
|
97
|
+
## Enhancements
|
|
98
|
+
|
|
99
|
+
1. References librdkafka v2.10.0. Refer to the [librdkafka v2.10.0 release notes](https://github.com/confluentinc/librdkafka/releases/tag/v2.10.0) for more information.
|
|
100
|
+
|
|
101
|
+
## Fixes
|
|
102
|
+
|
|
103
|
+
1. Support Protobuf oneof fields in Data Contract rules (#261)
|
|
104
|
+
2. Ensure use of DEK object is thread-safe (#268)
|
|
105
|
+
3. Fix token fetch to return after successful request (#278)
|
|
106
|
+
4. Add loose OAuth authorization (#289)
|
|
107
|
+
|
|
108
|
+
|
|
109
|
+
# confluent-kafka-javascript v1.2.0
|
|
110
|
+
|
|
111
|
+
v1.2.0 is a feature release. It is supported for all usage.
|
|
112
|
+
|
|
113
|
+
## Enhancements
|
|
114
|
+
|
|
115
|
+
1. Add support for an Admin API to fetch topic offsets by timestamp (#206).
|
|
116
|
+
2. References librdkafka v2.8.0. Refer to the [librdkafka v2.8.0 release notes](https://github.com/confluentinc/librdkafka/releases/tag/v2.8.0) for more information.
|
|
117
|
+
|
|
118
|
+
## Fixes
|
|
119
|
+
|
|
120
|
+
1. Fixes an issue where the `eachBatch` callback was being called for the same partition concurrently (#224).
|
|
121
|
+
2. Uses a Debian based builder instead of an Ubuntu based builder to ensure compatibility with older, but supported versions of Linux (#228).
|
|
122
|
+
|
|
123
|
+
|
|
124
|
+
# confluent-kafka-javascript v1.1.0
|
|
125
|
+
|
|
126
|
+
v1.1.0 is a feature release. It is supported for all usage.
|
|
127
|
+
|
|
128
|
+
## Fixes
|
|
129
|
+
|
|
130
|
+
1. Ensure algorithm query param is passed for CSFLE (#230)
|
|
131
|
+
2. Handle records nested in arrays/maps when searching for tags (#231)
|
|
132
|
+
|
|
133
|
+
|
|
134
|
+
# confluent-kafka-javascript v1.0.0
|
|
135
|
+
|
|
136
|
+
v1.0.0 is a feature release. It is supported for all usage.
|
|
137
|
+
|
|
138
|
+
## Enhancements
|
|
139
|
+
|
|
140
|
+
1. Add support for an Admin API to fetch topic offsets (#156).
|
|
141
|
+
2. Add support for Node v23 pre-built binaries (#158).
|
|
142
|
+
3. Add KafkaJS-compatible errors to promisified Admin API (createTopics, deleteGroups, deleteTopicRecords) (#159).
|
|
143
|
+
4. Include error types within Type definitions for promisified API (#210).
|
|
144
|
+
|
|
145
|
+
## Fixes
|
|
146
|
+
|
|
147
|
+
1. Fixes an issue where `uv_async_init` was being called off the event loop thread,
|
|
148
|
+
causing the node process to hang (#190).
|
|
149
|
+
|
|
150
|
+
|
|
151
|
+
# confluent-kafka-javascript v0.6.1
|
|
152
|
+
|
|
153
|
+
v0.6.1 is a limited availability maintenance release. It is supported for all usage.
|
|
154
|
+
|
|
155
|
+
## Fixes
|
|
156
|
+
|
|
157
|
+
### Schema Registry
|
|
158
|
+
|
|
159
|
+
1. Sync aws-sdk packages to the same versioning.
|
|
160
|
+
|
|
161
|
+
2. Minor enhancement to allow AWS profile to be specified.
|
|
162
|
+
|
|
163
|
+
3. Add ability to override disable flag and actions on a rule.
|
|
164
|
+
|
|
165
|
+
# confluent-kafka-javascript v0.6.0
|
|
166
|
+
|
|
167
|
+
v0.6.0 is a limited availability maintenance release. It is supported for all usage.
|
|
168
|
+
|
|
169
|
+
## Fixes
|
|
170
|
+
|
|
171
|
+
### Schema Registry
|
|
172
|
+
|
|
173
|
+
1. Add AWS AssumeRole support to AWS KMS. You can now specify a role arn, and optional
|
|
174
|
+
role session name and optional role external id.
|
|
175
|
+
|
|
176
|
+
2. Ensure different key ids use different client instances.
|
|
177
|
+
|
|
178
|
+
# confluent-kafka-javascript v0.5.2
|
|
179
|
+
|
|
180
|
+
v0.5.2 is a limited availability maintenance release. It is supported for all usage.
|
|
181
|
+
|
|
182
|
+
Note: v0.5.2 has no code changes from v0.5.1, version is bumped to sync with @confluentinc/schemaregistry.
|
|
183
|
+
|
|
184
|
+
|
|
185
|
+
# confluent-kafka-javascript v0.5.1
|
|
186
|
+
|
|
187
|
+
v0.5.1 is a limited availability maintenance release. It is supported for all usage.
|
|
188
|
+
|
|
189
|
+
## Fixes
|
|
190
|
+
|
|
191
|
+
1. Fix an issue where `sendOffsets` wasn't working correctly in the transactional
|
|
192
|
+
producer (#172).
|
|
193
|
+
|
|
194
|
+
|
|
195
|
+
# confluent-kafka-javascript v0.5.0
|
|
196
|
+
|
|
197
|
+
v0.5.0 is a limited availability feature release. It is supported for all usage.
|
|
198
|
+
|
|
199
|
+
Note: v0.5.0 was not released because of the bug mentioned in v0.5.1 section. Instead,
|
|
200
|
+
v0.5.1 was released with the fix directly.
|
|
201
|
+
|
|
202
|
+
## Enhancements
|
|
203
|
+
|
|
204
|
+
1. Add support for an Admin API to delete records.(#141).
|
|
205
|
+
2. Add support for an Admin API to describe topics.(#155).
|
|
206
|
+
3. Add support for dependent Admin client (#153).
|
|
207
|
+
4. References librdkafka v2.6.1. Refer to the [librdkafka v2.6.1 release notes](https://github.com/confluentinc/librdkafka/releases/tag/v2.6.1) for more information.
|
|
208
|
+
|
|
209
|
+
## Fixes
|
|
210
|
+
|
|
211
|
+
1. Fixes an issue with unresolved raced Promises leaking in the consumer (#151).
|
|
212
|
+
2. Removes schemaregistry dependencies from root package.json to prevent issues with Node 18 (#162).
|
|
213
|
+
|
|
214
|
+
|
|
215
|
+
# confluent-kafka-javascript v0.4.0
|
|
216
|
+
|
|
217
|
+
v0.4.0 is a limited availability feature release. It is supported for all usage.
|
|
218
|
+
|
|
219
|
+
## Enhancements
|
|
220
|
+
|
|
221
|
+
1. Fixes an issue where headers were not passed correctly to the `eachBatch` callback (#130).
|
|
222
|
+
2. Add support for an Admin API to list a consumer group's offsets (#49).
|
|
223
|
+
3. Reduce consumer poll timeout to nil and add wakeups for new messages. This improves
|
|
224
|
+
the consumer efficiency, and resolves issues while running multiple consumers within
|
|
225
|
+
the same node process (#135).
|
|
226
|
+
4. Add pre-built binaries for macOS (Intel).
|
|
227
|
+
|
|
228
|
+
|
|
229
|
+
# confluent-kafka-javascript v0.3.0
|
|
230
|
+
|
|
231
|
+
v0.3.0 is a limited availability feature release. It is supported for all usage.
|
|
232
|
+
|
|
233
|
+
## Enhancements
|
|
234
|
+
|
|
235
|
+
1. References librdkafka v2.6.0. Refer to the [librdkafka v2.6.0 release notes](https://github.com/confluentinc/librdkafka/releases/tag/v2.6.0) for more information.
|
|
236
|
+
1. Minor optimization to reduce schema ID lookups (#123).
|
|
237
|
+
|
|
238
|
+
|
|
239
|
+
# confluent-kafka-javascript v0.2.1
|
|
240
|
+
|
|
241
|
+
v0.2.1 is a limited availability release. It is supported for all usage.
|
|
242
|
+
|
|
243
|
+
## Features
|
|
244
|
+
|
|
245
|
+
1. Update README, docs, and examples for Confluent's Schema Registry client.
|
|
246
|
+
|
|
247
|
+
|
|
248
|
+
# confluent-kafka-javascript v0.2.0
|
|
249
|
+
|
|
250
|
+
v0.2.0 is a limited availability release. It is supported for all usage.
|
|
251
|
+
|
|
252
|
+
## Features
|
|
253
|
+
|
|
254
|
+
1. Switch to using `librdkafka` on the latest released tag `v2.5.3` instead of `master`.
|
|
255
|
+
|
|
256
|
+
|
|
257
|
+
# confluent-kafka-javascript v0.1.17-devel
|
|
258
|
+
|
|
259
|
+
v0.1.17-devel is a pre-production, early-access release.
|
|
260
|
+
|
|
261
|
+
## Features
|
|
262
|
+
|
|
263
|
+
1. Add a commitCb method to the callback-based API which allows committing asynchronously.
|
|
264
|
+
2. Pass assign/unassign functions to the rebalance callback in the promisified API, allowing
|
|
265
|
+
the user to control the assignment of partitions, or pause just after a rebalance.
|
|
266
|
+
3. Remove store from promisified API and let the library handle all the stores.
|
|
267
|
+
4. Add JavaScript-level debug logging to the client for debugging issues within the binding.
|
|
268
|
+
5. Various fixes for performance and robustness of the consumer cache.
|
|
269
|
+
6. Remove `consumerGroupId` argument from the `sendOffsets` method of the transactional producer,
|
|
270
|
+
and instead, only allow using a `consumer`.
|
|
271
|
+
|
|
272
|
+
## Fixes
|
|
273
|
+
|
|
274
|
+
1. Do not modify RegExps which don't start with a ^, instead, throw an error so
|
|
275
|
+
that there is no unexpected behaviour for the user (Issue [#64](https://github.com/confluentinc/confluent-kafka-javascript/issues/64)).
|
|
276
|
+
2. Do not mutate arguments in run, pause and resume (Issue [#61](https://github.com/confluentinc/confluent-kafka-javascript/issues/61)).
|
|
277
|
+
3. Fix a segmentation fault in `listGroups` when passing `matchConsumerGroupStates` as undefined.
|
|
278
|
+
|
|
279
|
+
|
|
280
|
+
# confluent-kafka-javascript v0.1.16-devel
|
|
281
|
+
|
|
282
|
+
v0.1.16-devel is a pre-production, early-access release.
|
|
283
|
+
|
|
284
|
+
## Features
|
|
285
|
+
|
|
286
|
+
1. Add per-partition concurrency to consumer.
|
|
287
|
+
2. Add true `eachBatch` support to consumer.
|
|
288
|
+
3. Add a `leaderEpoch` field to the topic partitions where required (listing, committing, etc.).
|
|
289
|
+
|
|
290
|
+
|
|
291
|
+
# confluent-kafka-javascript v0.1.15-devel
|
|
292
|
+
|
|
293
|
+
v0.1.15-devel is a pre-production, early-access release.
|
|
294
|
+
|
|
295
|
+
## Features
|
|
296
|
+
|
|
297
|
+
1. Add Node v22 builds and bump librdkafka version on each version bump of this library.
|
|
298
|
+
|
|
299
|
+
|
|
300
|
+
# confluent-kafka-javascript v0.1.14-devel
|
|
301
|
+
|
|
302
|
+
v0.1.14-devel is a pre-production, early-access release.
|
|
303
|
+
|
|
304
|
+
## Features
|
|
305
|
+
|
|
306
|
+
1. Add metadata to offset commit and offset store (non-promisified API).
|
|
307
|
+
2. Add types for logger and loglevel to configuration.
|
|
308
|
+
3. Add Producer polling from background thread. This improves performance for cases when send is awaited on.
|
|
309
|
+
4. Enable consume optimization from v0.1.13-devel (Features #2) by default for the promisified API.
|
|
310
|
+
|
|
311
|
+
## Bug Fixes
|
|
312
|
+
|
|
313
|
+
1. Fix issues with the header conversions from promisified API to the non-promisified API to match
|
|
314
|
+
the type signature and allow Buffers to be passed as header values in the C++ layer.
|
|
315
|
+
|
|
316
|
+
|
|
317
|
+
# confluent-kafka-javascript v0.1.13-devel
|
|
318
|
+
|
|
319
|
+
v0.1.13-devel is a pre-production, early-access release.
|
|
320
|
+
|
|
321
|
+
## Features
|
|
322
|
+
|
|
323
|
+
1. Add support for `storeOffsets` in the consumer API.
|
|
324
|
+
2. Add optimization while consuming, in cases where the size of messages pending in our subscription is less than the consumer cache size.
|
|
325
|
+
|
|
326
|
+
## Bug Fixes
|
|
327
|
+
|
|
328
|
+
1. Fix memory leak in incremental assign (@martijnimhoff, #35).
|
|
329
|
+
2. Fix various issues with typings, and reconcile typings, JavaScript code, and MIGRATION.md to be consistent.
|
|
330
|
+
|
|
331
|
+
|
|
332
|
+
# confluent-kafka-javascript v0.1.12-devel
|
|
333
|
+
|
|
334
|
+
v0.1.12-devel is a pre-production, early-access release.
|
|
335
|
+
|
|
336
|
+
## Features
|
|
337
|
+
|
|
338
|
+
1. Add support for `listTopics` in the Admin API.
|
|
339
|
+
2. Add support for OAUTHBEARER token refresh callback for both promisified and non promisified API.
|
|
340
|
+
|
|
341
|
+
## Bug Fixes
|
|
342
|
+
|
|
343
|
+
1. Fix aliasing bug between `NodeKafka::Conf` and `RdKafka::ConfImpl`.
|
|
344
|
+
2. Fix issue where `assign/unassign` were called instead of `incrementalAssign/incrementalUnassign` while using
|
|
345
|
+
the Cooperative Sticky assigner, and setting the `rebalance_cb` as a boolean rather than as a function.
|
|
346
|
+
3. Fix memory leaks in Dispatcher and Conf (both leaked memory at client close).
|
|
347
|
+
4. Fix type definitions and make `KafkaJS` and `RdKafka` separate namespaces, while maintaining compatibility
|
|
348
|
+
with node-rdkafka's type definitions.
|
|
349
|
+
|
|
350
|
+
|
|
351
|
+
# confluent-kafka-javascript v0.1.11-devel
|
|
352
|
+
|
|
353
|
+
v0.1.11-devel is a pre-production, early-access release.
|
|
354
|
+
|
|
355
|
+
## Features
|
|
356
|
+
|
|
357
|
+
1. Add support for `eachBatch` in the Consumer API (partial support for API compatibility).
|
|
358
|
+
2. Add support for `listGroups`, `describeGroups` and `deleteGroups` in the Admin API.
|
|
359
|
+
|
|
360
|
+
|
|
361
|
+
# confluent-kafka-javascript v0.1.10-devel
|
|
362
|
+
|
|
363
|
+
v0.1.10-devel is a pre-production, early-access release.
|
|
364
|
+
|
|
365
|
+
## Features
|
|
366
|
+
|
|
367
|
+
1. Pre-built binaries for Windows (x64) added on an experimental basis.
|
|
368
|
+
|
|
369
|
+
|
|
370
|
+
# confluent-kafka-javascript v0.1.9-devel
|
|
371
|
+
|
|
372
|
+
v0.1.9-devel is a pre-production, early-access release.
|
|
373
|
+
|
|
374
|
+
## Features
|
|
375
|
+
|
|
376
|
+
1. Pre-built binaries for Linux (both amd64 and arm64, both musl and glibc), for macOS (m1), for node versions 18, 20 and 21.
|
|
377
|
+
2. Promisified API for Consumer, Producer and Admin Client.
|
|
378
|
+
3. Allow passing topic configuration properties via the global configuration block.
|
|
379
|
+
4. Remove dependencies with security issues.
|
|
380
|
+
5. Support for the Cooperative Sticky assignor.
|
package/CONTRIBUTING.md
ADDED
|
@@ -0,0 +1,257 @@
|
|
|
1
|
+
# Contributing to `confluent-kafka-javascript`
|
|
2
|
+
|
|
3
|
+
:+1::tada: First off, thanks for taking the time to contribute! :tada::+1:
|
|
4
|
+
|
|
5
|
+
The following is a set of guidelines for contributing to `confluent-kafka-javascript`
|
|
6
|
+
which is hosted by [Confluent Inc.](https://github.com/confluentinc)
|
|
7
|
+
on GitHub. This document lists rules, guidelines, and help getting started,
|
|
8
|
+
so if you feel something is missing feel free to send a pull request.
|
|
9
|
+
|
|
10
|
+
## What should I know before I get started?
|
|
11
|
+
|
|
12
|
+
### Contributor Agreement
|
|
13
|
+
|
|
14
|
+
Required (please follow instructions after making any Pull Requests).
|
|
15
|
+
|
|
16
|
+
## How can I contribute?
|
|
17
|
+
|
|
18
|
+
### Reporting Bugs
|
|
19
|
+
|
|
20
|
+
Please use __Github Issues__ to report bugs. When filling out an issue report,
|
|
21
|
+
make sure to copy any related code and stack traces so we can properly debug.
|
|
22
|
+
We need to be able to reproduce a failing test to be able to fix your issue
|
|
23
|
+
most of the time, so a custom written failing test is very helpful.
|
|
24
|
+
|
|
25
|
+
Please also note the Kafka broker version that you are using and how many
|
|
26
|
+
replicas, partitions, and brokers you are connecting to, because some issues
|
|
27
|
+
might be related to Kafka. A list of `librdkafka` configuration key-value pairs
|
|
28
|
+
also helps.
|
|
29
|
+
|
|
30
|
+
Adding the property `debug` in your `librdkafka` configuration will help us. A list of
|
|
31
|
+
possible values is available [here](https://github.com/confluentinc/librdkafka/blob/master/CONFIGURATION.md),
|
|
32
|
+
but you can set it to `all` if verbose logs are okay.
|
|
33
|
+
|
|
34
|
+
### Suggesting Enhancements
|
|
35
|
+
|
|
36
|
+
Please use __Github Issues__ to suggest enhancements. We are happy to consider
|
|
37
|
+
any extra functionality or features to the library, as long as they add real
|
|
38
|
+
and related value to users. Describing your use case and why such an addition
|
|
39
|
+
helps the user base can help guide the decision to implement it into the
|
|
40
|
+
library's core.
|
|
41
|
+
|
|
42
|
+
### Pull Requests
|
|
43
|
+
|
|
44
|
+
* Include new test cases (either end-to-end or unit tests) with your change.
|
|
45
|
+
* Follow our style guides.
|
|
46
|
+
* Make sure all tests are still passing and the linter does not report any issues.
|
|
47
|
+
* End files with a new line.
|
|
48
|
+
* Document the new code in the comments (if it is JavaScript) so the
|
|
49
|
+
documentation generator can update the reference documentation.
|
|
50
|
+
* Avoid platform-dependent code.
|
|
51
|
+
<br>**Note:** If making modifications to the underlying C++, please use built-in
|
|
52
|
+
precompiler directives to detect such platform specificities. Use `Nan`
|
|
53
|
+
whenever possible to abstract node/v8 version incompatibility.
|
|
54
|
+
* Make sure your branch is up to date and rebased.
|
|
55
|
+
* Squash extraneous commits unless their history truly adds value to the library.
|
|
56
|
+
|
|
57
|
+
## Styleguides
|
|
58
|
+
|
|
59
|
+
### General style guidelines
|
|
60
|
+
|
|
61
|
+
Download the [EditorConfig](http://editorconfig.org) plugin for your preferred
|
|
62
|
+
text editor to automate the application of the following guidelines:
|
|
63
|
+
|
|
64
|
+
* Use 2-space indent (no tabs).
|
|
65
|
+
* Do not leave trailing whitespace on lines.
|
|
66
|
+
* Files should end with a final newline.
|
|
67
|
+
|
|
68
|
+
Also, adhere to the following not enforced by EditorConfig:
|
|
69
|
+
|
|
70
|
+
* Limit lines to 80 characters in length. A few extra (<= 5) is fine if it helps
|
|
71
|
+
readability, use good judgement.
|
|
72
|
+
* Use `lf` line endings. (git's `core.autocrlf` setting can help)
|
|
73
|
+
|
|
74
|
+
### Git Commit Messages
|
|
75
|
+
|
|
76
|
+
Commit messages should adhere to the guidelines in tpope's
|
|
77
|
+
[A Note About Git Commit Messages](http://tbaggery.com/2008/04/19/a-note-about-git-commit-messages.html)
|
|
78
|
+
|
|
79
|
+
In short:
|
|
80
|
+
|
|
81
|
+
* Use the imperative mood. ("Fix bug", not "Fixed bug" or "Fixes bug")
|
|
82
|
+
* Limit the first line to 50 characters or less, followed by a blank line
|
|
83
|
+
and detail paragraphs (limit detail lines to about 72 characters).
|
|
84
|
+
* Reference issue numbers or pull requests whenever possible.
|
|
85
|
+
|
|
86
|
+
### JavaScript Styleguide
|
|
87
|
+
|
|
88
|
+
* All callbacks should follow the standard Node.js callback signature.
|
|
89
|
+
* Your JavaScript should properly pass the linter (`make jslint` and `make eslint`).
|
|
90
|
+
|
|
91
|
+
### C++ Styleguide
|
|
92
|
+
|
|
93
|
+
* Class member variables should be prefixed with `m_`.
|
|
94
|
+
* Use a comment when pointer ownership has changed hands.
|
|
95
|
+
* Your C++ should properly pass the `cpplint.py` in the `make lint` test.
|
|
96
|
+
|
|
97
|
+
### Specs Styleguide
|
|
98
|
+
|
|
99
|
+
* Write JavaScript tests by using the `mocha` testing framework for the
|
|
100
|
+
non-promisified API and `jest` for the promisified API.
|
|
101
|
+
* All `mocha` tests should use exports syntax.
|
|
102
|
+
* All `mocha` test files should be suffixed with `.spec.js` instead of `.js`.
|
|
103
|
+
* Unit tests should mirror the JavaScript files they test (for example,
|
|
104
|
+
`lib/client.js` is tested in `test/client.spec.js`).
|
|
105
|
+
* Unit tests should have no outside service dependencies. Any time a dependency,
|
|
106
|
+
like Kafka, exists, you should create an end-to-end test.
|
|
107
|
+
* You may mock a connection in a unit test if it is reliably similar to its real
|
|
108
|
+
variant.
|
|
109
|
+
|
|
110
|
+
### Documentation Styleguide
|
|
111
|
+
|
|
112
|
+
* Write all JavaScript documentation in jsdoc-compatible inline comments.
|
|
113
|
+
* Each docblock should have references to return types and parameters. If an
|
|
114
|
+
object is a parameter, you should also document any required subproperties.
|
|
115
|
+
* Use `@see` to reference similar pieces of code.
|
|
116
|
+
* Use comments to document your code when its intent may be difficult to understand.
|
|
117
|
+
* All documentation outside of the code should be in Github-compatible markdown.
|
|
118
|
+
* Make good use of font variations like __bold__ and *italics*.
|
|
119
|
+
* Use headers and tables of contents when they make sense.
|
|
120
|
+
|
|
121
|
+
## Editor
|
|
122
|
+
|
|
123
|
+
Using Visual Studio code to develop on `confluent-kafka-javascript`. 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:
|
|
124
|
+
|
|
125
|
+
`c_cpp_properties.json`
|
|
126
|
+
```
|
|
127
|
+
{
|
|
128
|
+
"configurations": [
|
|
129
|
+
{
|
|
130
|
+
"name": "Mac",
|
|
131
|
+
"includePath": [
|
|
132
|
+
"${workspaceFolder}/**",
|
|
133
|
+
"${workspaceFolder}",
|
|
134
|
+
"${workspaceFolder}/src",
|
|
135
|
+
"${workspaceFolder}/node_modules/nan",
|
|
136
|
+
"${workspaceFolder}/deps/librdkafka/src",
|
|
137
|
+
"${workspaceFolder}/deps/librdkafka/src-cpp",
|
|
138
|
+
"/usr/local/include/node",
|
|
139
|
+
"/usr/local/include/node/uv"
|
|
140
|
+
],
|
|
141
|
+
"defines": [],
|
|
142
|
+
"macFrameworkPath": [
|
|
143
|
+
"/Library/Developer/CommandLineTools/SDKs/MacOSX10.14.sdk/System/Library/Frameworks"
|
|
144
|
+
],
|
|
145
|
+
"compilerPath": "/usr/bin/clang",
|
|
146
|
+
"cStandard": "c11",
|
|
147
|
+
"cppStandard": "c++17",
|
|
148
|
+
"intelliSenseMode": "clang-x64"
|
|
149
|
+
}
|
|
150
|
+
],
|
|
151
|
+
"version": 4
|
|
152
|
+
}
|
|
153
|
+
```
|
|
154
|
+
|
|
155
|
+
## Tests
|
|
156
|
+
|
|
157
|
+
This project includes three types of tests in this project:
|
|
158
|
+
* end-to-end integration tests (`mocha`)
|
|
159
|
+
* unit tests (`mocha`)
|
|
160
|
+
* integration tests for promisified API (`jest`)
|
|
161
|
+
|
|
162
|
+
You can run all types of tests by using `Makefile`. Doing so calls `mocha` or `jest` in your locally installed `node_modules` directory.
|
|
163
|
+
|
|
164
|
+
* Before you run the tests, be sure to init and update the submodules:
|
|
165
|
+
1. `git submodule init`
|
|
166
|
+
2. `git submodule update`
|
|
167
|
+
* To run the unit tests, you can run `make lint` or `make test`.
|
|
168
|
+
* To run the promisified integration tests, you can use `make promisified_test`.
|
|
169
|
+
You must have a running Kafka installation available. By default, the test tries to connect to `localhost:9092`;
|
|
170
|
+
however, you can supply the `KAFKA_HOST` environment variable to override this default behavior.
|
|
171
|
+
* To run the integration tests, you can use `make e2e`.
|
|
172
|
+
You must have a running Kafka installation available. By default, the test tries to connect to `localhost:9092`;
|
|
173
|
+
however, you can supply the `KAFKA_HOST` environment variable to override this default behavior. Run `make e2e`.
|
|
174
|
+
|
|
175
|
+
## Debugging
|
|
176
|
+
|
|
177
|
+
### Debugging C++
|
|
178
|
+
|
|
179
|
+
Use `gdb` for debugging (as shown in the following example).
|
|
180
|
+
|
|
181
|
+
```
|
|
182
|
+
node-gyp rebuild --debug
|
|
183
|
+
|
|
184
|
+
gdb node
|
|
185
|
+
(gdb) set args "path/to/file.js"
|
|
186
|
+
(gdb) run
|
|
187
|
+
[output here]
|
|
188
|
+
```
|
|
189
|
+
|
|
190
|
+
You can add breakpoints and so on after that.
|
|
191
|
+
|
|
192
|
+
### Debugging and Profiling JavaScript
|
|
193
|
+
|
|
194
|
+
Run the code with the `--inspect` flag, and then open `chrome://inspect` in Chrome and connect to the debugger.
|
|
195
|
+
|
|
196
|
+
Example:
|
|
197
|
+
|
|
198
|
+
```
|
|
199
|
+
node --inspect path/to/file.js
|
|
200
|
+
```
|
|
201
|
+
|
|
202
|
+
## Updating librdkafka version
|
|
203
|
+
|
|
204
|
+
The librdkafka should be periodically updated to the latest release in https://github.com/confluentinc/librdkafka/releases
|
|
205
|
+
|
|
206
|
+
Steps to update:
|
|
207
|
+
1. Update the `librdkafka` property in [`package.json`](https://github.com/confluentinc/confluent-kafka-javascript/blob/master/package.json) to the desired version.
|
|
208
|
+
|
|
209
|
+
1. Update the librdkafka git submodule to that versions release commit (example below)
|
|
210
|
+
|
|
211
|
+
```bash
|
|
212
|
+
cd deps/librdkafka
|
|
213
|
+
git checkout 063a9ae7a65cebdf1cc128da9815c05f91a2a996 # for version 1.8.2
|
|
214
|
+
```
|
|
215
|
+
|
|
216
|
+
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`
|
|
217
|
+
|
|
218
|
+
1. Update [`config.d.ts`](https://github.com/confluentinc/confluent-kafka-javascript/blob/master/config.d.ts) and [`errors.d.ts`](https://github.com/confluentinc/confluent-kafka-javascript/blob/master/errors.d.ts) TypeScript definitions by running:
|
|
219
|
+
```bash
|
|
220
|
+
node ci/librdkafka-defs-generator.js
|
|
221
|
+
```
|
|
222
|
+
|
|
223
|
+
1. Run `npm install` to build with the new version and fix any build errors that occur.
|
|
224
|
+
|
|
225
|
+
1. Run unit tests: `npm run test`
|
|
226
|
+
|
|
227
|
+
1. Change the librdkafka version in `semaphore.yml`
|
|
228
|
+
|
|
229
|
+
1. Update the version numbers referenced in the [`README.md`](https://github.com/confluentinc/confluent-kafka-javascript/blob/master/README.md) file to the new version.
|
|
230
|
+
|
|
231
|
+
## Releasing
|
|
232
|
+
|
|
233
|
+
1. Increment the `version` in `package.json`. Change the version in `util.js` too.
|
|
234
|
+
If it's needed to change librdkafka version, see the **Updating librdkafka version** section.
|
|
235
|
+
|
|
236
|
+
1. Run `npm run prepack` to verify package version.
|
|
237
|
+
|
|
238
|
+
1. Run `npm install` to update the `package-lock.json` file.
|
|
239
|
+
|
|
240
|
+
1. Create a PR and merge the above changes, and tag the merged commit with the new version. This should be the same string as `version` in `package.json`.
|
|
241
|
+
|
|
242
|
+
1. The CI will run on the tag, which will create the release artifacts in Semaphore CI.
|
|
243
|
+
|
|
244
|
+
1. Create a new GitHub release with the tag, and upload the release artifacts from Semaphore CI.
|
|
245
|
+
The release title should be the same string as `version` in `package.json`.
|
|
246
|
+
|
|
247
|
+
1. build schemaregistry project to prepare for the release:
|
|
248
|
+
`(cd schemaregistry && npm run build)`
|
|
249
|
+
|
|
250
|
+
1. Clear any file that isn't ignored by `.npmignore`
|
|
251
|
+
|
|
252
|
+
1. In case it's a release candidate add `--tag rc` to the following commands,
|
|
253
|
+
to avoid setting it as latest one
|
|
254
|
+
|
|
255
|
+
1. Publish Kafka client, with `--dry-run` first: `npm publish --dry-run --workspace=. --otp=<otp_here>`
|
|
256
|
+
|
|
257
|
+
1. Publish Schema Registry client, with `--dry-run` first: `npm publish --dry-run --workspace=schemaregistry --otp=<otp_here>`
|