pypi / confluent-kafka
confluent-kafka
What changed in confluent-kafka 1 to 2, from its official release notes, upgrade guides and advisories. Sources checked 2026-11-12.
20 breaking1 security6 deprecations58 new APIs and options12 behavior and defaults1 tooling44 fixes and other
See which of these apply to your code, ranked, in your agent:
npx @unstale/cli initconfluent-kafka 2117 changes
Breaking changes 9
The Schema Registry client requires certifi>=2026.10.19 when no custom CA location or SSL_CERT_FILE or SSL_CERT_DIR is set, avoiding trust in the compromised eMudhra root.
Closing a producer now aborts any open transaction.
Unicode encoding and decoding failures now raise SerializationError.
Uses get_running_loop() to avoid creating a new event loop and raises an error when no loop is available.
Deserializes the message key before the value; when both fail, surfaces the key error.
Type hinting is enforced for all interfaces.
The request header changed from Accept-Version to Confluent-Accept-Unknown-Properties.
Now returns a string/integer tuple for variants on version; use version for a string-only response.
Adds Python 3.14 support and drops Python 3.7 support; free-threaded capabilities are not fully supported yet.
Security 1
Uses TLS certification verification with Hashicorp Vault.
Deprecations 1
Schema Registry now prefers httpx2 over httpx to avoid Authlib deprecation warnings.
New APIs and options 52
Returns the id of the cluster the admin client is connected to; this API is experimental.
Returns the id of the cluster the async consumer is connected to; this API is experimental.
Returns the id of the cluster the async producer is connected to; this API is experimental.
A new experimental asyncio consumer counterpart accepts asyncio Schema Registry serdes and their builders.
A new experimental asyncio producer counterpart accepts asyncio Schema Registry serdes and their builders.
Support is added for saving the Azure key version with a DEK.
Returns the id of the cluster the consumer is connected to; this API is experimental.
The CEL function set now includes Decimal.
Setting this option enables durability for DLQ handling with the default global RuleRegistry.
Schema Registry supports the DLQ rule action, which tees a record to a configured DLQ topic when a rule fails while the original call still raises.
Support is added for inline validation rules.
DeserializingConsumer can accept a serde builder instead of a ready-made key serde; the client owns and closes serdes built this way.
SerializingProducer can accept a serde builder instead of a ready-made key serde; the client owns and closes serdes built this way.
Returns the same object as key(), typed with the deserialized key type on a DeserializingConsumer; this API is experimental.
Returns the same object as value(), typed with the deserialized value type on a DeserializingConsumer; this API is experimental.
Returns the id of the cluster the producer is connected to; this API is experimental.
A new experimental serde close hook is available.
A new experimental serde hook supports resolving the cluster id for associated subject lookups.
This option supplies the Kafka cluster id explicitly when an associated subject lookup occurs before a broker has been reached.
The CEL function set now includes Timestamp.
DeserializingConsumer can accept a serde builder instead of a ready-made value serde; the client owns and closes serdes built this way.
SerializingProducer can accept a serde builder instead of a ready-made value serde; the client owns and closes serdes built this way.
The CEL function set now includes Variant.
Adds an acknowledgement-commit callback for share consumers.
Adds ACCEPT, RELEASE, and REJECT acknowledgement types for share consumers.
Adds auto pool mapping support for Schema Registry.
Adds asynchronous commit support for share consumers.
Adds synchronous commit support for share consumers.
Adds the ConcurrentModificationException exception.
Adds an optional install for AWS IAM-based OAUTHBEARER authentication via AWS STS GetWebIdentityToken.
Adds a Preview deserializing share consumer; the share consumer is single-threaded, not thread-safe, and should not be used in production.
Adds the IllegalStateException exception.
Adds a method to obtain a message's delivery count.
Configure the AWS IAM OAUTHBEARER region and audience with this option.
Set this option to aws_iam to activate AWS IAM-based OAUTHBEARER authentication.
Set this option to oidc to activate AWS IAM-based OAUTHBEARER authentication.
Adds runtime SASL credential updates.
Adds implicit (default) and explicit acknowledgement modes for share consumers.
Adds a Preview share consumer with subscribe, batch poll, close, and context-manager support; it is single-threaded, not thread-safe, and should not be used in production.
Adds Schema Registry support for union-of-pools.
AIOConsumer implements the async context manager protocol.
AIOProducer implements the async context manager protocol.
Adds AssociatedNameStrategy.
Adds enableAt to RuleSet.
UAMI OAuth changes were added.
Producer now has a close() method.
Partitioner functions are now exposed for deterministic partitioning.
AIOProducer now implements __len__.
librdkafka classes can be used as context managers for scope cleanup.
Message objects can now be created directly.
Message gains serialisation support and rich comparison.
Avro Serializers now support Strict Validation Flags.
Behavior and default changes 10
The default worker pool size has increased from 2 to 100.
confluent_kafka now declares itself GIL-safe, enabling real multi-core parallelism on free-threaded CPython builds.
Clients now pass context when making KEK calls to the DEK Registry.
Both classes are now generic in their key and value types.
Makes orjson optional in JSON serdes and falls back to the standard-library json module.
Requests to Schema Registry now include the Confluent-Client-Version header.
Schema requests now include an Accept-Version header.
Async classes are no longer designated experimental.
The manager now flushes the librdkafka queue.
Admin, Producer, and Consumer clients handle OAuth token refreshes using a background thread.
Tooling 1
Wheels are now available for Python 3.14t.
Fixes and other changes 43
Fixes __hash__ raising TypeError on unhashable list values so schemas with metadata.tags can be cached.
A crash involving nullable arrays of $ref items is fixed.
Error strings no longer raise or become garbled on non-UTF-8 locales.
Wheels are now available for Linux s390x, including Python 3.14t.
Concurrency safety issues in these classes are fixed.
On big-endian platforms such as s390x, purge no longer ignores in_queue, in_flight, and blocking when set to False.
Concurrent access to one Consumer instance is now serialized across threads instead of being undefined behavior.
Fixes a segmentation fault on Python 3.14 when another Admin API call follows delete_records().
Fixes a minor issue with the subjectPrefix parameter in the subjects API.
Fixes encryption failures when expanded union types have two references to the same record.
Handles non-HTTP errors during retries.
JSON transforms now handle anyOf/allOf.
Redefining a named Avro type in a diamond dependency pattern is fixed.
Encryption no longer fails when referencing self-defined types.
Import errors on Python 3.12 are fixed.
URL joining in the Python client is fixed.
Corrects type annotations for context manager hooks so they work for subclasses.
Ensures the normalize.schemas config is passed during Protobuf reference lookup.
Fixes OAuth callback handling for Async IO clients to prevent initialization failures.
Type hinting for Consumer.__init__ was fixed.
Type hinting for Consumer.commit was fixed.
A JSON schema resolver bug was fixed.
Type hinting for KafkaError was fixed.
Type hinting for Producer.__init__ was fixed.
Type hinting for Producer.produce was fixed.
Fixes a memory leak when produce is called with headers and raises BufferError or RuntimeError.
The token expiration logic in Schema Registry OAuth was fixed.
A null group name no longer causes a segfault.
Consumer.poll(), Consumer.consume(), Producer.poll(), and Producer.flush() can now be interrupted with Ctrl+C instead of blocking indefinitely.
Calls against objects with closed internal objects no longer cause segfault exceptions.
commit() now checks for Py_None in msg and offset parameters.
The return type hint now matches the type of the object that called __enter__.
Schema evolution is now handled during field transformation.
NewTopic is no longer left partially initialized when an error occurs.
Schema Registry delete behavior is fixed when client-side caching is enabled.
schemaId initialization is now thread-safe.
store_offsets() now checks for Py_None in msg and offset parameters.
Fixes string formatting on Windows to show the partition number instead of
%I32d.Support for wrapped Avro unions is fixed.
Evolution is handled during field transformation.
Restored compatibility of macOS binaries with macOS 13.
Fixes invalid argument errors on repeated schema lookup requests.
Fixes use.schema.id handling in schema lookups.
confluent-kafka 125 changes
Breaking changes 11
Defaults to all, waiting for all in-sync replica brokers to acknowledge; this emphasizes durability at a slight cost to latency.
Defaults to 0.10 instead of 0.9; users on Apache Kafka <0.10 must configure it to their broker version.
The url configuration changes from a string to a configuration dictionary containing all application config properties.
Fixes a crash when called without group.id, which is now required.
Defaults to false; applications that require partition-end events must explicitly set it to true.
Sparse connections are on by default; setting this property to false restores connecting to all brokers in the cluster.
A group.id is now required for Python consumers.
This property is no longer used; offsets are always reported.
This property is no longer used; see reconnect.backoff.ms and reconnect.backoff.max.ms.
This property is no longer used.
This property is no longer used.
Deprecations 5
This configuration property is deprecated and will be removed in a future release.
The file value is deprecated; using a deprecated configuration property produces a warning when the client instance is created.
This configuration property is deprecated and will be removed in a future release.
This configuration property is deprecated and will be removed in a future release.
This experimental property is deprecated and will be removed in a future release.
New APIs and options 6
Supports encoding with fastavro.
Configuration is simplified by accepting a configuration dictionary for application configs.
Supports HTTP Basic Auth.
CachedSchemaRegistryClient adds Delete Schema support.
Setting this property to true enables idempotent producing, providing exactly-once producing and guaranteed message ordering.
Supports specifying a reader schema.
Behavior and default changes 2
Defaults to 0.
Defaults to 5 minutes.
Fixes and other changes 1
Handles get_compatibility properly.