npm / @platformatic/kafka
@platformatic/kafka
What changed in @platformatic/kafka 1 to 2, from its official release notes, upgrade guides and advisories. Sources checked 2026-11-25.
8 breaking2 security51 new APIs and options8 performance19 behavior and defaults2 tooling85 fixes and other
See which of these apply to your code, ranked, in your agent:
npx @unstale/cli init@platformatic/kafka 2108 changes
Breaking changes 4
The consumer default for maxBytesPerPartition is now 1MB.
A fenced instance ID now requires the consumer to rejoin.
TimeoutError is now retryable.
Compatibility with Node.js 20 is dropped.
Security 2
Consumer group subscription decoding is hardened.
Detects missing TLS configuration.
New APIs and options 25
Adds linger to batch messages across send() calls.
Terminal consumer group membership loss is now signaled.
A timeout is available for group leave during consumer close.
Broker connections have an idle-timeout option.
Broker connections have a keep-alive option.
A new partitionAssignerTopicsSelector option is available.
New options for reauthentication are available.
Adds asynchronous gzip compression.
createTopics supports per-topic overrides, and its options schema allows configs.
The group:rebalance event is emitted when partitions are revoked under the consumer protocol.
An event is emitted when heartbeats stop succeeding.
Consumed messages expose the record batch leader epoch.
ConfluentSchemaRegistry requests can include custom HTTP headers.
ConfluentSchemaRegistry supports a retry option.
ConfluentSchemaRegistry supports a timeout option.
TLS options are available for the ConfluentSchemaRegistry HTTP client.
Consumed key and value schema IDs are exposed in message metadata.
Original key and value byte lengths are exposed after Schema Registry decode.
Schema Registry decode errors can soft-fail so consuming continues.
Adds a handler for deserialization errors.
AJV options were added for the schema registry.
Adds a metadata callback for consumer protocols.
Adds client rack support for affinity.
Adds maxBytesPerPartition.
Metadata is now passed as partitioner context, allowing partitioners to use it.
Performance 7
API codecs are loaded on demand.
Producer murmur2 computation now uses 32-bit integer math instead of BigInt.
Option validators are compiled on first use.
The producer no longer builds a partition key for each message.
Consumers decode record batches from a contiguous buffer.
The producer returns record batches as a head and a contiguous body.
Schema registry libraries and the LRU cache are loaded on demand.
Behavior and default changes 12
A closing event is emitted when requests time out.
SNI is enabled by default for non-IP destinations.
Implements KIP-429.
Supports multiple JSON Schema drafts.
Reuses incremental fetch sessions instead of using sessionId=…
Logs the whole error hierarchy for MultipleErrors.
Bootstrap candidates are rotated.
The client tries ApiVersions v3 first, then downgrades to v1.
The package supports all older Kafka API versions, allowing developers to use it with older Kafka APIs.
When schemaType is omitted in fetchSchema, it now defaults to AVRO.
Group assignment user data is no longer parsed.
The maxBytes value is increased.
Tooling 1
Adds CI support for Node.js 26, indicating compatibility with that runtime.
Fixes and other changes 57
Consumer group options are preserved during internal rejoins.
The number of errors retained across retries is now bounded.
The consumer no longer retries a fetch when its partitions have moved to other leaders.
Fixes handling of null values and batchMaxBytes when messages are batched while lingering.
Offsets queued during an in-flight commit are flushed before partitions are revoked.
The reauthentication timer is cleared when the connection closes.
Offsets are preserved when filtering aborted transactions.
Brokers missing from the latest metadata response are remembered.
Connection errors are caught.
Admin operations preserve consumer group members with malformed payloads.
An in-flight rejoin no longer revives a closed consumer.
Duplicate child messages are removed from joinGroup errors.
Cached leader epochs are invalidated after fenced fetches.
Pending requests fail and reset when the connection closes.
Revoked partitions are no longer committed after a consumer rejoin.
Topic listing tolerates partition metadata errors.
Fixes failures when using Azure.
Stale fetches are discarded after an offset refresh.
Out-of-range partitions are reduced modulo the partition count when selecting send brokers.
The options schema declares isolationLevel as a number.
Retriable error detection is improved.
Legacy metadata advertising is now decoded correctly.
Updates metadata on broker rebalance.
Updates consumer lag after manual commits.
Repeated rejoin errors cause performJoinGroup to retry indefinitely without an error, timeout, or log signal.
Corrects close overload resolution and allows a consumer to close after broker disconnect.
Prevents a crash when a control marker has no aborted transaction range.
Publishes explicit empty KIP-848 assignments.
Disables metadata retrying in the producer loop.
Broker metadata is refreshed after retryable network errors.
Classic heartbeats are rescheduled after a non-group error.
Committed offsets are kept across overlapping refreshes.
Consumed messages preserve duplicate headers.
IPv6 bootstrap broker addresses are parsed correctly.
Failures in the before-deserialization hook are reported through onDeserializationError.
Active streams are closed when leaving a group with the consumer protocol.
A TypeError is no longer uncaught when a closed connection pool errors.
Deserialization errors are now exposed to onCorruptedMessage.
Schema fetching is deduplicated.
Consumer group rejoin now handles stale or incomplete metadata.
Removed partitions are now forgotten in incremental fetch sessions.
Producer initialization fails over from a hung bootstrap broker.
Includes several fixes and improvements to the Admin Client.
Handles empty messages in Confluent Schema Registry.
Restores idempotent producer state after a failure.
Fixes tagged field decoding.
Metadata requests no longer request topic authorized operations.
Sets refreshOffsetsInflight during _construct, fixing the in-flight state during construction.
Synchronous exceptions during retry are routed to the callback.
The connection correlation ID is constrained to 32 bits.
Recovery works when Fetch omits the reset offset.
The coordinator is reset when appropriate.
Undefined options are ignored when merging with defaults, so they no longer override default values.
Always writes the user data bytes field in ConsumerProtocolAssigment.
Fixes recovery from out of range errors.
Fixes stale epoch errors.
Handles Xerial Snappy encoding.
@platformatic/kafka 167 changes
Breaking changes 4
Series are no longer run on empty collections.
Reverts Admin export namespacing, changing how Admin exports are named.
Adjusts the default value for partitions.
Adjusts the default value for replicas.
New APIs and options 26
Added connections inspection.
Added compatibilityPartitioner for use by developers.
The admin client now implements findCoordinator.
Support for opaque context was added in each object.
Adds Admin.deleteRecords.
Added ProducerStream for producing messages through a stream.
Confluent Schema Registry is now supported.
Custom retry delay policies are supported, allowing developers to specify retry delays.
Adds support for a group instance ID.
Adds ssl as an option alias of tls.
ACL APIs are implemented.
Config APIs are implemented.
Consumer Group Offset APIs are implemented.
The CreatePartitions API is implemented, enabling partition creation through the package.
Label and value types are defined for enumerations.
TypeScript interfaces are added for consumer event payloads.
Transaction support is added.
Implements an API for removing consumer group members.
Makes error messages from the server available to developers.
Support was added for custom SASL authenticators.
Support was added for SASL/OAUTHBEARER extensions.
Added Azure Event Hub support.
Implements client quota APIs.
Adds a consumer lagging API and metrics.
Implements the KIP-848 new consumer protocol.
Implements the Log Dir API.
Performance 1
Moves fetch connections to streams for parallelism.
Behavior and default changes 7
When bootstrap brokers are unreachable, the client falls back to discovered brokers.
The connect event is emitted upon SASL re-authentication.
Crypto and compression implementations switch to WASM-based implementations.
Blocks connections while SASL reauthentication is in progress.
More cluster metadata is passed up, making additional metadata available to developers.
Implements request timeouts.
When no topics are provided, offsets are fetched for all topics.
Tooling 1
The typings for runConcurrentCallbacks are improved.
Fixes and other changes 28
Errors are cleaned after success.
Fixed needsRejoin handling for ILLEGAL_GENERATION.
Fixed kAutocommit cascade behavior.
Fixes a memory use regression.
Fixed retries overriding for idempotent.
Fixed SCRAM parameter parsing.
Fixes backpressure processing stalling.
Adds timeout and close handling to connection.ready().
Fixes handling of FENCED_LEADER_EPOCH and undefined entries in MultipleErrors.
Fixes a crash when listing the offset of an unknown partition.
Added support for Kafka 4.1.0.
Fetches are delayed during rebalances.
RedPanda is now supported.
Null is encoded as varint(-1), fixing Kafka tombstone handling.
Fixes consuming behavior upon disconnection.
The ListOffsets API is implemented.
Offset commits now commit offset+1 instead of offset.
Topic creations and deletions are no longer deduplicated irrespective of topics.
Fixes 41/NOT_CONTROLLER for non-Kraft clusters.
Fixes unhandled errors on custom connection errors.
Enables compatibility with TypeScript 4.
Metadata is published to the diagnostic channel even when invoked internally.
Request serialisation errors are handled asynchronously.
Fixed handling of undefined options.
Fixed describeGroup response handling.
Fixed lag computation.
Corrects the typing for consumer.fetch options, so TypeScript users get accurate types.
Fixes ConsumerGroupHeartbeat v0.