Librdkafka Versions Save

The Apache Kafka C/C++ library

v1.4.4

3 years ago

librdkafka v1.4.4

v1.4.4 is a maintenance release with the following fixes and enhancements:

  • Transactional producer could crash on request timeout due to dereferencing NULL pointer of non-existent response object.
  • Mark rd_kafka_send_offsets_to_transaction() CONCURRENT_TRANSACTION (et.al) errors as retriable.
  • Fix crash on transactional coordinator FindCoordinator request failure.
  • Minimize broker re-connect delay when broker's connection is needed to send requests.
  • socket.timeout.ms was ignored when transactional.id was set.
  • Added RTT/delay simulation to mock brokers.

Note: there was no v1.4.3 librdkafka release

v1.4.2

4 years ago

librdkafka v1.4.2

v1.4.2 is a maintenance release with the following fixes and enhancements:

  • Fix produce/consume hang after partition goes away and comes back, such as when a topic is deleted and re-created (regression in v1.3.0).
  • Consumer: Reset the stored offset when partitions are un-assign()ed (fixes #2782). This fixes the case where a manual offset-less commit() or the auto-committer would commit a stored offset from a previous assignment before a new message was consumed by the application.
  • Probe known CA cert paths and set default ssl.ca.location accordingly if OpenSSL is statically linked or ssl.ca.location is set to probe.
  • Per-partition OffsetCommit errors were unhandled (fixes #2791)
  • Seed the PRNG (random number generator) by default, allow application to override with enable.random.seed=false (#2795)
  • Fix stack overwrite (of 1 byte) when SaslHandshake MechCnt is zero
  • Align bundled c11 threads (tinycthreads) constants to glibc and musl (#2681)
  • Fix return value of rd_kafka_test_fatal_error() (by @ckb42)
  • Ensure CMake sets disabled defines to zero on Windows (@benesch)
  • librdkafka's build tooling now requires Python 3.x (the python3 interpreter).

Note: there was no v1.4.1 librdkafka release

Checksums

Release asset checksums:

  • v1.4.2.zip SHA256 ac50da08be69365988bad3d0c46cd87eced9381509d80d3d0b4b50b2fe9b9fa9
  • v1.4.2.tar.gz SHA256 3b99a36c082a67ef6295eabd4fb3e32ab0bff7c6b0d397d6352697335f4e57eb

v1.4.0

4 years ago

librdkafka v1.4.0

v1.4.0 is a feature release:

  • KIP-98: Transactional Producer API
  • KIP-345: Static consumer group membership (by @rnpridgeon)
  • KIP-511: Report client software name and version to broker

Transactional Producer API

librdkafka now has complete Exactly-Once-Semantics (EOS) functionality, supporting the idempotent producer (since v1.0.0), a transaction-aware consumer (since v1.2.0) and full producer transaction support (in this release). This enables developers to create Exactly-Once applications with Apache Kafka.

See the Transactions in Apache Kafka page for an introduction and check the librdkafka transactions example for a complete transactional application example.

Security fixes

Two security issues have been identified in the SASL SCRAM protocol handler:

  • The client nonce, which is expected to be a random string, was a static string.
  • If sasl.username and sasl.password contained characters that needed escaping, a buffer overflow and heap corruption would occur. This was protected, but too late, by an assertion.

Both of these issues are fixed in this release.

Enhancements

  • Add FNV-1a partitioner (by @Manicben, #2724). The new fnv1a_random partitioner is compatible with Sarama's NewHashPartitioner partition, easing transition from Sarama to librdkafka-based clients such as confluent-kafka-go.
  • Added rd_kafka_error_t / RdKafka::Error complex error type which provides error attributes such as indicating if an error is retriable.
  • The builtin mock broker now supports balanced consumer groups.
  • Support finding headers in nonstandard directories in CMake (@benesch)
  • Improved static library bundles which can now contain most dependencies.
  • Documentation, licenses, etc, is now installed by make install
  • Bump OpenSSL to v1.0.2u (when auto-building dependencies)

Fixes

General:

  • Correct statistics names in docs (@TimWSpence, #2754)
  • Wake up broker thread based on next request retry. Prior to this fix the next wakeup could be delayed up to 1 second regardless of next retry.
  • Treat SSL peer resets as usual Disconnects, making log.connection.close work
  • Reset buffer corrid on connection close to honour ApiVers and Sasl request priorities (@xzxxzx401, #2666)
  • Cleanup conf object if failing to creat producer or consumer (@fboranek)
  • Fix build of rdkafka_example project for windows, when using building it using Visual Studio 2017/2019 (by @Eliyahu-Machluf)
  • Minor fix to rdkafka_example usage: add lz4 and zstd compression codec to usage (by @Eliyahu-Machluf)
  • Let broker nodename updates propagate as ERR__TRANSPORT rather than ERR__NODE_UPDATE to avoid an extra error code for the application to handle.
  • Fix erroneous refcount assert in enq_once_del_source (e.g., on admin operation timeout)
  • Producers could get stuck in INIT state after a disconnect until a to-be-retried request timed out or the connection was needed for other purposes (metadata discovery, etc), this is now fixed.

Producer:

  • flush() now works with RD_KAFKA_EVENT_DR
  • Fix race condition when finding EOS-supporting broker

Consumer:

  • Consumers could get stuck after rebalance if assignment was empty
  • Enforce session.timeout.ms in the consumer itself (#2631)
  • max.poll.interval.ms is now only enforced when using subscribe()
  • Fix consumer_lag calculation for transactional topics
  • Show fetch/no-fetch reason in topic debugging
  • Properly propagate commit errors per partition
  • Don't send heartbeats after max.poll.interval.ms is exceeded.
  • Honour array size in rd_kafka_event_message_array() to avoid overflow (#2773)

Checksums

Release asset checksums:

  • v1.4.0.zip SHA256 eaf954e3b8a2ed98360b2c76f55048ee911964de8aefd8a9e1133418ec9f48dd
  • v1.4.0.tar.gz SHA256 ae27ea3f3d0d32d29004e7f709efbba2666c5383a107cc45b3a1949486b2eb84

v1.3.0

4 years ago

librdkafka v1.3.0 release

This is a feature release adding support for KIP-392 Fetch from follower, allowing a consumer to fetch messages from the closest replica to increase throughput and reduce cost.

Features

  • KIP-392 - Fetch messages from closest replica / follower (by @mhowlett)
  • Added experimental (subject to change or removal) mock broker to make application and librdkafka development testing easier.

Fixes

  • Fix consumer_lag in stats when consuming from broker versions <0.11.0.0 (regression in librdkafka v1.2.0).

Checksums

Release asset checksums:

  • v1.3.0.zip SHA256 bd3373c462c250ecebea9043fb94597a11bd6e0871d3cde19019433d3f74a99e
  • v1.3.0.tar.gz SHA256 465cab533ebc5b9ca8d97c90ab69e0093460665ebaf38623209cf343653c76d2

v1.2.2

4 years ago

librdkafka v1.2.2 release

v1.2.2 fixes the producer performance regression introduced in v1.2.1 which may affect high-throughput producer applications.

Fixes

  • Fix producer insert msgq regression in v1.2.1 (#2450).
  • Upgrade builtin lz4 to 1.9.2 (CVE-2019-17543, #2598).
  • Don't trigger error when broker hostname changes (#2591).
  • Less strict message.max.bytes check for individual messages (#993).
  • Don't call timespec_get() on OSX (since it was removed in recent XCode) by @maparent .
  • configure: add --runstatedir for compatibility with autoconf.
  • LZ4 is available from ProduceRequest 0, not 3 (fixes assert in #2480).
  • Address 12 code issues identified by Coverity static code analysis.

Enhancements

  • Add warnings for inconsistent security configuration.
  • Optimizations to hdr histogram (stats) rollover.
  • Reorganized examples and added a cleaner consumer example, added minimal C++ producer example.
  • Print compression type per message-set when debug=msg

Checksums

Release asset checksums:

  • v1.2.2.zip SHA256 7557b37e5133ed4c9b0cbbc3fd721c51be8e934d350d298bd050fcfbc738e551
  • v1.2.2.tar.gz SHA256 c5d6eb6ce080431f2996ee7e8e1f4b8f6c61455a1011b922e325e28e88d01b53

v1.2.1

4 years ago

librdkafka v1.2.1 release

Warning: v1.2.1 has a producer performance regression which may affect high-throughput producer applications. We recommend such users to upgrade to v1.3.0

v1.2.1 is a maintenance release:

  • Properly handle new Kafka-framed SASL GSSAPI frame semantics on Windows (#2542). This bug was introduced in v1.2.0 and broke GSSAPI authentication on Windows.
  • Fix msgq (re)insertion code to avoid O(N^2) insert sort operations on retry (#2508) The msgq insert code now properly handles interleaved and overlapping message range inserts, which may occur during Producer retries for high-throughput applications.
  • configure: added --disable-c11threads to avoid using libc-provided C11 threads.
  • configure: added more autoconf compatibility options to ignore

Checksums

Release asset checksums:

  • v1.2.1.zip SHA256 8b5e95318b190f40cbcd4a86d6a59dbe57b54a920d8fdf64d9c850bdf05002ca
  • v1.2.1.tar.gz SHA256 f6be27772babfdacbbf2e4c5432ea46c57ef5b7d82e52a81b885e7b804781fd6

v1.2.0

4 years ago

librdkafka v1.2.0 release

WARNING: There is an issue with SASL GSSAPI authentication on Windows with this release. Upgrade directly to v1.2.1 which fixes the issue.

v1.2.0 is a feature release making the consumer transaction aware.

  • Transaction aware consumer (isolation.level=read_committed) implemented by @mhowlett.
  • Sub-millisecond buffering (linger.ms) on the producer.
  • Improved authentication errors (KIP-152)

Consumer-side transaction support

This release adds consumer-side support for transactions. In previous releases, the consumer always delivered all messages to the application, even those in aborted or not yet committed transactions. In this release, the consumer will by default skip messages in aborted transactions. This is controlled through the new isolation.level configuration property which defaults to read_committed (only read committed messages, filter out aborted and not-yet committed transactions), to consume all messages, including for aborted transactions, you may set this property to read_uncommitted to get the behaviour of previous releases. For consumers in read_committed mode, the end of a partition is now defined to be the offset of the last message of a successfully committed transaction (referred to as the 'Last Stable Offset'). For non-transactional messages there is no change from previous releases, they will always be read, but a consumer will not advance into a not yet committed transaction on the partition.

Upgrade considerations

  • linger.ms default was changed from 0 to 0.5 ms to promote some level of batching even with default settings.

New configuration properties

  • Consumer property isolation.level=read_committed ensures the consumer will only read messages from successfully committed producer transactions. Default is read_committed. To get the previous behaviour, set the property to read_uncommitted, which will read all messages produced to a topic, regardless if the message was part of an aborted or not yet committed transaction.

Enhancements

  • Offset commit metadata (arbitrary application-specified data) is now returned by rd_kafka_committed() and rd_kafka_offsets_for_times() (@damour, #2393)
  • C++: Added Conf::c_ptr*() to retrieve the underlying C config object.
  • Added on_thread_start() and on_thread_exit() interceptors.
  • Increase queue.buffering.max.kbytes max to INT_MAX.
  • Optimize varint decoding, increasing consume performance by ~15%.

Fixes

General:

  • Rate limit IO-based queue wakeups to linger.ms, this reduces CPU load and lock contention for high throughput producer applications. (#2509)
  • Reduce memory allocations done by rd_kafka_topic_partition_list_new().
  • Fix socket recv error handling on MSVC (by Jinsu Lee).
  • Avoid 1s stalls in some scenarios when broker wakeup-fd is triggered.
  • SSL: Use only hostname (not port) when valid broker hostname (by Hunter Jacksson)
  • SSL: Ignore OpenSSL cert verification results if enable.ssl.certificate.verification=false (@salisbury-espinosa, #2433)
  • rdkafka_example_cpp: fix metadata listing mode (@njzcx)
  • SASL Kerberos/GSSAPI: don't treat kinit ECHILD errors as errors (@hannip, #2421)
  • Fix compare overflows (#2443)
  • configure: Add option to disable automagic dependency on zstd (by Thomas Deutschmann)
  • Documentation updates and fixes by Cedric Cellier and @ngrandem
  • Set thread name on MacOS X (by Nikhil Benesch)
  • C++: Fix memory leak in Headers (by Vladimir Sakharuk)
  • Fix UBSan (undefined behaviour errors) (@PlacidBox, #2417)
  • CONFIGURATION.md: escape || inside markdown table (@mhowlett)
  • Refresh broker list metadata even if no topics to refresh (#2476)

Consumer:

  • Make rd_kafka_pause|resume_partitions() synchronous, making sure that a subsequent consumer_poll() will not return messages for the paused partitions (#2455).
  • Fix incorrect toppar destroy in OffsetRequest (@binary85, #2379)
  • Fix message version 1 offset calculation (by Martin Ivanov)
  • Defer commit in transport error to avoid consumer_close hang.

Producer:

  • Messages were not timed out for leader-less partitions (.NET issue #1027).
  • Improve message timeout granularity to millisecond precision (the smallest ffective message timeout will still be 1000ms).
  • message.timeout.ms=0 is now accepted even if linger.ms > 0 (by Jeff Snyder)
  • Don't track max.poll.interval.ms unless in Consumer mode, this saves quite a few memory barries for high-performance Producers.
  • Optimization: avoid atomic fatal error code check when idempotence is disabled.

Checksums

Release asset checksums:

  • v1.2.0.zip SHA256 6e57f09c28e9a65abb886b84ff638b2562b8ad71572de15cf58578f3f9bc45ec
  • v1.2.0.tar.gz SHA256 eedde1c96104e4ac2d22a4230e34f35dd60d53976ae2563e3dd7c27190a96859

v1.1.0

4 years ago

librdkafka v1.1.0 release

v1.1.0 is a security-focused feature release:

  • SASL OAUTHBEARER support (by @rondagostino at StateStreet)
  • In-memory SSL certificates (PEM, DER, PKCS#12) support (by @noahdav at Microsoft)
  • Pluggable broker SSL certificate verification callback (by @noahdav at Microsoft)
  • Use Windows Root/CA SSL Certificate Store (by @noahdav at Microsoft)
  • ssl.endpoint.identification.algorithm=https (off by default) to validate the broker hostname matches the certificate. Requires OpenSSL >= 1.0.2.
  • Improved GSSAPI/Kerberos ticket refresh

Upgrade considerations

  • Windows SSL users will no longer need to specify a CA certificate file/directory (ssl.ca.location), librdkafka will load the CA certs by default from the Windows Root Certificate Store.
  • SSL peer (broker) certificate verification is now enabled by default (disable with enable.ssl.certificate.verification=false)
  • %{broker.name} is no longer supported in sasl.kerberos.kinit.cmd since kinit refresh is no longer executed per broker, but per client instance.

SSL

New configuration properties:

  • ssl.key.pem - client's private key as a string in PEM format
  • ssl.certificate.pem - client's public key as a string in PEM format
  • enable.ssl.certificate.verification - enable(default)/disable OpenSSL's builtin broker certificate verification.
  • enable.ssl.endpoint.identification.algorithm - to verify the broker's hostname with its certificate (disabled by default).
  • Add new rd_kafka_conf_set_ssl_cert() to pass PKCS#12, DER or PEM certs in (binary) memory form to the configuration object.
  • The private key data is now securely cleared from memory after last use.

Enhancements

  • configure: Improve library checking
  • Added rd_kafka_conf() to retrieve the client's configuration object
  • Bump message.timeout.ms max value from 15 minutes to 24 days (@sarkanyi, workaround for #2015)

Fixes

  • SASL GSSAPI/Kerberos: Don't run kinit refresh for each broker, just per client instance.
  • SASL GSSAPI/Kerberos: Changed sasl.kerberos.kinit.cmd to first attempt ticket refresh, then acquire.
  • SASL: Proper locking on broker name acquisition.
  • Consumer: max.poll.interval.ms now correctly handles blocking poll calls, allowing a longer poll timeout than the max poll interval.
  • configure: Fix libzstd static lib detection
  • rdkafka_performance: Fix for Misleading "All messages delivered!" message (@solar_coder)
  • Windows build and CMake fixes (@myd7349)

Checksums

Release asset checksums:

  • v1.1.0.zip SHA256 70279676ed863c984f9e088db124ac84a080e644c38d4d239f9ebd3e3c405e84
  • v1.1.0.tar.gz SHA256 123b47404c16bcde194b4bd1221c21fdce832ad12912bd8074f88f64b2b86f2b

v1.0.1

5 years ago

librdkafka v1.0.1 release

v1.0.1 is a maintenance release with the following fixes:

  • Fix consumer stall when broker connection goes down (issue #2266 introduced in v1.0.0)
  • Fix AdminAPI memory leak when broker does not support request (@souradeep100, #2314)
  • Update/fix protocol error response codes (@benesch)
  • Treat ECONNRESET as standard Disconnects (#2291)

v1.0.0

5 years ago

librdkafka v1.0.0 release

v1.0.0 is a major feature release:

  • Idempotent producer - guaranteed ordering, exactly-once producing.
  • Sparse/on-demand connections - connections are no longer maintained to all brokers in the cluster.
  • KIP-62 - max.poll.interval.ms for high-level consumers

This release also changes configuration defaults and deprecates a set of configuration properties, make sure to read the Upgrade considerations section below.

Upgrade considerations (IMPORTANT)

librdkafka v1.0.0 is API (C & C++) and ABI (C) compatible with older versions of librdkafka, but there are changes to configuration properties that may require changes to existing applications.

Configuration default changes

The following configuration properties have changed default values, which may require application changes:

  • acks (alias request.required.acks) default is now all (wait for ack from all in-sync replica brokers), the previous default was 1 (only wait for ack from partition leader) which could cause data loss if the leader broker goes down.
  • enable.partition.eof is now false by default. Applications that rely on ERR__PARTITION_EOF to be emitted must now explicitly set this property to true. This change was made to simplify the common case consumer application consume loop.
  • broker.version.fallback was changed from 0.9 to 0.10 and broker.version.fallback.ms was changed to 0. Users on Apache Kafka <0.10 must set api.version.request=false and broker.version.fallback=.. to their broker version. For users >=0.10 there is no longer any need to specify any of these properties. See https://github.com/edenhill/librdkafka/wiki/Broker-version-compatibility for more information.

Deprecated configuration properties

  • topic.metadata.refresh.fast.cnt is no longer used.
  • socket.blocking.max.ms is no longer used.
  • reconnect.backoff.jitter.ms is no longer used, see reconnect.backoff.ms and reconnect.backoff.max.ms.
  • offset.store.method=file is deprecated.
  • offset.store.path is deprecated.
  • offset.store.sync.interval.ms is deprecated.
  • queuing.strategy was an experimental property that is now deprecated.
  • msg_order_cmp was an experimental property that is now deprecated.
  • produce.offset.report is no longer used. Offsets are always reported.
  • auto.commit.enable (topic level) for the simple (legacy) consumer is now deprecated.

Use of any deprecated configuration property will result in a warning when the client instance is created. The deprecated configuration properties will be removed in a future version of librdkafka. See issue #2020 for more information.

Configuration checking

The checks for incompatible configuration has been improved, the client instantiation (rd_kafka_new()) will now fail if incompatible configuration is detected.

max.poll.interval.ms is enforced

This release adds support for max.poll.interval.ms (KIP-62), which requires the application to call rd_kafka_consumer_poll()/rd_kafka_poll() at least every max.poll.interval.ms. Failure to do so will make the consumer automatically leave the group, causing a group rebalance, and not rejoin the group until the application has called ..poll() again, triggering yet another group rebalance. max.poll.interval.ms is set to 5 minutes by default.

Idempotent Producer

This release adds support for Idempotent Producer, providing exactly-once producing and guaranteed ordering of messages.

Enabling idempotence is as simple as setting the enable.idempotence configuration property to true.

There are no required application changes, but it is recommended to add support for the newly introduced fatal errors that will be triggered when the idempotent producer encounters an unrecoverable error that would break the ordering or duplication guarantees.

See Idempotent Producer in the manual and the Exactly once semantics blog post for more information.

Sparse connections

In previous releases librdkafka would maintain open connections to all brokers in the cluster and the bootstrap servers.

With this release librdkafka now connects to a single bootstrap server to retrieve the full broker list, and then connects to the brokers it needs to communicate with: partition leaders, group coordinators, etc.

For large scale deployments this greatly reduces the number of connections between clients and brokers, and avoids the repeated idle connection closes for unused connections.

See Sparse connections in the manual for more information.

Original issue #825.

Features

  • Add support for ZSTD compression (KIP-110, @mvavrusa. Caveat: will not currently work with topics configured with compression.type=zstd, instead use compression.type=producer, see #2183)
  • Added max.poll.interval.ms (KIP-62, #1039) to allow long processing times.
  • Message Header support for C++ API (@davidtrihy)

Enhancements

  • Added rd_kafka_purge() API to purge messages from producer queues (#990)
  • Added fatal errors (see ERR__FATAL and rd_kafka_fatal_error()) to raise unrecoverable errors to the application. Currently only triggered by the Idempotent Producer.
  • Added rd_kafka_message_status() producer API that may be used from the delivery report callback to know if the message was persisted to brokers or not. This is useful for applications that want to perform manual retries of messages, to know if a retry could lead to duplication.
  • Backoff reconnects exponentially (See reconnect.backoff.ms and reconnect.backoff.max.ms).
  • Add broker[..].req["reqType"] per-request-type metrics to statistics.
  • CONFIGURATION.md: Added Importance column.
  • ./configure --install-deps (and also --source-deps-only) will automatically install dependencies through the native package manager and/or from source.

Fixes

General

  • rd_kafka_version() was not thread safe
  • Round up microsecond->millisecond timeouts to 1ms in internal scheduler to avoid CPU-intensive busy-loop.
  • Send connection handshake requests before lower prio requests.
  • Fix timespec conversion to avoid infinite loop (#2108, @boatfish)
  • Fix busy-loop: Don't set POLLOUT (due to requests queued) in CONNECT state (#2118)
  • Broker hostname max size increased from 127 to 255 bytes (#2171, @Vijendra07Kulhade)

Consumer

  • C++: Fix crash when Consumer ctor fails
  • Make sure LeaveGroup is sent on unsubscribe and consumer close (#2010, #2040)
  • Remember assign()/seek():ed offset when pause()ing (#2105)
  • Fix handling of mixed MsgVersions in same FetchResponse (#2090)

Producer

  • Added delivery.timeout.ms -> message.timeout.ms alias
  • Prevent int overflow while computing abs_timeout for producer request… (#2050, @KseniyaYakil).
  • Producer: fix re-ordering corner-case on retry.

Windows

  • win32: cnd_timedwait*() could leave the cond signalled, resulting in high CPU usage.

Build/installation/tooling

  • Makefile: fix install rule (#2049, @pacovn)
  • Fixing Counting error in rdkafka_performance #1542 (#2028, @gnanasekarl)
  • OpenSSL 1.1.0 compatibility (#2000, @nouzun, @wiml)
  • Set OpenSSL locking callbacks as required, dont call CRYPTO_cleanup_all_ex_data (#1984, @ameihm0912)
  • Fix 64-bit IBM i build error (#2017, @ThePrez)
  • CMake: Generate pkg-config files (@Oxymoron79, #2075)
  • mklove: suggest brew packages to install on osx
  • rdkafka_performance: Add an option to dump the configuration (@akohn)
  • Check for libcrypto explicitly (OSX Mojave, #2089)