Repository navigation
v1.11.0-rc1
Pre-release
Pre-release
Enhancements
- References librdkafka 2.16.0. Refer to the librdkafka 2.16.0 release notes for more information.
- Support generating a JSON Schema title from a JSON payload (#505)
- Add support for saving Azure key version with DEK (#507)
- Pass context when clients make KEK calls to DEK Registry (#508)
- Add support for inline validation rules (#522)
- Add Variant, Decimal, and Timestamp CEL functions (#524)
- Add prebuilt binaries for linux-s390x (IBM Z), for both glibc and musl (#527)
- Integrate the Schema Registry serdes with the promisified Kafka clients (#543). The serde integration and
clusterId()are added on an experimental basis and may change or be removed in a future release.- Add
clusterIdto the producer, consumer and admin clients to fetch the id of the cluster the client is connected to. It is available on both the node-rdkafka API and the promisified API. - Add the
js.key.serializer.builder/js.value.serializer.builderproducer properties and thejs.key.deserializer.builder/js.value.deserializer.builderconsumer properties, taking the newkafka{Avro,Json,Protobuf}{Serializer,Deserializer}Builder()builders. The client builds the serdes while connecting, applies them to every key and value, and closes them when it disconnects. A builder can either create a Schema Registry client from aClientConfig(owned and closed together with the serde) or be given one withsetSchemaRegistryClient(never closed by the serde).build(config, isKey)is handed a copy of the full client configuration and returns the serde together with the configuration it did not consume; the client is created with the properties every builder left in place, so a property consumed by any builder never reaches librdkafka. - The ASSOCIATED subject name strategy (the default of the builders) resolves the Kafka cluster id lazily, on the first subject lookup, through a resolver the client hands the serde once connected (
setClusterIdResolver): connecting no longer waits on it and an explicitsubject.name.strategy.kafka.cluster.idstill takes precedence. Concurrent resolutions share a single call into librdkafka, so however many serdes or in-flight sends need the id at once, only one native worker waits on it. send()rejects an invalid topic or messages list before serializing, and reports serializer failures asKeySerializationError/ValueSerializationError(with the original error ascause). Deserializer failures are reported on the message, asdeserializedKey.error/deserializedValue.error(KeyDeserializationError/ValueDeserializationError), so that the record is still delivered.
- Add
- The promisified (KafkaJS-compatible)
producer.connect()andconsumer.connect()
now retry on transient connection errors instead of failing on the first one,
controlled byretry.retries(default 5). Each attempt is bounded by the
connection-setup timeout (connectionTimeout+authenticationTimeout) plus a
small margin rather than a fixed 30s, and the wait between attempts grows
exponentially fromretry.initialRetryTimeup toretry.maxRetryTime(with
jitter), as in KafkaJS.retry.initialRetryTime/retry.maxRetryTimenow also
map toreconnect.backoff.ms/reconnect.backoff.max.ms, so the reconnection
attempts librdkafka makes within each connect attempt follow the same backoff.
Note: this changes the default behavior ofconnect()— against a
persistently-unreachable broker it now makes up toretries+ 1 attempts before
rejecting, instead of rejecting after a single attempt. Setretry: { retries: 0 }
to restore the single-attempt behavior. Only transient connection errors are
retried (transport failures, all brokers down, name resolution failures and
timeouts); any other error, such as an authentication or configuration error,
fails fast. Concurrentconnect()calls on the same client now share a single
in-flight connection attempt rather than the second call throwing.