@platformatic/rdkafka 4.0.1 → 4.1.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/README.md +5 -5
- package/bench/seed.sh +0 -0
- package/binding.gyp +8 -1
- package/ci/prepublish.js +0 -1
- package/config.d.ts +126 -10
- package/configure +0 -0
- package/deps/librdkafka/.semaphore/run-all-tests.yml +77 -0
- package/deps/librdkafka/.semaphore/semaphore-integration.yml +250 -0
- package/deps/librdkafka/.semaphore/semaphore.yml +67 -44
- package/deps/librdkafka/.semaphore/verify-linux-packages.yml +41 -0
- package/deps/librdkafka/CHANGELOG.md +471 -1
- package/deps/librdkafka/CONFIGURATION.md +29 -9
- package/deps/librdkafka/INTRODUCTION.md +909 -601
- package/deps/librdkafka/LICENSES.txt +592 -1
- package/deps/librdkafka/Makefile +2 -1
- package/deps/librdkafka/_mkltmpuuWEwa.c +13 -0
- package/deps/librdkafka/configure +0 -0
- package/deps/librdkafka/debian/rules +0 -0
- package/deps/librdkafka/dev-conf.sh +0 -0
- package/deps/librdkafka/examples/consumer.c +18 -8
- package/deps/librdkafka/examples/describe_consumer_groups.c +25 -6
- package/deps/librdkafka/examples/incremental_alter_configs.c +4 -5
- package/deps/librdkafka/examples/kafkatest_verifiable_client.cpp +26 -42
- package/deps/librdkafka/examples/openssl_engine_example.cpp +3 -4
- package/deps/librdkafka/examples/producer.cpp +2 -2
- package/deps/librdkafka/examples/user_scram.c +4 -5
- package/deps/librdkafka/examples/win_ssl_cert_store.cpp +4 -3
- package/deps/librdkafka/lds-gen.py +0 -0
- package/deps/librdkafka/mklove/Makefile.base +0 -0
- package/deps/librdkafka/packaging/RELEASE.md +8 -0
- package/deps/librdkafka/packaging/alpine/build-alpine.sh +0 -0
- package/deps/librdkafka/packaging/cp/README.md +4 -1
- package/deps/librdkafka/packaging/cp/check_features.c +12 -4
- package/deps/librdkafka/packaging/cp/verify-deb.sh +6 -6
- package/deps/librdkafka/packaging/cp/verify-packages.sh +52 -31
- package/deps/librdkafka/packaging/cp/verify-rpm.sh +6 -13
- package/deps/librdkafka/packaging/debian/rules +0 -0
- package/deps/librdkafka/packaging/get_version.py +0 -0
- package/deps/librdkafka/packaging/homebrew/brew-update-pr.sh +0 -0
- package/deps/librdkafka/packaging/mingw-w64/{travis-before-install.sh → export-variables.sh} +0 -7
- package/deps/librdkafka/packaging/mingw-w64/semaphoreci-build.sh +1 -1
- package/deps/librdkafka/packaging/nuget/artifact.py +0 -0
- package/deps/librdkafka/packaging/nuget/cleanup-s3.py +0 -0
- package/deps/librdkafka/packaging/nuget/nuget.sh +0 -0
- package/deps/librdkafka/packaging/nuget/packaging.py +0 -0
- package/deps/librdkafka/packaging/nuget/push-to-nuget.sh +0 -0
- package/deps/librdkafka/packaging/nuget/release.py +0 -0
- package/deps/librdkafka/packaging/nuget/requirements.txt +3 -3
- package/deps/librdkafka/packaging/rpm/mock-on-docker.sh +0 -0
- package/deps/librdkafka/packaging/rpm/tests/run-test.sh +0 -0
- package/deps/librdkafka/packaging/rpm/tests/test-on-docker.sh +0 -0
- package/deps/librdkafka/packaging/tools/build-configurations-checks.sh +3 -1
- package/deps/librdkafka/packaging/tools/build-deb-package.sh +0 -0
- package/deps/librdkafka/packaging/tools/build-debian.sh +0 -0
- package/deps/librdkafka/packaging/tools/build-manylinux.sh +0 -0
- package/deps/librdkafka/packaging/tools/build-release-artifacts.sh +0 -0
- package/deps/librdkafka/packaging/tools/distro-build.sh +0 -0
- package/deps/librdkafka/packaging/tools/gh-release-checksums.py +0 -0
- package/deps/librdkafka/packaging/tools/rdutcoverage.sh +0 -0
- package/deps/librdkafka/packaging/tools/run-in-docker.sh +28 -0
- package/deps/librdkafka/packaging/tools/run-integration-tests.sh +31 -0
- package/deps/librdkafka/packaging/tools/run-style-check.sh +4 -0
- package/deps/librdkafka/packaging/tools/style-format.sh +6 -5
- package/deps/librdkafka/packaging/tools/update_rpcs_max_versions.py +100 -0
- package/deps/librdkafka/service.yml +154 -0
- package/deps/librdkafka/src/generate_proto.sh +0 -0
- package/deps/librdkafka/src/rd.h +145 -2
- package/deps/librdkafka/src/rdaddr.h +6 -7
- package/deps/librdkafka/src/rdatomic.h +15 -11
- package/deps/librdkafka/src/rdavg.h +3 -2
- package/deps/librdkafka/src/rdbase64.c +33 -2
- package/deps/librdkafka/src/rdbase64.h +2 -0
- package/deps/librdkafka/src/rdendian.h +10 -9
- package/deps/librdkafka/src/rdhttp.c +418 -100
- package/deps/librdkafka/src/rdhttp.h +23 -5
- package/deps/librdkafka/src/rdkafka.c +299 -145
- package/deps/librdkafka/src/rdkafka.h +89 -6
- package/deps/librdkafka/src/rdkafka_admin.c +482 -105
- package/deps/librdkafka/src/rdkafka_admin.h +42 -0
- package/deps/librdkafka/src/rdkafka_broker.c +463 -312
- package/deps/librdkafka/src/rdkafka_broker.h +68 -10
- package/deps/librdkafka/src/rdkafka_buf.c +8 -5
- package/deps/librdkafka/src/rdkafka_buf.h +4 -3
- package/deps/librdkafka/src/rdkafka_cert.c +25 -1
- package/deps/librdkafka/src/rdkafka_cert.h +4 -3
- package/deps/librdkafka/src/rdkafka_cgrp.c +468 -143
- package/deps/librdkafka/src/rdkafka_cgrp.h +36 -2
- package/deps/librdkafka/src/rdkafka_conf.c +526 -102
- package/deps/librdkafka/src/rdkafka_conf.h +68 -4
- package/deps/librdkafka/src/rdkafka_feature.c +472 -35
- package/deps/librdkafka/src/rdkafka_feature.h +2 -0
- package/deps/librdkafka/src/rdkafka_fetcher.c +22 -2
- package/deps/librdkafka/src/rdkafka_fetcher.h +2 -2
- package/deps/librdkafka/src/rdkafka_int.h +84 -46
- package/deps/librdkafka/src/rdkafka_metadata.c +221 -136
- package/deps/librdkafka/src/rdkafka_metadata.h +15 -11
- package/deps/librdkafka/src/rdkafka_metadata_cache.c +279 -73
- package/deps/librdkafka/src/rdkafka_mock.c +795 -19
- package/deps/librdkafka/src/rdkafka_mock.h +119 -0
- package/deps/librdkafka/src/rdkafka_mock_cgrp.c +1298 -132
- package/deps/librdkafka/src/rdkafka_mock_handlers.c +345 -49
- package/deps/librdkafka/src/rdkafka_mock_int.h +180 -61
- package/deps/librdkafka/src/rdkafka_msg.c +35 -19
- package/deps/librdkafka/src/rdkafka_msg.h +3 -3
- package/deps/librdkafka/src/rdkafka_msgset_writer.c +14 -10
- package/deps/librdkafka/src/rdkafka_offset.c +33 -5
- package/deps/librdkafka/src/rdkafka_op.c +1 -1
- package/deps/librdkafka/src/rdkafka_op.h +45 -21
- package/deps/librdkafka/src/rdkafka_partition.c +118 -23
- package/deps/librdkafka/src/rdkafka_partition.h +16 -7
- package/deps/librdkafka/src/rdkafka_proto.h +4 -1
- package/deps/librdkafka/src/rdkafka_protocol.h +1 -0
- package/deps/librdkafka/src/rdkafka_queue.c +125 -48
- package/deps/librdkafka/src/rdkafka_queue.h +19 -0
- package/deps/librdkafka/src/rdkafka_range_assignor.c +1 -1
- package/deps/librdkafka/src/rdkafka_request.c +336 -64
- package/deps/librdkafka/src/rdkafka_request.h +24 -1
- package/deps/librdkafka/src/rdkafka_sasl.c +5 -3
- package/deps/librdkafka/src/rdkafka_sasl_oauthbearer.c +14 -10
- package/deps/librdkafka/src/rdkafka_sasl_oauthbearer_oidc.c +1166 -89
- package/deps/librdkafka/src/rdkafka_sasl_oauthbearer_oidc.h +13 -3
- package/deps/librdkafka/src/rdkafka_sasl_plain.c +3 -3
- package/deps/librdkafka/src/rdkafka_sasl_scram.c +4 -3
- package/deps/librdkafka/src/rdkafka_ssl.c +306 -81
- package/deps/librdkafka/src/rdkafka_ssl.h +22 -0
- package/deps/librdkafka/src/rdkafka_sticky_assignor.c +4 -0
- package/deps/librdkafka/src/rdkafka_telemetry.c +80 -23
- package/deps/librdkafka/src/rdkafka_telemetry_encode.c +5 -1
- package/deps/librdkafka/src/rdkafka_telemetry_encode.h +20 -20
- package/deps/librdkafka/src/rdkafka_topic.c +220 -137
- package/deps/librdkafka/src/rdkafka_topic.h +14 -8
- package/deps/librdkafka/src/rdkafka_transport.c +59 -47
- package/deps/librdkafka/src/rdkafka_transport.h +5 -0
- package/deps/librdkafka/src/rdkafka_txnmgr.c +6 -1
- package/deps/librdkafka/src/rdmap.c +6 -1
- package/deps/librdkafka/src/rdrand.c +11 -1
- package/deps/librdkafka/src/rdtime.h +48 -17
- package/deps/librdkafka/src/rdunittest.c +42 -25
- package/deps/librdkafka/src/rdunittest.h +2 -0
- package/deps/librdkafka/src/rdwin32.h +1 -1
- package/deps/librdkafka/src/regexp.c +47 -42
- package/deps/librdkafka/src/tinycthread_extra.c +45 -21
- package/deps/librdkafka/src/tinycthread_extra.h +7 -3
- package/deps/librdkafka/src-cpp/rdkafkacpp.h +28 -2
- package/deps/librdkafka/tests/0001-multiobj.c +4 -0
- package/deps/librdkafka/tests/0004-conf.c +103 -36
- package/deps/librdkafka/tests/0009-mock_cluster.c +1 -0
- package/deps/librdkafka/tests/0011-produce_batch.c +2 -1
- package/deps/librdkafka/tests/0016-client_swname.c +18 -3
- package/deps/librdkafka/tests/0017-compression.c +6 -8
- package/deps/librdkafka/tests/0018-cgrp_term.c +8 -3
- package/deps/librdkafka/tests/0021-rkt_destroy.c +1 -0
- package/deps/librdkafka/tests/0022-consume_batch.c +4 -1
- package/deps/librdkafka/tests/0026-consume_pause.c +12 -14
- package/deps/librdkafka/tests/0028-long_topicnames.c +1 -1
- package/deps/librdkafka/tests/0029-assign_offset.c +6 -8
- package/deps/librdkafka/tests/0030-offset_commit.c +2 -2
- package/deps/librdkafka/tests/0033-regex_subscribe.c +33 -17
- package/deps/librdkafka/tests/0034-offset_reset.c +25 -4
- package/deps/librdkafka/tests/0036-partial_fetch.c +1 -0
- package/deps/librdkafka/tests/0038-performance.c +1 -0
- package/deps/librdkafka/tests/0040-io_event.c +11 -5
- package/deps/librdkafka/tests/0041-fetch_max_bytes.c +1 -0
- package/deps/librdkafka/tests/0044-partition_cnt.c +3 -2
- package/deps/librdkafka/tests/0045-subscribe_update.c +284 -20
- package/deps/librdkafka/tests/0047-partial_buf_tmout.c +1 -0
- package/deps/librdkafka/tests/0048-partitioner.c +1 -1
- package/deps/librdkafka/tests/0050-subscribe_adds.c +1 -0
- package/deps/librdkafka/tests/0051-assign_adds.c +1 -0
- package/deps/librdkafka/tests/0052-msg_timestamps.c +22 -4
- package/deps/librdkafka/tests/0053-stats_cb.cpp +12 -20
- package/deps/librdkafka/tests/0055-producer_latency.c +176 -3
- package/deps/librdkafka/tests/0056-balanced_group_mt.c +6 -2
- package/deps/librdkafka/tests/0058-log.cpp +3 -3
- package/deps/librdkafka/tests/0059-bsearch.cpp +8 -4
- package/deps/librdkafka/tests/0061-consumer_lag.cpp +25 -5
- package/deps/librdkafka/tests/0067-empty_topic.cpp +3 -0
- package/deps/librdkafka/tests/0068-produce_timeout.c +21 -23
- package/deps/librdkafka/tests/0069-consumer_add_parts.c +3 -7
- package/deps/librdkafka/tests/0075-retry.c +38 -1
- package/deps/librdkafka/tests/0076-produce_retry.c +2 -0
- package/deps/librdkafka/tests/0077-compaction.c +8 -2
- package/deps/librdkafka/tests/0080-admin_ut.c +34 -4
- package/deps/librdkafka/tests/0081-admin.c +455 -155
- package/deps/librdkafka/tests/0082-fetch_max_bytes.cpp +4 -0
- package/deps/librdkafka/tests/0083-cb_event.c +8 -3
- package/deps/librdkafka/tests/0084-destroy_flags.c +14 -18
- package/deps/librdkafka/tests/0085-headers.cpp +4 -0
- package/deps/librdkafka/tests/0086-purge.c +40 -7
- package/deps/librdkafka/tests/0088-produce_metadata_timeout.c +1 -1
- package/deps/librdkafka/tests/0089-max_poll_interval.c +12 -7
- package/deps/librdkafka/tests/0090-idempotence.c +1 -2
- package/deps/librdkafka/tests/0091-max_poll_interval_timeout.c +5 -7
- package/deps/librdkafka/tests/0092-mixed_msgver.c +6 -0
- package/deps/librdkafka/tests/0093-holb.c +8 -5
- package/deps/librdkafka/tests/0094-idempotence_msg_timeout.c +1 -0
- package/deps/librdkafka/tests/0097-ssl_verify.cpp +262 -70
- package/deps/librdkafka/tests/0098-consumer-txn.cpp +16 -16
- package/deps/librdkafka/tests/0099-commit_metadata.c +1 -1
- package/deps/librdkafka/tests/0101-fetch-from-follower.cpp +1 -1
- package/deps/librdkafka/tests/0102-static_group_rebalance.c +317 -16
- package/deps/librdkafka/tests/0103-transactions.c +7 -7
- package/deps/librdkafka/tests/0104-fetch_from_follower_mock.c +1 -0
- package/deps/librdkafka/tests/0105-transactions_mock.c +18 -11
- package/deps/librdkafka/tests/0106-cgrp_sess_timeout.c +35 -14
- package/deps/librdkafka/tests/0107-topic_recreate.c +2 -2
- package/deps/librdkafka/tests/0109-auto_create_topics.cpp +86 -26
- package/deps/librdkafka/tests/0110-batch_size.cpp +1 -2
- package/deps/librdkafka/tests/0112-assign_unknown_part.c +3 -14
- package/deps/librdkafka/tests/0113-cooperative_rebalance.cpp +248 -104
- package/deps/librdkafka/tests/0114-sticky_partitioning.cpp +3 -3
- package/deps/librdkafka/tests/0115-producer_auth.cpp +4 -1
- package/deps/librdkafka/tests/0116-kafkaconsumer_close.cpp +7 -5
- package/deps/librdkafka/tests/0117-mock_errors.c +15 -5
- package/deps/librdkafka/tests/0118-commit_rebalance.c +41 -8
- package/deps/librdkafka/tests/0119-consumer_auth.cpp +20 -1
- package/deps/librdkafka/tests/0120-asymmetric_subscription.c +8 -3
- package/deps/librdkafka/tests/0125-immediate_flush.c +1 -1
- package/deps/librdkafka/tests/0126-oauthbearer_oidc.c +323 -8
- package/deps/librdkafka/tests/0129-fetch_aborted_msgs.c +1 -0
- package/deps/librdkafka/tests/0132-strategy_ordering.c +12 -4
- package/deps/librdkafka/tests/0133-ssl_keys.c +28 -6
- package/deps/librdkafka/tests/0137-barrier_batch_consume.c +24 -14
- package/deps/librdkafka/tests/0139-offset_validation_mock.c +510 -2
- package/deps/librdkafka/tests/0140-commit_metadata.cpp +1 -1
- package/deps/librdkafka/tests/0142-reauthentication.c +37 -17
- package/deps/librdkafka/tests/0143-exponential_backoff_mock.c +39 -40
- package/deps/librdkafka/tests/0146-metadata_mock.c +76 -15
- 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 +9 -6
- 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/CMakeLists.txt +6 -0
- package/deps/librdkafka/tests/LibrdkafkaTestApp.py +34 -9
- package/deps/librdkafka/tests/autotest.sh +0 -0
- package/deps/librdkafka/tests/broker_version_tests.py +0 -0
- package/deps/librdkafka/tests/buildbox.sh +0 -0
- package/deps/librdkafka/tests/cleanup-checker-tests.sh +0 -0
- package/deps/librdkafka/tests/cluster_testing.py +0 -0
- package/deps/librdkafka/tests/delete-test-topics.sh +0 -0
- package/deps/librdkafka/tests/fixtures/oauthbearer/jwt_assertion_template.json +10 -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 +42 -101
- package/deps/librdkafka/tests/fixtures/ssl/client2.intermediate.key +46 -0
- package/deps/librdkafka/tests/fixtures/ssl/client2.key +41 -29
- package/deps/librdkafka/tests/fixtures/ssl/create_keys.sh +112 -37
- package/deps/librdkafka/tests/gen-ssl-certs.sh +0 -0
- package/deps/librdkafka/tests/interactive_broker_version.py +0 -0
- package/deps/librdkafka/tests/java/Makefile +2 -1
- package/deps/librdkafka/tests/java/run-class.sh +0 -0
- package/deps/librdkafka/tests/lz4_manual_test.sh +0 -0
- package/deps/librdkafka/tests/multi-broker-version-test.sh +0 -0
- package/deps/librdkafka/tests/parse-refcnt.sh +0 -0
- package/deps/librdkafka/tests/performance_plot.py +0 -0
- package/deps/librdkafka/tests/requirements.txt +1 -1
- package/deps/librdkafka/tests/run-all-tests.sh +79 -0
- package/deps/librdkafka/tests/run-consumer-tests.sh +0 -0
- package/deps/librdkafka/tests/run-producer-tests.sh +0 -0
- package/deps/librdkafka/tests/run-test-batches.py +157 -0
- package/deps/librdkafka/tests/run-test.sh +0 -0
- package/deps/librdkafka/tests/sasl_test.py +0 -0
- package/deps/librdkafka/tests/test.c +478 -18
- package/deps/librdkafka/tests/test.h +62 -13
- package/deps/librdkafka/tests/testcpp.cpp +6 -1
- package/deps/librdkafka/tests/testcpp.h +30 -2
- package/deps/librdkafka/tests/testshared.h +16 -2
- package/deps/librdkafka/tests/tools/stats/graph.py +0 -0
- package/deps/librdkafka/tests/tools/stats/to_csv.py +1 -1
- package/deps/librdkafka/tests/trivup/trivup-0.14.0.tar.gz +0 -0
- package/deps/librdkafka/tests/until-fail.sh +0 -0
- package/deps/librdkafka/tests/xxxx-metadata.cpp +1 -1
- package/deps/librdkafka/vcpkg.json +1 -1
- package/deps/librdkafka/win32/setup-msys2.ps1 +24 -8
- package/deps/librdkafka/win32/setup-vcpkg.ps1 +28 -6
- package/deps/librdkafka/win32/tests/tests.vcxproj +6 -0
- package/deps/librdkafka/win32/wingetopt.h +5 -4
- package/errors.d.ts +27 -1
- package/lib/error.js +29 -3
- package/make_docs.sh +0 -0
- package/package.json +11 -11
- package/run_docker.sh +0 -0
- package/src/callbacks.cc +6 -9
- package/src/callbacks.h +1 -5
- package/test/kafka-consumer-worker.js +10 -7
- package/test/kafka-consumer.spec.js +32 -21
- package/ci/update-version.js +0 -123
- package/deps/librdkafka/.semaphore/project.yml +0 -43
- package/deps/librdkafka/.semaphore/project_public.yml +0 -20
- package/deps/librdkafka/win32/install-openssl.ps1 +0 -33
package/README.md
CHANGED
|
@@ -11,7 +11,7 @@ This project was forked from the great [https://github.com/blizzard/node-rdkafka
|
|
|
11
11
|
|
|
12
12
|
The `@platformatic/rdkafka` library is a high-performance NodeJS client for [Apache Kafka](http://kafka.apache.org/) that wraps the native [librdkafka](https://github.com/edenhill/librdkafka) library. All the complexity of balancing writes across partitions and managing (possibly ever-changing) brokers should be encapsulated in the library.
|
|
13
13
|
|
|
14
|
-
__This library currently uses `librdkafka` version `2.
|
|
14
|
+
__This library currently uses `librdkafka` version `2.12.0`.__
|
|
15
15
|
|
|
16
16
|
## Reference Docs
|
|
17
17
|
|
|
@@ -54,7 +54,7 @@ Using Alpine Linux? Check out the [docs](https://github.com/platformatic/rdkafka
|
|
|
54
54
|
|
|
55
55
|
### Windows
|
|
56
56
|
|
|
57
|
-
Windows build **is not** compiled from `librdkafka` source but it is rather linked against the appropriate version of [NuGet librdkafka.redist](https://www.nuget.org/packages/librdkafka.redist/) static binary that gets downloaded from `https://globalcdn.nuget.org/packages/librdkafka.redist.2.
|
|
57
|
+
Windows build **is not** compiled from `librdkafka` source but it is rather linked against the appropriate version of [NuGet librdkafka.redist](https://www.nuget.org/packages/librdkafka.redist/) static binary that gets downloaded from `https://globalcdn.nuget.org/packages/librdkafka.redist.2.12.0.nupkg` during installation. This download link can be changed using the environment variable `NODE_RDKAFKA_NUGET_BASE_URL` that defaults to `https://globalcdn.nuget.org/packages/` when it's no set.
|
|
58
58
|
|
|
59
59
|
Requirements:
|
|
60
60
|
* [node-gyp for Windows](https://github.com/nodejs/node-gyp#on-windows)
|
|
@@ -91,7 +91,7 @@ const Kafka = require('@platformatic/rdkafka');
|
|
|
91
91
|
|
|
92
92
|
## Configuration
|
|
93
93
|
|
|
94
|
-
You can pass many configuration options to `librdkafka`. A full list can be found in `librdkafka`'s [Configuration.md](https://github.com/edenhill/librdkafka/blob/v2.
|
|
94
|
+
You can pass many configuration options to `librdkafka`. A full list can be found in `librdkafka`'s [Configuration.md](https://github.com/edenhill/librdkafka/blob/v2.12.0/CONFIGURATION.md)
|
|
95
95
|
|
|
96
96
|
Configuration keys that have the suffix `_cb` are designated as callbacks. Some
|
|
97
97
|
of these keys are informational and you can choose to opt-in (for example, `dr_cb`). Others are callbacks designed to
|
|
@@ -126,7 +126,7 @@ You can also get the version of `librdkafka`
|
|
|
126
126
|
const Kafka = require('@platformatic/rdkafka');
|
|
127
127
|
console.log(Kafka.librdkafkaVersion);
|
|
128
128
|
|
|
129
|
-
// #=> 2.
|
|
129
|
+
// #=> 2.12.0
|
|
130
130
|
```
|
|
131
131
|
|
|
132
132
|
## Sending Messages
|
|
@@ -139,7 +139,7 @@ const producer = new Kafka.Producer({
|
|
|
139
139
|
});
|
|
140
140
|
```
|
|
141
141
|
|
|
142
|
-
A `Producer` requires only `metadata.broker.list` (the Kafka brokers) to be created. The values in this list are separated by commas. For other configuration options, see the [Configuration.md](https://github.com/edenhill/librdkafka/blob/v2.
|
|
142
|
+
A `Producer` requires only `metadata.broker.list` (the Kafka brokers) to be created. The values in this list are separated by commas. For other configuration options, see the [Configuration.md](https://github.com/edenhill/librdkafka/blob/v2.12.0/CONFIGURATION.md) file described previously.
|
|
143
143
|
|
|
144
144
|
The following example illustrates a list with several `librdkafka` options set.
|
|
145
145
|
|
package/bench/seed.sh
CHANGED
|
File without changes
|
package/binding.gyp
CHANGED
|
@@ -43,6 +43,9 @@
|
|
|
43
43
|
'action': ['python', '<@(_inputs)']
|
|
44
44
|
}
|
|
45
45
|
],
|
|
46
|
+
'cflags_cc' : [
|
|
47
|
+
'-std=c++20'
|
|
48
|
+
],
|
|
46
49
|
'msvs_settings': {
|
|
47
50
|
'VCLinkerTool': {
|
|
48
51
|
'AdditionalDependencies': [
|
|
@@ -119,6 +122,9 @@
|
|
|
119
122
|
[
|
|
120
123
|
'OS=="linux"',
|
|
121
124
|
{
|
|
125
|
+
'cflags_cc' : [
|
|
126
|
+
'-std=c++20'
|
|
127
|
+
],
|
|
122
128
|
'cflags_cc!': [
|
|
123
129
|
'-fno-rtti'
|
|
124
130
|
]
|
|
@@ -134,7 +140,8 @@
|
|
|
134
140
|
'-L/usr/local/opt/openssl/lib'
|
|
135
141
|
],
|
|
136
142
|
'OTHER_CPLUSPLUSFLAGS': [
|
|
137
|
-
'-I/usr/local/opt/openssl/include'
|
|
143
|
+
'-I/usr/local/opt/openssl/include',
|
|
144
|
+
'-std=c++20'
|
|
138
145
|
],
|
|
139
146
|
},
|
|
140
147
|
}
|
package/ci/prepublish.js
CHANGED
package/config.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
// ====== Generated from librdkafka 2.
|
|
1
|
+
// ====== Generated from librdkafka 2.12.0 file CONFIGURATION.md ======
|
|
2
2
|
// Code that generated this is a derivative work of the code from Nam Nguyen
|
|
3
3
|
// https://gist.github.com/ntgn81/066c2c8ec5b4238f85d1e9168a04e3fb
|
|
4
4
|
|
|
@@ -62,6 +62,20 @@ export interface GlobalConfig {
|
|
|
62
62
|
*/
|
|
63
63
|
"max.in.flight"?: number;
|
|
64
64
|
|
|
65
|
+
/**
|
|
66
|
+
* Controls how the client recovers when none of the brokers known to it is available. If set to `none`, the client doesn't re-bootstrap. If set to `rebootstrap`, the client repeats the bootstrap process using `bootstrap.servers` and brokers added through `rd_kafka_brokers_add()`. Rebootstrapping is useful when a client communicates with brokers so infrequently that the set of brokers may change entirely before the client refreshes metadata. Metadata recovery is triggered when all last-known brokers appear unavailable simultaneously or the client cannot refresh metadata within `metadata.recovery.rebootstrap.trigger.ms` or it's requested in a metadata response.
|
|
67
|
+
*
|
|
68
|
+
* @default rebootstrap
|
|
69
|
+
*/
|
|
70
|
+
"metadata.recovery.strategy"?: 'none' | 'rebootstrap';
|
|
71
|
+
|
|
72
|
+
/**
|
|
73
|
+
* If a client configured to rebootstrap using `metadata.recovery.strategy=rebootstrap` is unable to obtain metadata from any of the brokers for this interval, client repeats the bootstrap process using `bootstrap.servers` configuration and brokers added through `rd_kafka_brokers_add()`.
|
|
74
|
+
*
|
|
75
|
+
* @default 300000
|
|
76
|
+
*/
|
|
77
|
+
"metadata.recovery.rebootstrap.trigger.ms"?: number;
|
|
78
|
+
|
|
65
79
|
/**
|
|
66
80
|
* Period of time in milliseconds at which topic and broker metadata is refreshed in order to proactively discover any new brokers, topics, partitions or partition leader changes. Use -1 to disable the intervalled refresh (not recommended). If there are no locally referenced topics (no topic objects created, no messages produced, no subscription or no assignment) then only the broker list will be refreshed every interval but no more often than every 10s.
|
|
67
81
|
*
|
|
@@ -152,7 +166,7 @@ export interface GlobalConfig {
|
|
|
152
166
|
/**
|
|
153
167
|
* Disable the Nagle algorithm (TCP_NODELAY) on broker sockets.
|
|
154
168
|
*
|
|
155
|
-
* @default
|
|
169
|
+
* @default true
|
|
156
170
|
*/
|
|
157
171
|
"socket.nagle.disable"?: boolean;
|
|
158
172
|
|
|
@@ -185,7 +199,7 @@ export interface GlobalConfig {
|
|
|
185
199
|
"socket.connection.setup.timeout.ms"?: number;
|
|
186
200
|
|
|
187
201
|
/**
|
|
188
|
-
* Close broker connections after the specified time of inactivity. Disable with 0. If this property is left at its default value some heuristics are performed to determine a suitable default value, this is currently limited to identifying brokers on Azure (see librdkafka issue #3109 for more info).
|
|
202
|
+
* Close broker connections after the specified time of inactivity. Disable with 0. If this property is left at its default value some heuristics are performed to determine a suitable default value, this is currently limited to identifying brokers on Azure (see librdkafka issue #3109 for more info). Actual value can be lower, up to 2s lower, only if `connections.max.idle.ms` >= 4s, as jitter is added to avoid disconnecting all brokers at the same time.
|
|
189
203
|
*
|
|
190
204
|
* @default 0
|
|
191
205
|
*/
|
|
@@ -329,7 +343,7 @@ export interface GlobalConfig {
|
|
|
329
343
|
"internal.termination.signal"?: number;
|
|
330
344
|
|
|
331
345
|
/**
|
|
332
|
-
* Request broker's supported API versions to adjust functionality to available protocol features. If set to false, or the ApiVersionRequest fails, the fallback version `broker.version.fallback` will be used. **NOTE**: Depends on broker version >=0.10.0. If the request is not supported by (an older) broker the `broker.version.fallback` fallback is used.
|
|
346
|
+
* **DEPRECATED** **Post-deprecation actions: remove this configuration property, brokers < 0.10.0 won't be supported anymore in librdkafka 3.x.** Request broker's supported API versions to adjust functionality to available protocol features. If set to false, or the ApiVersionRequest fails, the fallback version `broker.version.fallback` will be used. **NOTE**: Depends on broker version >=0.10.0. If the request is not supported by (an older) broker the `broker.version.fallback` fallback is used.
|
|
333
347
|
*
|
|
334
348
|
* @default true
|
|
335
349
|
*/
|
|
@@ -343,14 +357,14 @@ export interface GlobalConfig {
|
|
|
343
357
|
"api.version.request.timeout.ms"?: number;
|
|
344
358
|
|
|
345
359
|
/**
|
|
346
|
-
* Dictates how long the `broker.version.fallback` fallback is used in the case the ApiVersionRequest fails. **NOTE**: The ApiVersionRequest is only issued when a new connection to the broker is made (such as after an upgrade).
|
|
360
|
+
* **DEPRECATED** **Post-deprecation actions: remove this configuration property, brokers < 0.10.0 won't be supported anymore in librdkafka 3.x.** Dictates how long the `broker.version.fallback` fallback is used in the case the ApiVersionRequest fails. **NOTE**: The ApiVersionRequest is only issued when a new connection to the broker is made (such as after an upgrade).
|
|
347
361
|
*
|
|
348
362
|
* @default 0
|
|
349
363
|
*/
|
|
350
364
|
"api.version.fallback.ms"?: number;
|
|
351
365
|
|
|
352
366
|
/**
|
|
353
|
-
* Older broker versions (before 0.10.0) provide no way for a client to query for supported protocol features (ApiVersionRequest, see `api.version.request`) making it impossible for the client to know what features it may use. As a workaround a user may set this property to the expected broker version and the client will automatically adjust its feature set accordingly if the ApiVersionRequest fails (or is disabled). The fallback broker version will be used for `api.version.fallback.ms`. Valid values are: 0.9.0, 0.8.2, 0.8.1, 0.8.0. Any other value >= 0.10, such as 0.10.2.1, enables ApiVersionRequests.
|
|
367
|
+
* **DEPRECATED** **Post-deprecation actions: remove this configuration property, brokers < 0.10.0 won't be supported anymore in librdkafka 3.x.** Older broker versions (before 0.10.0) provide no way for a client to query for supported protocol features (ApiVersionRequest, see `api.version.request`) making it impossible for the client to know what features it may use. As a workaround a user may set this property to the expected broker version and the client will automatically adjust its feature set accordingly if the ApiVersionRequest fails (or is disabled). The fallback broker version will be used for `api.version.fallback.ms`. Valid values are: 0.9.0, 0.8.2, 0.8.1, 0.8.0. Any other value >= 0.10, such as 0.10.2.1, enables ApiVersionRequests.
|
|
354
368
|
*
|
|
355
369
|
* @default 0.10.0
|
|
356
370
|
*/
|
|
@@ -425,6 +439,16 @@ export interface GlobalConfig {
|
|
|
425
439
|
*/
|
|
426
440
|
"ssl.ca.location"?: string;
|
|
427
441
|
|
|
442
|
+
/**
|
|
443
|
+
* File or directory path to CA certificate(s) for verifying HTTPS endpoints, like `sasl.oauthbearer.token.endpoint.url` used for OAUTHBEARER/OIDC authentication. Mutually exclusive with `https.ca.pem`. Defaults: On Windows the system's CA certificates are automatically looked up in the Windows Root certificate store. On Mac OSX this configuration defaults to `probe`. It is recommended to install openssl using Homebrew, to provide CA certificates. On Linux install the distribution's ca-certificates package. If OpenSSL is statically linked or `https.ca.location` is set to `probe` a list of standard paths will be probed and the first one found will be used as the default CA certificate location path. If OpenSSL is dynamically linked the OpenSSL library's default path will be used (see `OPENSSLDIR` in `openssl version -a`).
|
|
444
|
+
*/
|
|
445
|
+
"https.ca.location"?: string;
|
|
446
|
+
|
|
447
|
+
/**
|
|
448
|
+
* CA certificate string (PEM format) for verifying HTTPS endpoints. Mutually exclusive with `https.ca.location`. Optional: see `https.ca.location`.
|
|
449
|
+
*/
|
|
450
|
+
"https.ca.pem"?: string;
|
|
451
|
+
|
|
428
452
|
/**
|
|
429
453
|
* CA certificate string (PEM format) for verifying the broker's key.
|
|
430
454
|
*/
|
|
@@ -584,6 +608,16 @@ export interface GlobalConfig {
|
|
|
584
608
|
*/
|
|
585
609
|
"sasl.oauthbearer.client.id"?: string;
|
|
586
610
|
|
|
611
|
+
/**
|
|
612
|
+
* Alias for `sasl.oauthbearer.client.id`: Public identifier for the application. Must be unique across all clients that the authorization server handles. Only used when `sasl.oauthbearer.method` is set to "oidc".
|
|
613
|
+
*/
|
|
614
|
+
"sasl.oauthbearer.client.credentials.client.id"?: string;
|
|
615
|
+
|
|
616
|
+
/**
|
|
617
|
+
* Alias for `sasl.oauthbearer.client.secret`: Client secret only known to the application and the authorization server. This should be a sufficiently random string that is not guessable. Only used when `sasl.oauthbearer.method` is set to "oidc".
|
|
618
|
+
*/
|
|
619
|
+
"sasl.oauthbearer.client.credentials.client.secret"?: string;
|
|
620
|
+
|
|
587
621
|
/**
|
|
588
622
|
* Client secret only known to the application and the authorization server. This should be a sufficiently random string that is not guessable. Only used when `sasl.oauthbearer.method` is set to "oidc".
|
|
589
623
|
*/
|
|
@@ -604,6 +638,88 @@ export interface GlobalConfig {
|
|
|
604
638
|
*/
|
|
605
639
|
"sasl.oauthbearer.token.endpoint.url"?: string;
|
|
606
640
|
|
|
641
|
+
/**
|
|
642
|
+
* OAuth grant type to use when communicating with the identity provider.
|
|
643
|
+
*
|
|
644
|
+
* @default client_credentials
|
|
645
|
+
*/
|
|
646
|
+
"sasl.oauthbearer.grant.type"?: 'client_credentials' | 'urn:ietf:params:oauth:grant-type:jwt-bearer';
|
|
647
|
+
|
|
648
|
+
/**
|
|
649
|
+
* Algorithm the client should use to sign the assertion sent to the identity provider and in the OAuth alg header in the JWT assertion.
|
|
650
|
+
*
|
|
651
|
+
* @default RS256
|
|
652
|
+
*/
|
|
653
|
+
"sasl.oauthbearer.assertion.algorithm"?: 'RS256' | 'ES256';
|
|
654
|
+
|
|
655
|
+
/**
|
|
656
|
+
* Path to client's private key (PEM) used for authentication when using the JWT assertion.
|
|
657
|
+
*/
|
|
658
|
+
"sasl.oauthbearer.assertion.private.key.file"?: string;
|
|
659
|
+
|
|
660
|
+
/**
|
|
661
|
+
* Private key passphrase for `sasl.oauthbearer.assertion.private.key.file` or `sasl.oauthbearer.assertion.private.key.pem`.
|
|
662
|
+
*/
|
|
663
|
+
"sasl.oauthbearer.assertion.private.key.passphrase"?: string;
|
|
664
|
+
|
|
665
|
+
/**
|
|
666
|
+
* Client's private key (PEM) used for authentication when using the JWT assertion.
|
|
667
|
+
*/
|
|
668
|
+
"sasl.oauthbearer.assertion.private.key.pem"?: string;
|
|
669
|
+
|
|
670
|
+
/**
|
|
671
|
+
* Path to the assertion file. Only used when `sasl.oauthbearer.method` is set to "oidc" and JWT assertion is needed.
|
|
672
|
+
*/
|
|
673
|
+
"sasl.oauthbearer.assertion.file"?: string;
|
|
674
|
+
|
|
675
|
+
/**
|
|
676
|
+
* JWT audience claim. Only used when `sasl.oauthbearer.method` is set to "oidc" and JWT assertion is needed.
|
|
677
|
+
*/
|
|
678
|
+
"sasl.oauthbearer.assertion.claim.aud"?: string;
|
|
679
|
+
|
|
680
|
+
/**
|
|
681
|
+
* Assertion expiration time in seconds. Only used when `sasl.oauthbearer.method` is set to "oidc" and JWT assertion is needed.
|
|
682
|
+
*
|
|
683
|
+
* @default 300
|
|
684
|
+
*/
|
|
685
|
+
"sasl.oauthbearer.assertion.claim.exp.seconds"?: number;
|
|
686
|
+
|
|
687
|
+
/**
|
|
688
|
+
* JWT issuer claim. Only used when `sasl.oauthbearer.method` is set to "oidc" and JWT assertion is needed.
|
|
689
|
+
*/
|
|
690
|
+
"sasl.oauthbearer.assertion.claim.iss"?: string;
|
|
691
|
+
|
|
692
|
+
/**
|
|
693
|
+
* JWT ID claim. When set to `true`, a random UUID is generated. Only used when `sasl.oauthbearer.method` is set to "oidc" and JWT assertion is needed.
|
|
694
|
+
*
|
|
695
|
+
* @default false
|
|
696
|
+
*/
|
|
697
|
+
"sasl.oauthbearer.assertion.claim.jti.include"?: boolean;
|
|
698
|
+
|
|
699
|
+
/**
|
|
700
|
+
* Assertion not before time in seconds. Only used when `sasl.oauthbearer.method` is set to "oidc" and JWT assertion is needed.
|
|
701
|
+
*
|
|
702
|
+
* @default 60
|
|
703
|
+
*/
|
|
704
|
+
"sasl.oauthbearer.assertion.claim.nbf.seconds"?: number;
|
|
705
|
+
|
|
706
|
+
/**
|
|
707
|
+
* JWT subject claim. Only used when `sasl.oauthbearer.method` is set to "oidc" and JWT assertion is needed.
|
|
708
|
+
*/
|
|
709
|
+
"sasl.oauthbearer.assertion.claim.sub"?: string;
|
|
710
|
+
|
|
711
|
+
/**
|
|
712
|
+
* Path to the JWT template file. Only used when `sasl.oauthbearer.method` is set to "oidc" and JWT assertion is needed.
|
|
713
|
+
*/
|
|
714
|
+
"sasl.oauthbearer.assertion.jwt.template.file"?: string;
|
|
715
|
+
|
|
716
|
+
/**
|
|
717
|
+
* Type of metadata-based authentication to use for OAUTHBEARER/OIDC `azure_imds` authenticates using the Azure IMDS endpoint. Sets a default value for `sasl.oauthbearer.token.endpoint.url` if missing. Configuration values specific of chosen authentication type can be passed through `sasl.oauthbearer.config`.
|
|
718
|
+
*
|
|
719
|
+
* @default none
|
|
720
|
+
*/
|
|
721
|
+
"sasl.oauthbearer.metadata.authentication.type"?: 'none' | 'azure_imds';
|
|
722
|
+
|
|
607
723
|
/**
|
|
608
724
|
* List of plugin libraries to load (; separated). The library search path is platform dependent (see dlopen(3) for Unix and LoadLibrary() for Windows). If no filename extension is specified the platform-specific extension (such as .dll or .so) will be appended automatically.
|
|
609
725
|
*/
|
|
@@ -796,28 +912,28 @@ export interface ConsumerGlobalConfig extends GlobalConfig {
|
|
|
796
912
|
"group.instance.id"?: string;
|
|
797
913
|
|
|
798
914
|
/**
|
|
799
|
-
* The name of one or more partition assignment strategies. The elected group leader will use a strategy supported by all members of the group to assign partitions to group members. If there is more than one eligible strategy, preference is determined by the order of this list (strategies earlier in the list have higher priority). Cooperative and non-cooperative (eager)
|
|
915
|
+
* The name of one or more partition assignment strategies. The elected group leader will use a strategy supported by all members of the group to assign partitions to group members. If there is more than one eligible strategy, preference is determined by the order of this list (strategies earlier in the list have higher priority). Cooperative and non-cooperative (eager)strategies must not be mixed. `partition.assignment.strategy` is not supported for `group.protocol=consumer`. Use `group.remote.assignor` instead. Available strategies: range, roundrobin, cooperative-sticky.
|
|
800
916
|
*
|
|
801
917
|
* @default range,roundrobin
|
|
802
918
|
*/
|
|
803
919
|
"partition.assignment.strategy"?: string;
|
|
804
920
|
|
|
805
921
|
/**
|
|
806
|
-
* Client group session and failure detection timeout. The consumer sends periodic heartbeats (heartbeat.interval.ms) to indicate its liveness to the broker. If no hearts are received by the broker for a group member within the session timeout, the broker will remove the consumer from the group and trigger a rebalance. The allowed range is configured with the **broker** configuration properties `group.min.session.timeout.ms` and `group.max.session.timeout.ms`. Also see `max.poll.interval.ms`.
|
|
922
|
+
* Client group session and failure detection timeout. The consumer sends periodic heartbeats (heartbeat.interval.ms) to indicate its liveness to the broker. If no hearts are received by the broker for a group member within the session timeout, the broker will remove the consumer from the group and trigger a rebalance. The allowed range is configured with the **broker** configuration properties `group.min.session.timeout.ms` and `group.max.session.timeout.ms`. `session.timeout.ms` is not supported for `group.protocol=consumer`. It is set with the broker configuration property `group.consumer.session.timeout.ms` by default or can be configured through the AdminClient IncrementalAlterConfigs API. The allowed range is configured with the broker configuration properties `group.consumer.min.session.timeout.ms` and `group.consumer.max.session.timeout.ms`. Also see `max.poll.interval.ms`.
|
|
807
923
|
*
|
|
808
924
|
* @default 45000
|
|
809
925
|
*/
|
|
810
926
|
"session.timeout.ms"?: number;
|
|
811
927
|
|
|
812
928
|
/**
|
|
813
|
-
* Group session keepalive heartbeat interval.
|
|
929
|
+
* Group session keepalive heartbeat interval. `heartbeat.interval.ms` is not supported for `group.protocol=consumer`. It is set with the broker configuration property `group.consumer.heartbeat.interval.ms` by default or can be configured through the AdminClient IncrementalAlterConfigs API. The allowed range is configured with the broker configuration properties `group.consumer.min.heartbeat.interval.ms` and `group.consumer.max.heartbeat.interval.ms`.
|
|
814
930
|
*
|
|
815
931
|
* @default 3000
|
|
816
932
|
*/
|
|
817
933
|
"heartbeat.interval.ms"?: number;
|
|
818
934
|
|
|
819
935
|
/**
|
|
820
|
-
* Group protocol type for the `classic` group protocol. NOTE: Currently, the only supported group protocol type is `consumer`.
|
|
936
|
+
* Group protocol type for the `classic` group protocol. NOTE: Currently, the only supported group protocol type is `consumer`. `group.protocol.type` is not supported for `group.protocol=consumer`
|
|
821
937
|
*
|
|
822
938
|
* @default consumer
|
|
823
939
|
*/
|
package/configure
CHANGED
|
File without changes
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
version: v1.0
|
|
2
|
+
name: run-all-tests
|
|
3
|
+
|
|
4
|
+
agent:
|
|
5
|
+
machine:
|
|
6
|
+
type: s1-prod-ubuntu24-04-amd64-00
|
|
7
|
+
|
|
8
|
+
execution_time_limit:
|
|
9
|
+
hours: 3
|
|
10
|
+
|
|
11
|
+
global_job_config:
|
|
12
|
+
prologue:
|
|
13
|
+
commands:
|
|
14
|
+
- checkout
|
|
15
|
+
- '[[ -z "$GIT_REF" ]] || git checkout $GIT_REF'
|
|
16
|
+
- wget -O rapidjson-dev.deb https://launchpad.net/ubuntu/+archive/primary/+files/rapidjson-dev_1.1.0+dfsg2-3_all.deb
|
|
17
|
+
- sudo dpkg -i rapidjson-dev.deb
|
|
18
|
+
- sudo apt update
|
|
19
|
+
- sudo apt remove -y needrestart
|
|
20
|
+
- sudo apt install -y valgrind
|
|
21
|
+
- python3 -m pip install -U pip
|
|
22
|
+
- python3 -m pip -V
|
|
23
|
+
- (cd tests && python3 -m pip install -r requirements.txt)
|
|
24
|
+
- ./configure --install-deps --enable-werror --enable-devel
|
|
25
|
+
- make -j all
|
|
26
|
+
- make -j -C tests build
|
|
27
|
+
- sem-version java 17
|
|
28
|
+
|
|
29
|
+
blocks:
|
|
30
|
+
- name: "Run all tests (x86_64)"
|
|
31
|
+
dependencies: []
|
|
32
|
+
task:
|
|
33
|
+
agent:
|
|
34
|
+
machine:
|
|
35
|
+
type: s1-prod-ubuntu24-04-amd64-1
|
|
36
|
+
prologue:
|
|
37
|
+
commands:
|
|
38
|
+
- if [[ "$TEST_ARCHES" != *"x86_64"* ]]; then exit 0; fi
|
|
39
|
+
jobs:
|
|
40
|
+
- name: "PLAINTEXT cluster (x86_64)"
|
|
41
|
+
env_vars:
|
|
42
|
+
- name: TEST_SSL
|
|
43
|
+
value: "False"
|
|
44
|
+
commands:
|
|
45
|
+
- if [[ "$TEST_TYPE" != *"plaintext"* ]]; then exit 0; fi
|
|
46
|
+
- ./tests/run-all-tests.sh
|
|
47
|
+
- name: "SSL cluster (x86_64)"
|
|
48
|
+
env_vars:
|
|
49
|
+
- name: TEST_SSL
|
|
50
|
+
value: "True"
|
|
51
|
+
commands:
|
|
52
|
+
- if [[ "$TEST_TYPE" != *"ssl"* ]]; then exit 0; fi
|
|
53
|
+
- ./tests/run-all-tests.sh
|
|
54
|
+
- name: "Run all tests (aarch64)"
|
|
55
|
+
dependencies: []
|
|
56
|
+
task:
|
|
57
|
+
agent:
|
|
58
|
+
machine:
|
|
59
|
+
type: s1-prod-ubuntu24-04-arm64-1
|
|
60
|
+
prologue:
|
|
61
|
+
commands:
|
|
62
|
+
- if [[ "$TEST_ARCHES" != *"aarch64"* ]]; then exit 0; fi
|
|
63
|
+
jobs:
|
|
64
|
+
- name: "PLAINTEXT cluster (aarch64)"
|
|
65
|
+
env_vars:
|
|
66
|
+
- name: TEST_SSL
|
|
67
|
+
value: "False"
|
|
68
|
+
commands:
|
|
69
|
+
- if [[ "$TEST_TYPE" != *"plaintext"* ]]; then exit 0; fi
|
|
70
|
+
- ./tests/run-all-tests.sh
|
|
71
|
+
- name: "SSL cluster (aarch64)"
|
|
72
|
+
env_vars:
|
|
73
|
+
- name: TEST_SSL
|
|
74
|
+
value: "True"
|
|
75
|
+
commands:
|
|
76
|
+
- if [[ "$TEST_TYPE" != *"ssl"* ]]; then exit 0; fi
|
|
77
|
+
- ./tests/run-all-tests.sh
|
|
@@ -0,0 +1,250 @@
|
|
|
1
|
+
version: v1.0
|
|
2
|
+
name: 'librdkafka integration and all architectures tests pipeline'
|
|
3
|
+
agent:
|
|
4
|
+
machine:
|
|
5
|
+
type: s1-prod-ubuntu24-04-arm64-00
|
|
6
|
+
execution_time_limit:
|
|
7
|
+
hours: 3
|
|
8
|
+
|
|
9
|
+
auto_cancel:
|
|
10
|
+
running:
|
|
11
|
+
when: "branch != 'master'"
|
|
12
|
+
|
|
13
|
+
global_job_config:
|
|
14
|
+
prologue:
|
|
15
|
+
commands:
|
|
16
|
+
- checkout
|
|
17
|
+
- mkdir artifacts
|
|
18
|
+
- mkdir dest
|
|
19
|
+
env_vars:
|
|
20
|
+
- name: CACHE_TAG
|
|
21
|
+
value: '7'
|
|
22
|
+
- name: CI
|
|
23
|
+
value: 'true'
|
|
24
|
+
- name: KAFKA_VERSION
|
|
25
|
+
value: '4.0.0'
|
|
26
|
+
- name: CP_VERSION
|
|
27
|
+
value: '8.0.0'
|
|
28
|
+
# Shows plain output from docker build (no progress bars)
|
|
29
|
+
- name: BUILDKIT_PROGRESS
|
|
30
|
+
value: plain
|
|
31
|
+
|
|
32
|
+
blocks:
|
|
33
|
+
- name: 'OSX arm64/m1'
|
|
34
|
+
dependencies: []
|
|
35
|
+
task:
|
|
36
|
+
agent:
|
|
37
|
+
machine:
|
|
38
|
+
type: s1-macos-15-arm64-8
|
|
39
|
+
env_vars:
|
|
40
|
+
- name: ARTIFACT_KEY
|
|
41
|
+
value: p-librdkafka__plat-osx__arch-arm64__lnk-all
|
|
42
|
+
epilogue:
|
|
43
|
+
commands:
|
|
44
|
+
- '[[ -z $SEMAPHORE_GIT_TAG_NAME ]] || artifact push workflow artifacts/ --destination artifacts/${ARTIFACT_KEY}/'
|
|
45
|
+
jobs:
|
|
46
|
+
- name: 'Build'
|
|
47
|
+
commands:
|
|
48
|
+
- ./configure --install-deps --source-deps-only --enable-static --disable-lz4-ext --enable-strip
|
|
49
|
+
- make -j all examples check
|
|
50
|
+
- examples/rdkafka_example -X builtin.features
|
|
51
|
+
- otool -L src/librdkafka.dylib
|
|
52
|
+
- otool -L src-cpp/librdkafka++.dylib
|
|
53
|
+
- make -j -C tests build
|
|
54
|
+
- make -C tests run_local_quick
|
|
55
|
+
- DESTDIR="$PWD/dest" make install
|
|
56
|
+
- (cd dest && tar cvzf ../artifacts/librdkafka.tgz .)
|
|
57
|
+
|
|
58
|
+
|
|
59
|
+
- name: 'OSX x64'
|
|
60
|
+
dependencies: []
|
|
61
|
+
task:
|
|
62
|
+
agent:
|
|
63
|
+
machine:
|
|
64
|
+
type: s1-macos-15-amd64-6
|
|
65
|
+
env_vars:
|
|
66
|
+
- name: ARTIFACT_KEY
|
|
67
|
+
value: p-librdkafka__plat-osx__arch-x64__lnk-all
|
|
68
|
+
epilogue:
|
|
69
|
+
commands:
|
|
70
|
+
- '[[ -z $SEMAPHORE_GIT_TAG_NAME ]] || artifact push workflow artifacts/ --destination artifacts/${ARTIFACT_KEY}/'
|
|
71
|
+
jobs:
|
|
72
|
+
- name: 'Build'
|
|
73
|
+
commands:
|
|
74
|
+
- ./configure --install-deps --source-deps-only --enable-static --disable-lz4-ext --enable-strip
|
|
75
|
+
- make -j all examples check
|
|
76
|
+
- examples/rdkafka_example -X builtin.features
|
|
77
|
+
- otool -L src/librdkafka.dylib
|
|
78
|
+
- otool -L src-cpp/librdkafka++.dylib
|
|
79
|
+
- make -j -C tests build
|
|
80
|
+
- make -C tests run_local_quick
|
|
81
|
+
- DESTDIR="$PWD/dest" make install
|
|
82
|
+
- (cd dest && tar cvzf ../artifacts/librdkafka.tgz .)
|
|
83
|
+
|
|
84
|
+
- name: 'Linux Ubuntu amd64: integration tests'
|
|
85
|
+
dependencies: []
|
|
86
|
+
task:
|
|
87
|
+
agent:
|
|
88
|
+
machine:
|
|
89
|
+
type: s1-prod-ubuntu24-04-amd64-1
|
|
90
|
+
env_vars:
|
|
91
|
+
- name: CFLAGS
|
|
92
|
+
value: -std=gnu90 # Test minimum C standard, default in CentOS 7
|
|
93
|
+
prologue:
|
|
94
|
+
commands:
|
|
95
|
+
- '[[ -z $DOCKERHUB_APIKEY ]] || docker login --username $DOCKERHUB_USER --password $DOCKERHUB_APIKEY'
|
|
96
|
+
jobs:
|
|
97
|
+
- name: 'Build and integration tests with "classic" protocol'
|
|
98
|
+
commands:
|
|
99
|
+
- cache restore trivup-kafka-${KAFKA_VERSION}-${CACHE_TAG}
|
|
100
|
+
- packaging/tools/run-in-docker.sh test-runner-amd64-${CACHE_TAG}
|
|
101
|
+
./packaging/tools/run-integration-tests.sh
|
|
102
|
+
${KAFKA_VERSION} ${CP_VERSION} classic
|
|
103
|
+
- cache store trivup-kafka-${KAFKA_VERSION}-${CACHE_TAG} tests/tmp-KafkaCluster/KafkaCluster/KafkaBrokerApp/kafka/${KAFKA_VERSION}
|
|
104
|
+
- name: 'Build and integration tests with "consumer" protocol'
|
|
105
|
+
commands:
|
|
106
|
+
- cache restore trivup-kafka-${KAFKA_VERSION}-${CACHE_TAG}
|
|
107
|
+
- packaging/tools/run-in-docker.sh test-runner-amd64-${CACHE_TAG}
|
|
108
|
+
./packaging/tools/run-integration-tests.sh
|
|
109
|
+
${KAFKA_VERSION} ${CP_VERSION} consumer
|
|
110
|
+
- cache store trivup-kafka-${KAFKA_VERSION}-${CACHE_TAG} tests/tmp-KafkaCluster/KafkaCluster/KafkaBrokerApp/kafka/${KAFKA_VERSION}
|
|
111
|
+
|
|
112
|
+
|
|
113
|
+
- name: 'Linux arm64: local quick tests'
|
|
114
|
+
dependencies: []
|
|
115
|
+
task:
|
|
116
|
+
agent:
|
|
117
|
+
machine:
|
|
118
|
+
type: s1-prod-ubuntu24-04-arm64-1
|
|
119
|
+
prologue:
|
|
120
|
+
commands:
|
|
121
|
+
- '[[ -z $DOCKERHUB_APIKEY ]] || docker login --username $DOCKERHUB_USER --password $DOCKERHUB_APIKEY'
|
|
122
|
+
epilogue:
|
|
123
|
+
commands:
|
|
124
|
+
- '[[ -z $SEMAPHORE_GIT_TAG_NAME ]] || artifact push workflow artifacts/ --destination artifacts/${ARTIFACT_KEY}/'
|
|
125
|
+
jobs:
|
|
126
|
+
- name: 'Build: centos8 glibc +gssapi'
|
|
127
|
+
env_vars:
|
|
128
|
+
- name: ARTIFACT_KEY
|
|
129
|
+
value: p-librdkafka__plat-linux__dist-centos8__arch-arm64__lnk-std__extra-gssapi
|
|
130
|
+
commands:
|
|
131
|
+
- packaging/tools/build-release-artifacts.sh quay.io/pypa/manylinux_2_28_aarch64:2024.07.01-1 artifacts/librdkafka.tgz
|
|
132
|
+
|
|
133
|
+
- name: 'Build: centos8 glibc'
|
|
134
|
+
env_vars:
|
|
135
|
+
- name: ARTIFACT_KEY
|
|
136
|
+
value: p-librdkafka__plat-linux__dist-centos8__arch-arm64__lnk-all
|
|
137
|
+
commands:
|
|
138
|
+
- packaging/tools/build-release-artifacts.sh --disable-gssapi quay.io/pypa/manylinux_2_28_aarch64:2024.07.01-1 artifacts/librdkafka.tgz
|
|
139
|
+
|
|
140
|
+
- name: 'Build: alpine musl +gssapi'
|
|
141
|
+
env_vars:
|
|
142
|
+
- name: ARTIFACT_KEY
|
|
143
|
+
value: p-librdkafka__plat-linux__dist-alpine__arch-arm64__lnk-all__extra-gssapi
|
|
144
|
+
commands:
|
|
145
|
+
- packaging/tools/build-release-artifacts.sh alpine:3.16.9 artifacts/librdkafka.tgz
|
|
146
|
+
|
|
147
|
+
- name: 'Build: alpine musl'
|
|
148
|
+
env_vars:
|
|
149
|
+
- name: ARTIFACT_KEY
|
|
150
|
+
value: p-librdkafka__plat-linux__dist-alpine__arch-arm64__lnk-all
|
|
151
|
+
commands:
|
|
152
|
+
- packaging/tools/build-release-artifacts.sh --disable-gssapi alpine:3.16.9 artifacts/librdkafka.tgz
|
|
153
|
+
|
|
154
|
+
|
|
155
|
+
- name: 'Windows x64: MinGW-w64'
|
|
156
|
+
dependencies: []
|
|
157
|
+
task:
|
|
158
|
+
agent:
|
|
159
|
+
machine:
|
|
160
|
+
type: s1-prod-windows
|
|
161
|
+
env_vars:
|
|
162
|
+
- name: CHERE_INVOKING
|
|
163
|
+
value: 'yes'
|
|
164
|
+
- name: MSYSTEM
|
|
165
|
+
value: UCRT64
|
|
166
|
+
prologue:
|
|
167
|
+
commands:
|
|
168
|
+
# Set up msys2
|
|
169
|
+
- "& .\\win32\\setup-msys2.ps1"
|
|
170
|
+
epilogue:
|
|
171
|
+
commands:
|
|
172
|
+
- if ($env:SEMAPHORE_GIT_TAG_NAME -ne "") { artifact push workflow artifacts/ --destination artifacts/$Env:ARTIFACT_KEY/ }
|
|
173
|
+
jobs:
|
|
174
|
+
- name: 'Build: MinGW-w64 Dynamic'
|
|
175
|
+
env_vars:
|
|
176
|
+
- name: ARTIFACT_KEY
|
|
177
|
+
value: p-librdkafka__plat-windows__dist-mingw__arch-x64__lnk-std
|
|
178
|
+
commands:
|
|
179
|
+
- C:\msys64\usr\bin\bash -lc './packaging/mingw-w64/semaphoreci-build.sh ./artifacts/librdkafka.tgz'
|
|
180
|
+
|
|
181
|
+
- name: 'Build: MinGW-w64 Static'
|
|
182
|
+
env_vars:
|
|
183
|
+
- name: ARTIFACT_KEY
|
|
184
|
+
value: p-librdkafka__plat-windows__dist-mingw__arch-x64__lnk-static
|
|
185
|
+
commands:
|
|
186
|
+
- C:\msys64\usr\bin\bash -lc './packaging/mingw-w64/semaphoreci-build.sh --static ./artifacts/librdkafka.tgz'
|
|
187
|
+
|
|
188
|
+
- name: 'Windows x64: Windows SDK 10.0 / MSVC v142 / VS 2019'
|
|
189
|
+
dependencies: []
|
|
190
|
+
task:
|
|
191
|
+
agent:
|
|
192
|
+
machine:
|
|
193
|
+
type: s1-prod-windows
|
|
194
|
+
env_vars:
|
|
195
|
+
# Disable vcpkg telemetry
|
|
196
|
+
- name: VCPKG_DISABLE_METRICS
|
|
197
|
+
value: 'yes'
|
|
198
|
+
prologue:
|
|
199
|
+
commands:
|
|
200
|
+
# install vcpkg in the parent directory.
|
|
201
|
+
- cd ..
|
|
202
|
+
# Setup vcpkg
|
|
203
|
+
- "& .\\librdkafka\\win32\\setup-vcpkg.ps1"
|
|
204
|
+
- cd librdkafka
|
|
205
|
+
epilogue:
|
|
206
|
+
commands:
|
|
207
|
+
- Get-ChildItem . -include *.dll -recurse
|
|
208
|
+
- Get-ChildItem . -include *.lib -recurse
|
|
209
|
+
- if ($env:SEMAPHORE_GIT_TAG_NAME -ne "") { artifact push workflow artifacts/ --destination artifacts/$Env:ARTIFACT_KEY/ }
|
|
210
|
+
jobs:
|
|
211
|
+
- name: 'Build: MSVC x64'
|
|
212
|
+
env_vars:
|
|
213
|
+
- name: triplet
|
|
214
|
+
value: x64-windows
|
|
215
|
+
- name: ARTIFACT_KEY
|
|
216
|
+
value: p-librdkafka__plat-windows__dist-msvc__arch-x64__lnk-std
|
|
217
|
+
commands:
|
|
218
|
+
- "& .\\win32\\msbuild.ps1 -platform x64"
|
|
219
|
+
- "& .\\win32\\package-zip.ps1 -platform x64"
|
|
220
|
+
- name: 'Build: MSVC x86'
|
|
221
|
+
env_vars:
|
|
222
|
+
- name: triplet
|
|
223
|
+
value: x86-windows
|
|
224
|
+
- name: ARTIFACT_KEY
|
|
225
|
+
value: p-librdkafka__plat-windows__dist-msvc__arch-x86__lnk-std
|
|
226
|
+
commands:
|
|
227
|
+
- "& .\\win32\\msbuild.ps1 -platform Win32"
|
|
228
|
+
- "& .\\win32\\package-zip.ps1 -platform Win32"
|
|
229
|
+
|
|
230
|
+
promotions:
|
|
231
|
+
- name: Run all tests on master commits
|
|
232
|
+
pipeline_file: run-all-tests.yml
|
|
233
|
+
parameters:
|
|
234
|
+
env_vars:
|
|
235
|
+
- required: true
|
|
236
|
+
name: TEST_KAFKA_GIT_REF
|
|
237
|
+
default_value: 4.0.0
|
|
238
|
+
- required: true
|
|
239
|
+
name: TEST_TYPE
|
|
240
|
+
default_value: plaintext,ssl
|
|
241
|
+
- required: true
|
|
242
|
+
name: TEST_ARCHES
|
|
243
|
+
default_value: x86_64,aarch64
|
|
244
|
+
- required: true
|
|
245
|
+
name: TEST_PARALLEL
|
|
246
|
+
default_value: "1"
|
|
247
|
+
auto_promote_on:
|
|
248
|
+
- result: passed
|
|
249
|
+
branch:
|
|
250
|
+
- "master"
|