Repository navigation
Releases
Releases · confluentinc/confluent-kafka-javascript
v1.11.0
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.
v1.11.0-rc1
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.
v1.10.1
Enhancements
- References librdkafka 2.15.1. Refer to the librdkafka 2.15.1 release notes for more information.
Fixes
- Preserve HTTP status on Schema Registry error responses (#519)
- Upgrade transitive dependencies in package-lock.json for security patches (#525)
- Store a message as last consumed offset only after processing
eachMessageor resolving offsets ineachBatch, at the same time when it's stored for being committed (#525) - Avoid a single message duplicate when seeking back for reprocessing a message or batch (#525)
- Fix a crash when an admin operation fails before its result event is received, caused by the event being uninitialized in the admin workers (#525)
v1.10.1-rc1
Enhancements
- References librdkafka 2.15.1. Refer to the librdkafka 2.15.1 release notes for more information.
Fixes
- Preserve HTTP status on Schema Registry error responses (#519)
- Upgrade transitive dependencies in package-lock.json for security patches (#525)
- Store a message as last consumed offset only after processing
eachMessageor resolving offsets ineachBatch, at the same time when it's stored for being committed (#525) - Avoid a single message duplicate when seeking back for reprocessing a message or batch (#525)
- Fix a crash when an admin operation fails before its result event is received, caused by the event being uninitialized in the admin workers (#525)
v1.10.1-alpha.0
v1.10.1-alpha.0 is an alpha maintenance release. It's not supported.
Enhancements
- Add prebuilt binaries for Linux s390x (IBM Z), both glibc and musl, across the
supported Node.js ABIs.
v1.10.0
v1.10.0 is a feature release. It is supported for all usage.
Enhancements
- References librdkafka v2.15.0. Refer to the librdkafka v2.15.0 release notes for more information.
- Support for union-of-pools/auto-pool mapping for schema registry (#500)
Fixes
- Handle non-HTTP errors during retries (#499)
v1.10.0-rc1
v1.10.0 is a feature release candidate. It is not supported.
Enhancements
- References librdkafka v2.15.0. Refer to the librdkafka v2.15.0 release notes for more information.
- Support for union-of-pools/auto-pool mapping for schema registry (#500)
Fixes
- Handle non-HTTP errors during retries (#499)
v1.9.1
v1.9.1 is a maintenance release. It is supported for all usage.
Enhancements
- References librdkafka v2.14.2. Refer to the librdkafka v2.14.2 release notes for more information.
Fixes
- Handle anyOf/allOf in JSON transforms (#479)
- Preserve custom subjectNameStrategy in serde constructors (#482)
- Correct the TypeScript return type of
admin.fetchTopicMetadatatoPromise<Array<ITopicMetadata>>(#367) - Correct the TypeScript
MemberDescriptionshape returned byadmin.describeGroupssoassignment/targetAssignmentwrap atopicPartitionsarray andmemberAssignment/memberMetadataare nullable (#487) - Correct the TypeScript
FetchOffsetsPartition.errortype returned byadmin.fetchOffsetstoLibrdKafkaError | null, matching the runtime which always populates the field. It never returnes undefined. (#489) - Correct broken "types" path so TS consumers get types (#484)
- Resolve IHeaders import for installed clients (#492)
- Fix error callback passing and object to the logger instead of a string (#483)
- Fix security vulnerabilities in dependencies (#478)
- Handle missing Protobuf message index bytes in ProtobufDeserializer (#481)
v1.9.1-rc1
v1.9.1-rc1 is a maintenance release candidate. It is not supported.
Enhancements
- References librdkafka v2.14.2-RC3. Refer to the librdkafka v2.14.2-RC3 release notes for more information.
Fixes
- Handle anyOf/allOf in JSON transforms (#479)
- Preserve custom subjectNameStrategy in serde constructors (#482)
- Correct the TypeScript return type of
admin.fetchTopicMetadatatoPromise<Array<ITopicMetadata>>(#367) - Correct the TypeScript
MemberDescriptionshape returned byadmin.describeGroupssoassignment/targetAssignmentwrap atopicPartitionsarray andmemberAssignment/memberMetadataare nullable (#487) - Correct the TypeScript
FetchOffsetsPartition.errortype returned byadmin.fetchOffsetstoLibrdKafkaError | null, matching the runtime which always populates the field. It never returns undefined. (#489) - Correct broken "types" path so TS consumers get types (#484)
- Resolve IHeaders import for installed clients (#492)
- Fix error callback passing and object to the logger instead of a string (#483)
- Fix security vulnerabilities in dependencies (#478)
- Handle missing Protobuf message index bytes in ProtobufDeserializer (#481)