@ohos-ports/confluentinc-kafka-javascript 1.10.0-beta.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/CHANGELOG.md +457 -0
- package/LICENSE.kafkajs +31 -0
- package/LICENSE.node-rdkafka +25 -0
- package/LICENSE.txt +20 -0
- package/README.md +133 -0
- package/binding.gyp +184 -0
- package/build/Release/confluent-kafka-javascript.node +0 -0
- package/build/deps/librdkafka++.so.1 +0 -0
- package/build/deps/librdkafka.Makefile +6 -0
- package/build/deps/librdkafka.so.1 +0 -0
- package/build/deps/librdkafka.target.mk +55 -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 +35 -0
- package/deps/librdkafka/.gdbmacros +19 -0
- package/deps/librdkafka/CHANGELOG.md +2477 -0
- package/deps/librdkafka/CMakeLists.txt +291 -0
- package/deps/librdkafka/CODE_OF_CONDUCT.md +46 -0
- package/deps/librdkafka/CONFIGURATION.md +212 -0
- package/deps/librdkafka/CONTRIBUTING.md +431 -0
- package/deps/librdkafka/Doxyfile +2375 -0
- package/deps/librdkafka/INTRODUCTION.md +2752 -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 +201 -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 +341 -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 +182 -0
- package/deps/librdkafka/src/CMakeLists.txt +379 -0
- package/deps/librdkafka/src/Makefile +105 -0
- package/deps/librdkafka/src/README.lz4.md +30 -0
- package/deps/librdkafka/src/cJSON.c +3191 -0
- package/deps/librdkafka/src/cJSON.h +306 -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 +592 -0
- package/deps/librdkafka/src/rdaddr.c +255 -0
- package/deps/librdkafka/src/rdaddr.h +202 -0
- package/deps/librdkafka/src/rdatomic.h +262 -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 +831 -0
- package/deps/librdkafka/src/rdhttp.h +101 -0
- package/deps/librdkafka/src/rdinterval.h +177 -0
- package/deps/librdkafka/src/rdkafka.c +7287 -0
- package/deps/librdkafka/src/rdkafka.h +11795 -0
- package/deps/librdkafka/src/rdkafka_admin.c +10165 -0
- package/deps/librdkafka/src/rdkafka_admin.h +658 -0
- package/deps/librdkafka/src/rdkafka_assignment.c +1282 -0
- package/deps/librdkafka/src/rdkafka_assignment.h +73 -0
- package/deps/librdkafka/src/rdkafka_assignor.c +1800 -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 +222 -0
- package/deps/librdkafka/src/rdkafka_broker.c +6736 -0
- package/deps/librdkafka/src/rdkafka_broker.h +851 -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 +8310 -0
- package/deps/librdkafka/src/rdkafka_cgrp.h +589 -0
- package/deps/librdkafka/src/rdkafka_conf.c +5177 -0
- package/deps/librdkafka/src/rdkafka_conf.h +746 -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 +3820 -0
- package/deps/librdkafka/src/rdkafka_fetcher.h +62 -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 +1505 -0
- package/deps/librdkafka/src/rdkafka_interceptor.c +842 -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 +2347 -0
- package/deps/librdkafka/src/rdkafka_metadata.h +350 -0
- package/deps/librdkafka/src/rdkafka_metadata_cache.c +1183 -0
- package/deps/librdkafka/src/rdkafka_mock.c +4514 -0
- package/deps/librdkafka/src/rdkafka_mock.h +867 -0
- package/deps/librdkafka/src/rdkafka_mock_cgrp.c +1877 -0
- package/deps/librdkafka/src/rdkafka_mock_handlers.c +5255 -0
- package/deps/librdkafka/src/rdkafka_mock_int.h +1005 -0
- package/deps/librdkafka/src/rdkafka_mock_sharegrp.c +1207 -0
- package/deps/librdkafka/src/rdkafka_msg.c +2619 -0
- package/deps/librdkafka/src/rdkafka_msg.h +629 -0
- package/deps/librdkafka/src/rdkafka_msgbatch.h +62 -0
- package/deps/librdkafka/src/rdkafka_msgset.h +105 -0
- package/deps/librdkafka/src/rdkafka_msgset_reader.c +2099 -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 +1219 -0
- package/deps/librdkafka/src/rdkafka_op.h +1065 -0
- package/deps/librdkafka/src/rdkafka_partition.c +5109 -0
- package/deps/librdkafka/src/rdkafka_partition.h +1215 -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 +739 -0
- package/deps/librdkafka/src/rdkafka_protocol.h +131 -0
- package/deps/librdkafka/src/rdkafka_queue.c +1351 -0
- package/deps/librdkafka/src/rdkafka_queue.h +1235 -0
- package/deps/librdkafka/src/rdkafka_range_assignor.c +1748 -0
- package/deps/librdkafka/src/rdkafka_request.c +7298 -0
- package/deps/librdkafka/src/rdkafka_request.h +761 -0
- package/deps/librdkafka/src/rdkafka_roundrobin_assignor.c +123 -0
- package/deps/librdkafka/src/rdkafka_sasl.c +589 -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 +1827 -0
- package/deps/librdkafka/src/rdkafka_sasl_oauthbearer_oidc.h +52 -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_share_acknowledgement.c +1445 -0
- package/deps/librdkafka/src/rdkafka_share_acknowledgement.h +373 -0
- package/deps/librdkafka/src/rdkafka_ssl.c +2235 -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 +411 -0
- package/deps/librdkafka/src/rdkafka_telemetry.c +761 -0
- package/deps/librdkafka/src/rdkafka_telemetry.h +52 -0
- package/deps/librdkafka/src/rdkafka_telemetry_decode.c +1307 -0
- package/deps/librdkafka/src/rdkafka_telemetry_decode.h +59 -0
- package/deps/librdkafka/src/rdkafka_telemetry_encode.c +1309 -0
- package/deps/librdkafka/src/rdkafka_telemetry_encode.h +459 -0
- package/deps/librdkafka/src/rdkafka_timer.c +407 -0
- package/deps/librdkafka/src/rdkafka_timer.h +117 -0
- package/deps/librdkafka/src/rdkafka_topic.c +2382 -0
- package/deps/librdkafka/src/rdkafka_topic.h +369 -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 +593 -0
- package/deps/librdkafka/src/rdlist.h +444 -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 +151 -0
- package/deps/librdkafka/src/rdrand.h +72 -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 +564 -0
- package/deps/librdkafka/src/rdunittest.h +232 -0
- package/deps/librdkafka/src/rdunittest_acknowledge.c +1177 -0
- package/deps/librdkafka/src/rdunittest_fetcher.c +1211 -0
- package/deps/librdkafka/src/rdunittest_msgset_errors.c +1521 -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 +210 -0
- package/deps/librdkafka/src/tinycthread_extra.h +218 -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 +272 -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 +444 -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 +331 -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 +529 -0
- package/deps/librdkafka/tests/0065-yield.cpp +140 -0
- package/deps/librdkafka/tests/0066-plugins.cpp +143 -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 +366 -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 +674 -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 +1164 -0
- package/deps/librdkafka/tests/0127-fetch_queue_backoff.cpp +165 -0
- package/deps/librdkafka/tests/0128-sasl_callback_queue.cpp +217 -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 +279 -0
- package/deps/librdkafka/tests/0136-resolve_cb.c +181 -0
- package/deps/librdkafka/tests/0137-barrier_batch_consume.c +752 -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 +931 -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 +1210 -0
- package/deps/librdkafka/tests/0148-offset_fetch_commit_error_mock.c +569 -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/0155-share_group_heartbeat_mock.c +2695 -0
- package/deps/librdkafka/tests/0156-share_consumer_fetch_mock.c +1551 -0
- package/deps/librdkafka/tests/0157-share_consumer_ack_mock.c +1788 -0
- package/deps/librdkafka/tests/0158-share_consumer_transactions_mock.c +467 -0
- package/deps/librdkafka/tests/0170-share_consumer_subscription.c +2192 -0
- package/deps/librdkafka/tests/0171-share_consumer_consume.c +2150 -0
- package/deps/librdkafka/tests/0172-share_consumer_acknowledge.c +1919 -0
- package/deps/librdkafka/tests/0173-share_consumer_commit_async.c +2735 -0
- package/deps/librdkafka/tests/0174-share_consumer_concurrency.c +1434 -0
- package/deps/librdkafka/tests/0175-share_consumer_groups.c +574 -0
- package/deps/librdkafka/tests/0176-share_consumer_commit_sync.c +2986 -0
- package/deps/librdkafka/tests/0177-share_consumer_transactions.c +1815 -0
- package/deps/librdkafka/tests/0178-share_consumer_close.c +2102 -0
- package/deps/librdkafka/tests/0179-share_consumer_destroy.c +2482 -0
- package/deps/librdkafka/tests/0180-share_consumer_config.c +1677 -0
- package/deps/librdkafka/tests/0181-share_consumer_topic_delete.c +354 -0
- package/deps/librdkafka/tests/0182-share_consumer_error_handling_mock.c +3358 -0
- package/deps/librdkafka/tests/0183-share_consumer_leader_change_mock.c +1234 -0
- package/deps/librdkafka/tests/0184-share_consumer_topic_recreate.c +1356 -0
- package/deps/librdkafka/tests/0185-share_consumer_max_poll_interval.c +557 -0
- package/deps/librdkafka/tests/0186-share_consumer_fatal_error.c +360 -0
- package/deps/librdkafka/tests/0190-share_consumer_telemetry.c +387 -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 +193 -0
- package/deps/librdkafka/tests/LibrdkafkaTestApp.py +291 -0
- package/deps/librdkafka/tests/Makefile +182 -0
- package/deps/librdkafka/tests/README.md +514 -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 +203 -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 +81 -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 +141 -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/share_telemetry_verify/share-otel-collector-config.yaml +28 -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 +8376 -0
- package/deps/librdkafka/tests/test.conf.example +27 -0
- package/deps/librdkafka/tests/test.h +1150 -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.15.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 +282 -0
- package/deps/librdkafka/win32/librdkafkacpp/librdkafkacpp.vcxproj +104 -0
- package/deps/librdkafka/win32/msbuild.ps1 +58 -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 +278 -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/index.d.ts +3 -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 +1052 -0
- package/lib/kafkajs/_common.js +887 -0
- package/lib/kafkajs/_consumer.js +2156 -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/package.json +85 -0
- package/shim/source_location +54 -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 +1628 -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/types/config.d.ts +1269 -0
- package/types/errors.d.ts +373 -0
- package/types/kafkajs.d.ts +568 -0
- package/types/rdkafka.d.ts +571 -0
- package/util/configure.js +32 -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
|
@@ -0,0 +1,934 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* librdkafka - Apache Kafka C library
|
|
3
|
+
*
|
|
4
|
+
* Copyright (c) 2012-2022, Magnus Edenhill
|
|
5
|
+
* All rights reserved.
|
|
6
|
+
*
|
|
7
|
+
* Redistribution and use in source and binary forms, with or without
|
|
8
|
+
* modification, are permitted provided that the following conditions are met:
|
|
9
|
+
*
|
|
10
|
+
* 1. Redistributions of source code must retain the above copyright notice,
|
|
11
|
+
* this list of conditions and the following disclaimer.
|
|
12
|
+
* 2. Redistributions in binary form must reproduce the above copyright notice,
|
|
13
|
+
* this list of conditions and the following disclaimer in the documentation
|
|
14
|
+
* and/or other materials provided with the distribution.
|
|
15
|
+
*
|
|
16
|
+
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
|
17
|
+
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
|
18
|
+
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
|
19
|
+
* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
|
|
20
|
+
* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
|
21
|
+
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
|
|
22
|
+
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
|
23
|
+
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
|
|
24
|
+
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
|
25
|
+
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
|
26
|
+
* POSSIBILITY OF SUCH DAMAGE.
|
|
27
|
+
*/
|
|
28
|
+
|
|
29
|
+
/**
|
|
30
|
+
* Tests various config related things
|
|
31
|
+
*/
|
|
32
|
+
|
|
33
|
+
|
|
34
|
+
#include "test.h"
|
|
35
|
+
|
|
36
|
+
/* Typical include path would be <librdkafka/rdkafka.h>, but this program
|
|
37
|
+
* is built from within the librdkafka source tree and thus differs. */
|
|
38
|
+
#include "rdkafka.h" /* for Kafka driver */
|
|
39
|
+
|
|
40
|
+
|
|
41
|
+
|
|
42
|
+
static void dr_cb(rd_kafka_t *rk,
|
|
43
|
+
void *payload,
|
|
44
|
+
size_t len,
|
|
45
|
+
rd_kafka_resp_err_t err,
|
|
46
|
+
void *opaque,
|
|
47
|
+
void *msg_opaque) {
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
static void
|
|
51
|
+
error_cb(rd_kafka_t *rk, int err, const char *reason, void *opaque) {
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
|
|
55
|
+
static int32_t partitioner(const rd_kafka_topic_t *rkt,
|
|
56
|
+
const void *keydata,
|
|
57
|
+
size_t keylen,
|
|
58
|
+
int32_t partition_cnt,
|
|
59
|
+
void *rkt_opaque,
|
|
60
|
+
void *msg_opaque) {
|
|
61
|
+
return 0;
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
|
|
65
|
+
static void
|
|
66
|
+
conf_verify(int line, const char **arr, size_t cnt, const char **confs) {
|
|
67
|
+
int i, j;
|
|
68
|
+
|
|
69
|
+
|
|
70
|
+
for (i = 0; confs[i]; i += 2) {
|
|
71
|
+
for (j = 0; j < (int)cnt; j += 2) {
|
|
72
|
+
if (!strcmp(confs[i], arr[j])) {
|
|
73
|
+
if (strcmp(confs[i + 1], arr[j + 1]))
|
|
74
|
+
TEST_FAIL(
|
|
75
|
+
"%i: Property %s mismatch: "
|
|
76
|
+
"expected %s != retrieved %s",
|
|
77
|
+
line, confs[i], confs[i + 1],
|
|
78
|
+
arr[j + 1]);
|
|
79
|
+
}
|
|
80
|
+
if (j == (int)cnt)
|
|
81
|
+
TEST_FAIL(
|
|
82
|
+
"%i: "
|
|
83
|
+
"Property %s not found in config\n",
|
|
84
|
+
line, confs[i]);
|
|
85
|
+
}
|
|
86
|
+
}
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
|
|
90
|
+
static void conf_cmp(const char *desc,
|
|
91
|
+
const char **a,
|
|
92
|
+
size_t acnt,
|
|
93
|
+
const char **b,
|
|
94
|
+
size_t bcnt) {
|
|
95
|
+
int i;
|
|
96
|
+
|
|
97
|
+
if (acnt != bcnt)
|
|
98
|
+
TEST_FAIL("%s config compare: count %" PRIusz " != %" PRIusz
|
|
99
|
+
" mismatch",
|
|
100
|
+
desc, acnt, bcnt);
|
|
101
|
+
|
|
102
|
+
for (i = 0; i < (int)acnt; i += 2) {
|
|
103
|
+
if (strcmp(a[i], b[i]))
|
|
104
|
+
TEST_FAIL("%s conf mismatch: %s != %s", desc, a[i],
|
|
105
|
+
b[i]);
|
|
106
|
+
else if (strcmp(a[i + 1], b[i + 1])) {
|
|
107
|
+
/* The default_topic_conf will be auto-created
|
|
108
|
+
* when global->topic fallthru is used, so its
|
|
109
|
+
* value will not match here. */
|
|
110
|
+
if (!strcmp(a[i], "default_topic_conf"))
|
|
111
|
+
continue;
|
|
112
|
+
TEST_FAIL("%s conf value mismatch for %s: %s != %s",
|
|
113
|
+
desc, a[i], a[i + 1], b[i + 1]);
|
|
114
|
+
}
|
|
115
|
+
}
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
|
|
119
|
+
/**
|
|
120
|
+
* @brief Not called, just used for config
|
|
121
|
+
*/
|
|
122
|
+
static int on_new_call_cnt;
|
|
123
|
+
static rd_kafka_resp_err_t my_on_new(rd_kafka_t *rk,
|
|
124
|
+
const rd_kafka_conf_t *conf,
|
|
125
|
+
void *ic_opaque,
|
|
126
|
+
char *errstr,
|
|
127
|
+
size_t errstr_size) {
|
|
128
|
+
TEST_SAY("%s: on_new() called\n", rd_kafka_name(rk));
|
|
129
|
+
on_new_call_cnt++;
|
|
130
|
+
return RD_KAFKA_RESP_ERR_NO_ERROR;
|
|
131
|
+
}
|
|
132
|
+
|
|
133
|
+
|
|
134
|
+
|
|
135
|
+
/**
|
|
136
|
+
* @brief When rd_kafka_new() succeeds it takes ownership of the config object,
|
|
137
|
+
* but when it fails the config object remains in application custody.
|
|
138
|
+
* These tests makes sure that's the case (preferably run with valgrind)
|
|
139
|
+
*/
|
|
140
|
+
static void do_test_kafka_new_failures(void) {
|
|
141
|
+
rd_kafka_conf_t *conf;
|
|
142
|
+
rd_kafka_t *rk;
|
|
143
|
+
char errstr[512];
|
|
144
|
+
|
|
145
|
+
conf = rd_kafka_conf_new();
|
|
146
|
+
|
|
147
|
+
rk = rd_kafka_new(RD_KAFKA_PRODUCER, conf, errstr, sizeof(errstr));
|
|
148
|
+
TEST_ASSERT(rk, "kafka_new() failed: %s", errstr);
|
|
149
|
+
rd_kafka_destroy(rk);
|
|
150
|
+
|
|
151
|
+
/* Set an erroneous configuration value that is not checked
|
|
152
|
+
* by conf_set() but by rd_kafka_new() */
|
|
153
|
+
conf = rd_kafka_conf_new();
|
|
154
|
+
if (rd_kafka_conf_set(conf, "partition.assignment.strategy",
|
|
155
|
+
"range,thiswillfail", errstr,
|
|
156
|
+
sizeof(errstr)) != RD_KAFKA_CONF_OK)
|
|
157
|
+
TEST_FAIL("%s", errstr);
|
|
158
|
+
|
|
159
|
+
rk = rd_kafka_new(RD_KAFKA_PRODUCER, conf, errstr, sizeof(errstr));
|
|
160
|
+
TEST_ASSERT(!rk, "kafka_new() should have failed");
|
|
161
|
+
|
|
162
|
+
/* config object should still belong to us,
|
|
163
|
+
* correct the erroneous config and try again. */
|
|
164
|
+
if (rd_kafka_conf_set(conf, "partition.assignment.strategy", NULL,
|
|
165
|
+
errstr, sizeof(errstr)) != RD_KAFKA_CONF_OK)
|
|
166
|
+
TEST_FAIL("%s", errstr);
|
|
167
|
+
|
|
168
|
+
rk = rd_kafka_new(RD_KAFKA_PRODUCER, conf, errstr, sizeof(errstr));
|
|
169
|
+
TEST_ASSERT(rk, "kafka_new() failed: %s", errstr);
|
|
170
|
+
rd_kafka_destroy(rk);
|
|
171
|
+
|
|
172
|
+
/* set conflicting properties */
|
|
173
|
+
conf = rd_kafka_conf_new();
|
|
174
|
+
test_conf_set(conf, "acks", "1");
|
|
175
|
+
test_conf_set(conf, "enable.idempotence", "true");
|
|
176
|
+
rk = rd_kafka_new(RD_KAFKA_PRODUCER, conf, errstr, sizeof(errstr));
|
|
177
|
+
TEST_ASSERT(!rk, "kafka_new() should have failed");
|
|
178
|
+
rd_kafka_conf_destroy(conf);
|
|
179
|
+
TEST_SAY(_C_GRN "Ok: %s\n", errstr);
|
|
180
|
+
}
|
|
181
|
+
|
|
182
|
+
|
|
183
|
+
/**
|
|
184
|
+
* @brief Verify that INVALID properties (such as for Java SSL properties)
|
|
185
|
+
* work, as well as INTERNAL properties.
|
|
186
|
+
*/
|
|
187
|
+
static void do_test_special_invalid_conf(void) {
|
|
188
|
+
rd_kafka_conf_t *conf;
|
|
189
|
+
char errstr[512];
|
|
190
|
+
rd_kafka_conf_res_t res;
|
|
191
|
+
|
|
192
|
+
conf = rd_kafka_conf_new();
|
|
193
|
+
|
|
194
|
+
res = rd_kafka_conf_set(conf, "ssl.truststore.location", "abc", errstr,
|
|
195
|
+
sizeof(errstr));
|
|
196
|
+
/* Existing apps might not print the error string when conf_set
|
|
197
|
+
* returns UNKNOWN, only on INVALID, so make sure that is
|
|
198
|
+
* what is being returned. */
|
|
199
|
+
TEST_ASSERT(res == RD_KAFKA_CONF_INVALID,
|
|
200
|
+
"expected ssl.truststore.location to fail with INVALID, "
|
|
201
|
+
"not %d",
|
|
202
|
+
res);
|
|
203
|
+
/* Make sure there is a link to documentation */
|
|
204
|
+
TEST_ASSERT(strstr(errstr, "http"),
|
|
205
|
+
"expected ssl.truststore.location to provide link to "
|
|
206
|
+
"documentation, not \"%s\"",
|
|
207
|
+
errstr);
|
|
208
|
+
TEST_SAY(_C_GRN "Ok: %s\n" _C_CLR, errstr);
|
|
209
|
+
|
|
210
|
+
|
|
211
|
+
res = rd_kafka_conf_set(conf, "sasl.jaas.config", "abc", errstr,
|
|
212
|
+
sizeof(errstr));
|
|
213
|
+
/* Existing apps might not print the error string when conf_set
|
|
214
|
+
* returns UNKNOWN, only on INVALID, so make sure that is
|
|
215
|
+
* what is being returned. */
|
|
216
|
+
TEST_ASSERT(res == RD_KAFKA_CONF_INVALID,
|
|
217
|
+
"expected sasl.jaas.config to fail with INVALID, "
|
|
218
|
+
"not %d",
|
|
219
|
+
res);
|
|
220
|
+
/* Make sure there is a link to documentation */
|
|
221
|
+
TEST_ASSERT(strstr(errstr, "http"),
|
|
222
|
+
"expected sasl.jaas.config to provide link to "
|
|
223
|
+
"documentation, not \"%s\"",
|
|
224
|
+
errstr);
|
|
225
|
+
TEST_SAY(_C_GRN "Ok: %s\n" _C_CLR, errstr);
|
|
226
|
+
|
|
227
|
+
|
|
228
|
+
res = rd_kafka_conf_set(conf, "interceptors", "1", errstr,
|
|
229
|
+
sizeof(errstr));
|
|
230
|
+
TEST_ASSERT(res == RD_KAFKA_CONF_INVALID,
|
|
231
|
+
"expected interceptors to fail with INVALID, "
|
|
232
|
+
"not %d",
|
|
233
|
+
res);
|
|
234
|
+
TEST_SAY(_C_GRN "Ok: %s\n" _C_CLR, errstr);
|
|
235
|
+
|
|
236
|
+
rd_kafka_conf_destroy(conf);
|
|
237
|
+
}
|
|
238
|
+
|
|
239
|
+
|
|
240
|
+
/**
|
|
241
|
+
* @brief Verify idempotence configuration constraints
|
|
242
|
+
*/
|
|
243
|
+
static void do_test_idempotence_conf(void) {
|
|
244
|
+
static const struct {
|
|
245
|
+
const char *prop;
|
|
246
|
+
const char *val;
|
|
247
|
+
rd_bool_t topic_conf;
|
|
248
|
+
rd_bool_t exp_rk_fail;
|
|
249
|
+
rd_bool_t exp_rkt_fail;
|
|
250
|
+
} check[] = {{"acks", "1", rd_true, rd_false, rd_true},
|
|
251
|
+
{"acks", "all", rd_true, rd_false, rd_false},
|
|
252
|
+
{"queuing.strategy", "lifo", rd_true, rd_false, rd_true},
|
|
253
|
+
{NULL}};
|
|
254
|
+
int i;
|
|
255
|
+
|
|
256
|
+
for (i = 0; check[i].prop; i++) {
|
|
257
|
+
int j;
|
|
258
|
+
|
|
259
|
+
for (j = 0; j < 1 + (check[i].topic_conf ? 1 : 0); j++) {
|
|
260
|
+
/* j = 0: set on global config
|
|
261
|
+
* j = 1: set on topic config */
|
|
262
|
+
rd_kafka_conf_t *conf;
|
|
263
|
+
rd_kafka_topic_conf_t *tconf = NULL;
|
|
264
|
+
rd_kafka_t *rk;
|
|
265
|
+
rd_kafka_topic_t *rkt;
|
|
266
|
+
char errstr[512];
|
|
267
|
+
|
|
268
|
+
conf = rd_kafka_conf_new();
|
|
269
|
+
test_conf_set(conf, "enable.idempotence", "true");
|
|
270
|
+
|
|
271
|
+
if (j == 0)
|
|
272
|
+
test_conf_set(conf, check[i].prop,
|
|
273
|
+
check[i].val);
|
|
274
|
+
|
|
275
|
+
|
|
276
|
+
rk = rd_kafka_new(RD_KAFKA_PRODUCER, conf, errstr,
|
|
277
|
+
sizeof(errstr));
|
|
278
|
+
|
|
279
|
+
if (!rk) {
|
|
280
|
+
/* default topic config (j=0) will fail. */
|
|
281
|
+
TEST_ASSERT(check[i].exp_rk_fail ||
|
|
282
|
+
(j == 0 &&
|
|
283
|
+
check[i].exp_rkt_fail &&
|
|
284
|
+
check[i].topic_conf),
|
|
285
|
+
"Did not expect config #%d.%d "
|
|
286
|
+
"to fail: %s",
|
|
287
|
+
i, j, errstr);
|
|
288
|
+
|
|
289
|
+
rd_kafka_conf_destroy(conf);
|
|
290
|
+
continue;
|
|
291
|
+
|
|
292
|
+
} else {
|
|
293
|
+
TEST_ASSERT(!check[i].exp_rk_fail,
|
|
294
|
+
"Expect config #%d.%d to fail", i,
|
|
295
|
+
j);
|
|
296
|
+
}
|
|
297
|
+
|
|
298
|
+
if (j == 1) {
|
|
299
|
+
tconf = rd_kafka_topic_conf_new();
|
|
300
|
+
test_topic_conf_set(tconf, check[i].prop,
|
|
301
|
+
check[i].val);
|
|
302
|
+
}
|
|
303
|
+
|
|
304
|
+
rkt = rd_kafka_topic_new(rk, "mytopic", tconf);
|
|
305
|
+
if (!rkt) {
|
|
306
|
+
TEST_ASSERT(
|
|
307
|
+
check[i].exp_rkt_fail,
|
|
308
|
+
"Did not expect topic config "
|
|
309
|
+
"#%d.%d to fail: %s",
|
|
310
|
+
i, j,
|
|
311
|
+
rd_kafka_err2str(rd_kafka_last_error()));
|
|
312
|
+
|
|
313
|
+
|
|
314
|
+
} else {
|
|
315
|
+
TEST_ASSERT(!check[i].exp_rkt_fail,
|
|
316
|
+
"Expect topic config "
|
|
317
|
+
"#%d.%d to fail",
|
|
318
|
+
i, j);
|
|
319
|
+
rd_kafka_topic_destroy(rkt);
|
|
320
|
+
}
|
|
321
|
+
|
|
322
|
+
rd_kafka_destroy(rk);
|
|
323
|
+
}
|
|
324
|
+
}
|
|
325
|
+
}
|
|
326
|
+
|
|
327
|
+
|
|
328
|
+
/**
|
|
329
|
+
* @brief Verify that configuration properties can be extract
|
|
330
|
+
* from the instance config object.
|
|
331
|
+
*/
|
|
332
|
+
static void do_test_instance_conf(void) {
|
|
333
|
+
rd_kafka_conf_t *conf;
|
|
334
|
+
const rd_kafka_conf_t *iconf;
|
|
335
|
+
rd_kafka_t *rk;
|
|
336
|
+
rd_kafka_conf_res_t res;
|
|
337
|
+
static const char *props[] = {
|
|
338
|
+
"linger.ms", "123", "group.id", "test1",
|
|
339
|
+
"enable.auto.commit", "false", NULL,
|
|
340
|
+
};
|
|
341
|
+
const char **p;
|
|
342
|
+
|
|
343
|
+
conf = rd_kafka_conf_new();
|
|
344
|
+
|
|
345
|
+
for (p = props; *p; p += 2) {
|
|
346
|
+
res = rd_kafka_conf_set(conf, *p, *(p + 1), NULL, 0);
|
|
347
|
+
TEST_ASSERT(res == RD_KAFKA_CONF_OK, "failed to set %s", *p);
|
|
348
|
+
}
|
|
349
|
+
|
|
350
|
+
rk = rd_kafka_new(RD_KAFKA_CONSUMER, conf, NULL, 0);
|
|
351
|
+
TEST_ASSERT(rk, "failed to create consumer");
|
|
352
|
+
|
|
353
|
+
iconf = rd_kafka_conf(rk);
|
|
354
|
+
TEST_ASSERT(conf, "failed to get instance config");
|
|
355
|
+
|
|
356
|
+
for (p = props; *p; p += 2) {
|
|
357
|
+
char dest[512];
|
|
358
|
+
size_t destsz = sizeof(dest);
|
|
359
|
+
|
|
360
|
+
res = rd_kafka_conf_get(iconf, *p, dest, &destsz);
|
|
361
|
+
TEST_ASSERT(res == RD_KAFKA_CONF_OK,
|
|
362
|
+
"failed to get %s: result %d", *p, res);
|
|
363
|
+
|
|
364
|
+
TEST_SAY("Instance config %s=%s\n", *p, dest);
|
|
365
|
+
TEST_ASSERT(!strcmp(*(p + 1), dest), "Expected %s=%s, not %s",
|
|
366
|
+
*p, *(p + 1), dest);
|
|
367
|
+
}
|
|
368
|
+
|
|
369
|
+
rd_kafka_destroy(rk);
|
|
370
|
+
}
|
|
371
|
+
|
|
372
|
+
|
|
373
|
+
/**
|
|
374
|
+
* @brief Verify that setting and retrieving the default topic config works.
|
|
375
|
+
*/
|
|
376
|
+
static void do_test_default_topic_conf(void) {
|
|
377
|
+
rd_kafka_conf_t *conf;
|
|
378
|
+
rd_kafka_topic_conf_t *tconf;
|
|
379
|
+
const char *val, *exp_val;
|
|
380
|
+
|
|
381
|
+
SUB_TEST_QUICK();
|
|
382
|
+
|
|
383
|
+
conf = rd_kafka_conf_new();
|
|
384
|
+
|
|
385
|
+
/* Set topic-level property, this will create the default topic config*/
|
|
386
|
+
exp_val = "1234";
|
|
387
|
+
test_conf_set(conf, "message.timeout.ms", exp_val);
|
|
388
|
+
|
|
389
|
+
/* Get the default topic config */
|
|
390
|
+
tconf = rd_kafka_conf_get_default_topic_conf(conf);
|
|
391
|
+
TEST_ASSERT(tconf != NULL, "");
|
|
392
|
+
|
|
393
|
+
/* Get value from global config by fall-thru */
|
|
394
|
+
val = test_conf_get(conf, "message.timeout.ms");
|
|
395
|
+
TEST_ASSERT(val && !strcmp(val, exp_val),
|
|
396
|
+
"Expected (conf) message.timeout.ms=%s, not %s", exp_val,
|
|
397
|
+
val ? val : "(NULL)");
|
|
398
|
+
|
|
399
|
+
/* Get value from default topic config */
|
|
400
|
+
val = test_topic_conf_get(tconf, "message.timeout.ms");
|
|
401
|
+
TEST_ASSERT(val && !strcmp(val, exp_val),
|
|
402
|
+
"Expected (topic conf) message.timeout.ms=%s, not %s",
|
|
403
|
+
exp_val, val ? val : "(NULL)");
|
|
404
|
+
|
|
405
|
+
/* Now change the value, should be reflected in both. */
|
|
406
|
+
exp_val = "4444";
|
|
407
|
+
test_topic_conf_set(tconf, "message.timeout.ms", exp_val);
|
|
408
|
+
|
|
409
|
+
/* Get value from global config by fall-thru */
|
|
410
|
+
val = test_conf_get(conf, "message.timeout.ms");
|
|
411
|
+
TEST_ASSERT(val && !strcmp(val, exp_val),
|
|
412
|
+
"Expected (conf) message.timeout.ms=%s, not %s", exp_val,
|
|
413
|
+
val ? val : "(NULL)");
|
|
414
|
+
|
|
415
|
+
/* Get value from default topic config */
|
|
416
|
+
val = test_topic_conf_get(tconf, "message.timeout.ms");
|
|
417
|
+
TEST_ASSERT(val && !strcmp(val, exp_val),
|
|
418
|
+
"Expected (topic conf) message.timeout.ms=%s, not %s",
|
|
419
|
+
exp_val, val ? val : "(NULL)");
|
|
420
|
+
|
|
421
|
+
|
|
422
|
+
rd_kafka_conf_destroy(conf);
|
|
423
|
+
|
|
424
|
+
SUB_TEST_PASS();
|
|
425
|
+
}
|
|
426
|
+
|
|
427
|
+
|
|
428
|
+
/**
|
|
429
|
+
* @brief Verify behaviour of checking that message.timeout.ms fits within
|
|
430
|
+
* configured linger.ms. By larry-cdn77.
|
|
431
|
+
*/
|
|
432
|
+
static void do_message_timeout_linger_checks(void) {
|
|
433
|
+
rd_kafka_conf_t *conf;
|
|
434
|
+
rd_kafka_topic_conf_t *tconf;
|
|
435
|
+
rd_kafka_t *rk;
|
|
436
|
+
char errstr[512];
|
|
437
|
+
int i;
|
|
438
|
+
const char values[7][3][40] = {
|
|
439
|
+
{"-", "-", "default and L and M"},
|
|
440
|
+
{"100", "-", "set L such that L<M"},
|
|
441
|
+
{"-", "300000", "set M such that L<M"},
|
|
442
|
+
{"100", "300000", "set L and M such that L<M"},
|
|
443
|
+
{"500000", "-", "!set L such that L>=M"},
|
|
444
|
+
{"-", "10", "set M such that L>=M"},
|
|
445
|
+
{"500000", "10", "!set L and M such that L>=M"}};
|
|
446
|
+
|
|
447
|
+
SUB_TEST_QUICK();
|
|
448
|
+
|
|
449
|
+
for (i = 0; i < 7; i++) {
|
|
450
|
+
const char *linger = values[i][0];
|
|
451
|
+
const char *msgtimeout = values[i][1];
|
|
452
|
+
const char *desc = values[i][2];
|
|
453
|
+
rd_bool_t expect_fail = *desc == '!';
|
|
454
|
+
|
|
455
|
+
if (expect_fail)
|
|
456
|
+
desc++; /* Push past the '!' */
|
|
457
|
+
|
|
458
|
+
conf = rd_kafka_conf_new();
|
|
459
|
+
tconf = rd_kafka_topic_conf_new();
|
|
460
|
+
|
|
461
|
+
if (*linger != '-')
|
|
462
|
+
test_conf_set(conf, "linger.ms", linger);
|
|
463
|
+
|
|
464
|
+
if (*msgtimeout != '-')
|
|
465
|
+
test_topic_conf_set(tconf, "message.timeout.ms",
|
|
466
|
+
msgtimeout);
|
|
467
|
+
|
|
468
|
+
rd_kafka_conf_set_default_topic_conf(conf, tconf);
|
|
469
|
+
|
|
470
|
+
rk = rd_kafka_new(RD_KAFKA_PRODUCER, conf, errstr,
|
|
471
|
+
sizeof(errstr));
|
|
472
|
+
|
|
473
|
+
if (!rk)
|
|
474
|
+
TEST_SAY("#%d \"%s\": rd_kafka_new() failed: %s\n", i,
|
|
475
|
+
desc, errstr);
|
|
476
|
+
else
|
|
477
|
+
TEST_SAY("#%d \"%s\": rd_kafka_new() succeeded\n", i,
|
|
478
|
+
desc);
|
|
479
|
+
|
|
480
|
+
if (!expect_fail) {
|
|
481
|
+
TEST_ASSERT(rk != NULL,
|
|
482
|
+
"Expected success: "
|
|
483
|
+
"message timeout linger: %s: %s",
|
|
484
|
+
desc, errstr);
|
|
485
|
+
|
|
486
|
+
rd_kafka_destroy(rk);
|
|
487
|
+
|
|
488
|
+
} else {
|
|
489
|
+
TEST_ASSERT(rk == NULL,
|
|
490
|
+
"Expected failure: "
|
|
491
|
+
"message timeout linger: %s",
|
|
492
|
+
desc);
|
|
493
|
+
|
|
494
|
+
rd_kafka_conf_destroy(conf);
|
|
495
|
+
}
|
|
496
|
+
}
|
|
497
|
+
|
|
498
|
+
SUB_TEST_PASS();
|
|
499
|
+
}
|
|
500
|
+
|
|
501
|
+
|
|
502
|
+
int main_0004_conf(int argc, char **argv) {
|
|
503
|
+
rd_kafka_t *rk;
|
|
504
|
+
rd_kafka_topic_t *rkt;
|
|
505
|
+
rd_kafka_conf_t *ignore_conf, *conf, *conf2;
|
|
506
|
+
rd_kafka_topic_conf_t *ignore_topic_conf, *tconf, *tconf2;
|
|
507
|
+
char errstr[512];
|
|
508
|
+
rd_kafka_resp_err_t err;
|
|
509
|
+
const char **arr_orig, **arr_dup;
|
|
510
|
+
size_t cnt_orig, cnt_dup;
|
|
511
|
+
int i;
|
|
512
|
+
const char *topic;
|
|
513
|
+
static const char *gconfs[] = {
|
|
514
|
+
"message.max.bytes",
|
|
515
|
+
"12345", /* int property */
|
|
516
|
+
"client.id",
|
|
517
|
+
"my id", /* string property */
|
|
518
|
+
"debug",
|
|
519
|
+
"topic,metadata,interceptor", /* S2F property */
|
|
520
|
+
"topic.blacklist",
|
|
521
|
+
"__.*", /* #778 */
|
|
522
|
+
"auto.offset.reset",
|
|
523
|
+
"earliest", /* Global->Topic fallthru */
|
|
524
|
+
#if WITH_ZLIB
|
|
525
|
+
"compression.codec",
|
|
526
|
+
"gzip", /* S2I property */
|
|
527
|
+
#endif
|
|
528
|
+
#if defined(_WIN32)
|
|
529
|
+
"ssl.ca.certificate.stores",
|
|
530
|
+
"Intermediate ,, Root ,",
|
|
531
|
+
#endif
|
|
532
|
+
"client.dns.lookup",
|
|
533
|
+
"resolve_canonical_bootstrap_servers_only",
|
|
534
|
+
NULL};
|
|
535
|
+
static const char *tconfs[] = {"request.required.acks",
|
|
536
|
+
"-1", /* int */
|
|
537
|
+
"auto.commit.enable",
|
|
538
|
+
"false", /* bool */
|
|
539
|
+
"auto.offset.reset",
|
|
540
|
+
"error", /* S2I */
|
|
541
|
+
"offset.store.path",
|
|
542
|
+
"my/path", /* string */
|
|
543
|
+
NULL};
|
|
544
|
+
|
|
545
|
+
test_conf_init(&ignore_conf, &ignore_topic_conf, 10);
|
|
546
|
+
rd_kafka_conf_destroy(ignore_conf);
|
|
547
|
+
rd_kafka_topic_conf_destroy(ignore_topic_conf);
|
|
548
|
+
|
|
549
|
+
topic = test_mk_topic_name("0004", 0);
|
|
550
|
+
|
|
551
|
+
/* Set up a global config object */
|
|
552
|
+
conf = rd_kafka_conf_new();
|
|
553
|
+
|
|
554
|
+
for (i = 0; gconfs[i]; i += 2) {
|
|
555
|
+
if (rd_kafka_conf_set(conf, gconfs[i], gconfs[i + 1], errstr,
|
|
556
|
+
sizeof(errstr)) != RD_KAFKA_CONF_OK)
|
|
557
|
+
TEST_FAIL("%s\n", errstr);
|
|
558
|
+
}
|
|
559
|
+
|
|
560
|
+
rd_kafka_conf_set_dr_cb(conf, dr_cb);
|
|
561
|
+
rd_kafka_conf_set_error_cb(conf, error_cb);
|
|
562
|
+
/* interceptor configs are not exposed as strings or in dumps
|
|
563
|
+
* so the dump verification step will not cover them, but valgrind
|
|
564
|
+
* will help track down memory leaks/use-after-free etc. */
|
|
565
|
+
err = rd_kafka_conf_interceptor_add_on_new(conf, "testic", my_on_new,
|
|
566
|
+
NULL);
|
|
567
|
+
TEST_ASSERT(!err, "add_on_new() failed: %s", rd_kafka_err2str(err));
|
|
568
|
+
|
|
569
|
+
/* Set up a topic config object */
|
|
570
|
+
tconf = rd_kafka_topic_conf_new();
|
|
571
|
+
|
|
572
|
+
rd_kafka_topic_conf_set_partitioner_cb(tconf, partitioner);
|
|
573
|
+
rd_kafka_topic_conf_set_opaque(tconf, (void *)0xbeef);
|
|
574
|
+
|
|
575
|
+
for (i = 0; tconfs[i]; i += 2) {
|
|
576
|
+
if (rd_kafka_topic_conf_set(tconf, tconfs[i], tconfs[i + 1],
|
|
577
|
+
errstr,
|
|
578
|
+
sizeof(errstr)) != RD_KAFKA_CONF_OK)
|
|
579
|
+
TEST_FAIL("%s\n", errstr);
|
|
580
|
+
}
|
|
581
|
+
|
|
582
|
+
|
|
583
|
+
/* Verify global config */
|
|
584
|
+
arr_orig = rd_kafka_conf_dump(conf, &cnt_orig);
|
|
585
|
+
conf_verify(__LINE__, arr_orig, cnt_orig, gconfs);
|
|
586
|
+
|
|
587
|
+
/* Verify copied global config */
|
|
588
|
+
conf2 = rd_kafka_conf_dup(conf);
|
|
589
|
+
arr_dup = rd_kafka_conf_dump(conf2, &cnt_dup);
|
|
590
|
+
conf_verify(__LINE__, arr_dup, cnt_dup, gconfs);
|
|
591
|
+
conf_cmp("global", arr_orig, cnt_orig, arr_dup, cnt_dup);
|
|
592
|
+
rd_kafka_conf_dump_free(arr_orig, cnt_orig);
|
|
593
|
+
rd_kafka_conf_dump_free(arr_dup, cnt_dup);
|
|
594
|
+
|
|
595
|
+
/* Verify topic config */
|
|
596
|
+
arr_orig = rd_kafka_topic_conf_dump(tconf, &cnt_orig);
|
|
597
|
+
conf_verify(__LINE__, arr_orig, cnt_orig, tconfs);
|
|
598
|
+
|
|
599
|
+
/* Verify copied topic config */
|
|
600
|
+
tconf2 = rd_kafka_topic_conf_dup(tconf);
|
|
601
|
+
arr_dup = rd_kafka_topic_conf_dump(tconf2, &cnt_dup);
|
|
602
|
+
conf_verify(__LINE__, arr_dup, cnt_dup, tconfs);
|
|
603
|
+
conf_cmp("topic", arr_orig, cnt_orig, arr_dup, cnt_dup);
|
|
604
|
+
rd_kafka_conf_dump_free(arr_orig, cnt_orig);
|
|
605
|
+
rd_kafka_conf_dump_free(arr_dup, cnt_dup);
|
|
606
|
+
|
|
607
|
+
|
|
608
|
+
/*
|
|
609
|
+
* Create kafka instances using original and copied confs
|
|
610
|
+
*/
|
|
611
|
+
|
|
612
|
+
/* original */
|
|
613
|
+
TEST_ASSERT(on_new_call_cnt == 0, "expected 0 on_new call, not %d",
|
|
614
|
+
on_new_call_cnt);
|
|
615
|
+
on_new_call_cnt = 0;
|
|
616
|
+
rk = test_create_handle(RD_KAFKA_PRODUCER, conf);
|
|
617
|
+
TEST_ASSERT(on_new_call_cnt == 1, "expected 1 on_new call, not %d",
|
|
618
|
+
on_new_call_cnt);
|
|
619
|
+
|
|
620
|
+
rkt = rd_kafka_topic_new(rk, topic, tconf);
|
|
621
|
+
if (!rkt)
|
|
622
|
+
TEST_FAIL("Failed to create topic: %s\n", rd_strerror(errno));
|
|
623
|
+
|
|
624
|
+
rd_kafka_topic_destroy(rkt);
|
|
625
|
+
rd_kafka_destroy(rk);
|
|
626
|
+
|
|
627
|
+
/* copied */
|
|
628
|
+
on_new_call_cnt = 0; /* interceptors are not copied. */
|
|
629
|
+
rk = test_create_handle(RD_KAFKA_PRODUCER, conf2);
|
|
630
|
+
TEST_ASSERT(on_new_call_cnt == 0, "expected 0 on_new call, not %d",
|
|
631
|
+
on_new_call_cnt);
|
|
632
|
+
|
|
633
|
+
rkt = rd_kafka_topic_new(rk, topic, tconf2);
|
|
634
|
+
if (!rkt)
|
|
635
|
+
TEST_FAIL("Failed to create topic: %s\n", rd_strerror(errno));
|
|
636
|
+
rd_kafka_topic_destroy(rkt);
|
|
637
|
+
rd_kafka_destroy(rk);
|
|
638
|
+
|
|
639
|
+
|
|
640
|
+
/* Incremental S2F property.
|
|
641
|
+
* NOTE: The order of fields returned in get() is hardcoded here. */
|
|
642
|
+
{
|
|
643
|
+
static const char *s2fs[] = {"generic,broker,queue,cgrp",
|
|
644
|
+
"generic,broker,queue,cgrp",
|
|
645
|
+
|
|
646
|
+
"-broker,+queue,topic",
|
|
647
|
+
"generic,topic,queue,cgrp",
|
|
648
|
+
|
|
649
|
+
"-all,security,-fetch,+metadata",
|
|
650
|
+
"metadata,security",
|
|
651
|
+
|
|
652
|
+
NULL};
|
|
653
|
+
|
|
654
|
+
TEST_SAY("Incremental S2F tests\n");
|
|
655
|
+
conf = rd_kafka_conf_new();
|
|
656
|
+
|
|
657
|
+
for (i = 0; s2fs[i]; i += 2) {
|
|
658
|
+
const char *val;
|
|
659
|
+
|
|
660
|
+
TEST_SAY(" Set: %s\n", s2fs[i]);
|
|
661
|
+
test_conf_set(conf, "debug", s2fs[i]);
|
|
662
|
+
val = test_conf_get(conf, "debug");
|
|
663
|
+
TEST_SAY(" Now: %s\n", val);
|
|
664
|
+
|
|
665
|
+
if (strcmp(val, s2fs[i + 1]))
|
|
666
|
+
TEST_FAIL_LATER(
|
|
667
|
+
"\n"
|
|
668
|
+
"Expected: %s\n"
|
|
669
|
+
" Got: %s",
|
|
670
|
+
s2fs[i + 1], val);
|
|
671
|
+
}
|
|
672
|
+
rd_kafka_conf_destroy(conf);
|
|
673
|
+
}
|
|
674
|
+
|
|
675
|
+
{
|
|
676
|
+
rd_kafka_conf_res_t res;
|
|
677
|
+
|
|
678
|
+
TEST_SAY("Error reporting for S2F properties\n");
|
|
679
|
+
conf = rd_kafka_conf_new();
|
|
680
|
+
|
|
681
|
+
res =
|
|
682
|
+
rd_kafka_conf_set(conf, "debug", "cgrp,invalid-value,topic",
|
|
683
|
+
errstr, sizeof(errstr));
|
|
684
|
+
|
|
685
|
+
TEST_ASSERT(
|
|
686
|
+
res == RD_KAFKA_CONF_INVALID,
|
|
687
|
+
"expected 'debug=invalid-value' to fail with INVALID, "
|
|
688
|
+
"not %d",
|
|
689
|
+
res);
|
|
690
|
+
TEST_ASSERT(strstr(errstr, "invalid-value"),
|
|
691
|
+
"expected invalid value to be mentioned in error, "
|
|
692
|
+
"not \"%s\"",
|
|
693
|
+
errstr);
|
|
694
|
+
TEST_ASSERT(!strstr(errstr, "cgrp") && !strstr(errstr, "topic"),
|
|
695
|
+
"expected only invalid value to be mentioned, "
|
|
696
|
+
"not \"%s\"",
|
|
697
|
+
errstr);
|
|
698
|
+
TEST_SAY(_C_GRN "Ok: %s\n" _C_CLR, errstr);
|
|
699
|
+
|
|
700
|
+
rd_kafka_conf_destroy(conf);
|
|
701
|
+
}
|
|
702
|
+
|
|
703
|
+
#if WITH_SSL
|
|
704
|
+
{
|
|
705
|
+
TEST_SAY(
|
|
706
|
+
"Verifying that ssl.ca.location is not "
|
|
707
|
+
"overwritten (#3566)\n");
|
|
708
|
+
|
|
709
|
+
conf = rd_kafka_conf_new();
|
|
710
|
+
|
|
711
|
+
test_conf_set(conf, "security.protocol", "SSL");
|
|
712
|
+
test_conf_set(conf, "ssl.ca.location", "/?/does/!/not/exist!");
|
|
713
|
+
|
|
714
|
+
rk = rd_kafka_new(RD_KAFKA_PRODUCER, conf, errstr,
|
|
715
|
+
sizeof(errstr));
|
|
716
|
+
TEST_ASSERT(!rk,
|
|
717
|
+
"Expected rd_kafka_new() to fail with "
|
|
718
|
+
"invalid ssl.ca.location");
|
|
719
|
+
TEST_SAY("rd_kafka_new() failed as expected: %s\n", errstr);
|
|
720
|
+
rd_kafka_conf_destroy(conf);
|
|
721
|
+
}
|
|
722
|
+
|
|
723
|
+
#if WITH_OAUTHBEARER_OIDC
|
|
724
|
+
{
|
|
725
|
+
TEST_SAY(
|
|
726
|
+
"Verify that https.ca.location is mutually "
|
|
727
|
+
"exclusive with https.ca.pem\n");
|
|
728
|
+
|
|
729
|
+
conf = rd_kafka_conf_new();
|
|
730
|
+
|
|
731
|
+
test_conf_set(conf, "https.ca.pem",
|
|
732
|
+
"-----BEGIN CERTIFICATE-----");
|
|
733
|
+
test_conf_set(conf, "https.ca.location",
|
|
734
|
+
"/path/to/certificate.pem");
|
|
735
|
+
|
|
736
|
+
rk = rd_kafka_new(RD_KAFKA_PRODUCER, conf, errstr,
|
|
737
|
+
sizeof(errstr));
|
|
738
|
+
TEST_ASSERT(
|
|
739
|
+
!rk, "Expected rd_kafka_new() to fail, but it succeeded");
|
|
740
|
+
TEST_ASSERT(!strcmp(errstr,
|
|
741
|
+
"`https.ca.location` and "
|
|
742
|
+
"`https.ca.pem` are mutually exclusive"),
|
|
743
|
+
"Expected rd_kafka_new() to fail with: "
|
|
744
|
+
"\"`https.ca.location` and `https.ca.pem` "
|
|
745
|
+
"are mutually exclusive\", got: \"%s\"",
|
|
746
|
+
errstr);
|
|
747
|
+
rd_kafka_conf_destroy(conf);
|
|
748
|
+
}
|
|
749
|
+
{
|
|
750
|
+
TEST_SAY(
|
|
751
|
+
"Verify that https.ca.location gives an error when "
|
|
752
|
+
"set to an invalid path\n");
|
|
753
|
+
|
|
754
|
+
conf = rd_kafka_conf_new();
|
|
755
|
+
|
|
756
|
+
test_conf_set(conf, "https.ca.location",
|
|
757
|
+
"/?/does/!/not/exist!");
|
|
758
|
+
|
|
759
|
+
rk = rd_kafka_new(RD_KAFKA_PRODUCER, conf, errstr,
|
|
760
|
+
sizeof(errstr));
|
|
761
|
+
TEST_ASSERT(
|
|
762
|
+
!rk, "Expected rd_kafka_new() to fail, but it succeeded");
|
|
763
|
+
TEST_ASSERT(!strcmp(errstr,
|
|
764
|
+
"`https.ca.location` must be "
|
|
765
|
+
"an existing file or directory"),
|
|
766
|
+
"Expected rd_kafka_new() to fail with: "
|
|
767
|
+
"\"`https.ca.location` must be "
|
|
768
|
+
"an existing file or directory\", got: \"%s\"",
|
|
769
|
+
errstr);
|
|
770
|
+
rd_kafka_conf_destroy(conf);
|
|
771
|
+
}
|
|
772
|
+
{
|
|
773
|
+
TEST_SAY(
|
|
774
|
+
"Verify that https.ca.location doesn't give an error when "
|
|
775
|
+
"set to `probe`\n");
|
|
776
|
+
|
|
777
|
+
conf = rd_kafka_conf_new();
|
|
778
|
+
|
|
779
|
+
test_conf_set(conf, "https.ca.location", "probe");
|
|
780
|
+
|
|
781
|
+
rk = rd_kafka_new(RD_KAFKA_PRODUCER, conf, errstr,
|
|
782
|
+
sizeof(errstr));
|
|
783
|
+
TEST_ASSERT(
|
|
784
|
+
rk, "Expected rd_kafka_new() not to fail, but it failed");
|
|
785
|
+
|
|
786
|
+
rd_kafka_destroy(rk);
|
|
787
|
+
}
|
|
788
|
+
#endif /* WITH_OAUTHBEARER_OIDC */
|
|
789
|
+
|
|
790
|
+
/* Verify that OpenSSL_AppLink is not needed on Windows (#3554) */
|
|
791
|
+
|
|
792
|
+
#ifdef _WIN32
|
|
793
|
+
{
|
|
794
|
+
FILE *fp;
|
|
795
|
+
TEST_SAY(
|
|
796
|
+
"Verifying that OpenSSL_AppLink "
|
|
797
|
+
"is not needed (#3554)\n");
|
|
798
|
+
|
|
799
|
+
/* Create dummy file so the file open works,
|
|
800
|
+
* but parsing fails. */
|
|
801
|
+
fp = fopen("_tmp_0004", "w");
|
|
802
|
+
TEST_ASSERT(fp != NULL, "Failed to create dummy file: %s",
|
|
803
|
+
rd_strerror(errno));
|
|
804
|
+
if (fwrite("?", 1, 1, fp) != 1)
|
|
805
|
+
TEST_FAIL("Failed to write to dummy file _tmp_0004: %s",
|
|
806
|
+
rd_strerror(errno));
|
|
807
|
+
fclose(fp);
|
|
808
|
+
|
|
809
|
+
conf = rd_kafka_conf_new();
|
|
810
|
+
|
|
811
|
+
test_conf_set(conf, "security.protocol", "SSL");
|
|
812
|
+
test_conf_set(conf, "ssl.keystore.location", "_tmp_0004");
|
|
813
|
+
test_conf_set(conf, "ssl.keystore.password", "x");
|
|
814
|
+
|
|
815
|
+
/* Prior to the fix OpenSSL will assert with a message like
|
|
816
|
+
* this: "OPENSSL_Uplink(00007FF9C0229D30,08): no
|
|
817
|
+
* OPENSSL_Applink"
|
|
818
|
+
* and the program will exit with error code 1. */
|
|
819
|
+
rk = rd_kafka_new(RD_KAFKA_PRODUCER, conf, errstr,
|
|
820
|
+
sizeof(errstr));
|
|
821
|
+
_unlink("tmp_0004");
|
|
822
|
+
|
|
823
|
+
TEST_ASSERT(!rk,
|
|
824
|
+
"Expected rd_kafka_new() to fail due to "
|
|
825
|
+
"dummy ssl.keystore.location");
|
|
826
|
+
TEST_ASSERT(strstr(errstr, "ssl.keystore.location") != NULL,
|
|
827
|
+
"Expected rd_kafka_new() to fail with "
|
|
828
|
+
"dummy ssl.keystore.location, not: %s",
|
|
829
|
+
errstr);
|
|
830
|
+
|
|
831
|
+
TEST_SAY("rd_kafka_new() failed as expected: %s\n", errstr);
|
|
832
|
+
}
|
|
833
|
+
#endif /* _WIN32 */
|
|
834
|
+
|
|
835
|
+
#endif /* WITH_SSL */
|
|
836
|
+
|
|
837
|
+
/* Canonical int values, aliases, s2i-verified strings, doubles */
|
|
838
|
+
{
|
|
839
|
+
static const struct {
|
|
840
|
+
const char *prop;
|
|
841
|
+
const char *val;
|
|
842
|
+
const char *exp;
|
|
843
|
+
int is_global;
|
|
844
|
+
} props[] = {
|
|
845
|
+
{"request.required.acks", "0", "0"},
|
|
846
|
+
{"request.required.acks", "-1", "-1"},
|
|
847
|
+
{"request.required.acks", "1", "1"},
|
|
848
|
+
{"acks", "3", "3"}, /* alias test */
|
|
849
|
+
{"request.required.acks", "393", "393"},
|
|
850
|
+
{"request.required.acks", "bad", NULL},
|
|
851
|
+
{"request.required.acks", "all", "-1"},
|
|
852
|
+
{"request.required.acks", "all", "-1", 1 /*fallthru*/},
|
|
853
|
+
{"acks", "0", "0"}, /* alias test */
|
|
854
|
+
#if WITH_SASL
|
|
855
|
+
{"sasl.mechanisms", "GSSAPI", "GSSAPI", 1},
|
|
856
|
+
{"sasl.mechanisms", "PLAIN", "PLAIN", 1},
|
|
857
|
+
{"sasl.mechanisms", "GSSAPI,PLAIN", NULL, 1},
|
|
858
|
+
{"sasl.mechanisms", "", NULL, 1},
|
|
859
|
+
#endif
|
|
860
|
+
{"linger.ms", "12555.3", "12555.3", 1},
|
|
861
|
+
{"linger.ms", "1500.000", "1500", 1},
|
|
862
|
+
{"linger.ms", "0.0001", "0.0001", 1},
|
|
863
|
+
{NULL}};
|
|
864
|
+
|
|
865
|
+
TEST_SAY("Canonical tests\n");
|
|
866
|
+
tconf = rd_kafka_topic_conf_new();
|
|
867
|
+
conf = rd_kafka_conf_new();
|
|
868
|
+
|
|
869
|
+
for (i = 0; props[i].prop; i++) {
|
|
870
|
+
char dest[64];
|
|
871
|
+
size_t destsz;
|
|
872
|
+
rd_kafka_conf_res_t res;
|
|
873
|
+
|
|
874
|
+
TEST_SAY(" Set: %s=%s expect %s (%s)\n", props[i].prop,
|
|
875
|
+
props[i].val, props[i].exp,
|
|
876
|
+
props[i].is_global ? "global" : "topic");
|
|
877
|
+
|
|
878
|
+
|
|
879
|
+
/* Set value */
|
|
880
|
+
if (props[i].is_global)
|
|
881
|
+
res = rd_kafka_conf_set(conf, props[i].prop,
|
|
882
|
+
props[i].val, errstr,
|
|
883
|
+
sizeof(errstr));
|
|
884
|
+
else
|
|
885
|
+
res = rd_kafka_topic_conf_set(
|
|
886
|
+
tconf, props[i].prop, props[i].val, errstr,
|
|
887
|
+
sizeof(errstr));
|
|
888
|
+
if ((res == RD_KAFKA_CONF_OK ? 1 : 0) !=
|
|
889
|
+
(props[i].exp ? 1 : 0))
|
|
890
|
+
TEST_FAIL("Expected %s, got %s",
|
|
891
|
+
props[i].exp ? "success" : "failure",
|
|
892
|
+
(res == RD_KAFKA_CONF_OK
|
|
893
|
+
? "OK"
|
|
894
|
+
: (res == RD_KAFKA_CONF_INVALID
|
|
895
|
+
? "INVALID"
|
|
896
|
+
: "UNKNOWN")));
|
|
897
|
+
|
|
898
|
+
if (!props[i].exp)
|
|
899
|
+
continue;
|
|
900
|
+
|
|
901
|
+
/* Get value and compare to expected result */
|
|
902
|
+
destsz = sizeof(dest);
|
|
903
|
+
if (props[i].is_global)
|
|
904
|
+
res = rd_kafka_conf_get(conf, props[i].prop,
|
|
905
|
+
dest, &destsz);
|
|
906
|
+
else
|
|
907
|
+
res = rd_kafka_topic_conf_get(
|
|
908
|
+
tconf, props[i].prop, dest, &destsz);
|
|
909
|
+
TEST_ASSERT(res == RD_KAFKA_CONF_OK,
|
|
910
|
+
".._conf_get(%s) returned %d",
|
|
911
|
+
props[i].prop, res);
|
|
912
|
+
|
|
913
|
+
TEST_ASSERT(!strcmp(props[i].exp, dest),
|
|
914
|
+
"Expected \"%s\", got \"%s\"", props[i].exp,
|
|
915
|
+
dest);
|
|
916
|
+
}
|
|
917
|
+
rd_kafka_topic_conf_destroy(tconf);
|
|
918
|
+
rd_kafka_conf_destroy(conf);
|
|
919
|
+
}
|
|
920
|
+
|
|
921
|
+
do_test_kafka_new_failures();
|
|
922
|
+
|
|
923
|
+
do_test_special_invalid_conf();
|
|
924
|
+
|
|
925
|
+
do_test_idempotence_conf();
|
|
926
|
+
|
|
927
|
+
do_test_instance_conf();
|
|
928
|
+
|
|
929
|
+
do_test_default_topic_conf();
|
|
930
|
+
|
|
931
|
+
do_message_timeout_linger_checks();
|
|
932
|
+
|
|
933
|
+
return 0;
|
|
934
|
+
}
|