Skip to content

Upgrading Confluent.Kafka 0.11 to 1

Breaking0.11.6 → 1.9.3Breaking25Security4Deprecated3New43Changed47Fixed27Other4

Fetching 96 releases from GitHub…88 / 96
BreakingUpgrade verdict

25 breaking changes and 4 security fixes.

  • Projects targeting .NET Framework 4.5.2 can no longer use the Schema Registry packages.
  • Code calling the callback-based ProduceAsync overloads must switch to Produce.
  • End-of-partition notices arrive through ConsumeResult and are off unless you turn them on.
  • The Avro package has a new name; update your package references and namespaces.
Top 5 of 32 that need code or config changes

Target frameworks requirement changed in 1.9.2-RC2: .NETFramework4.5, .NETFramework4.6, .NETStandard1.3 → .NETFramework4.6.2, .NETStandard1.3, .NETStandard2.0, net6.0.

Breaking25
Removes net452 as a target framework of Confluent.SchemaRegistry and Confluent.SchemaRegistry.Serdes due to the official Apache Avro package targeting only netstandard2.0.
Confluent.SchemaRegistryConfluent.SchemaRegistry.Serdesnet452netstandard2.0
Renames ProduceAsync variants with a callback to Produce.
ProduceAsyncProduce
PartitionEOF notification is now via ConsumeResult, not events, and is disabled by default.
ConsumeResult
Renames Confluent.Kafka.Avro to Confluent.SchemaRegistry.Serdes in preparation for additional serialization formats.
Confluent.Kafka.AvroConfluent.SchemaRegistry.Serdes
Renames AsyncAvroSerializer to AvroSerializer and AsyncAvroDeserializer to AvroDeserializer.
AsyncAvroSerializerAvroSerializerAsyncAvroDeserializerAvroDeserializer
Renames AvroSerializer to AsyncAvroSerializer and AvroDeserializer to AsyncAvroDeserializer.
AvroSerializerAsyncAvroSerializerAvroDeserializerAsyncAvroDeserializer
Removes IAsyncDeserializer setter overloads from the ConsumerBuilder class.
IAsyncDeserializerConsumerBuilder
Renames Producer.BeginProduce to Producer.Produce.
Producer.BeginProduceProducer.Produce
Removes SerializationContext from non-async serde interfaces.
SerializationContext
Removes the Confluent.Kafka.Serdes namespace.
Confluent.Kafka.Serdes
Renames the Message.PersistenceStatus property to Message.Status.
Message.PersistenceStatusMessage.Status
Removes unused CancellationToken parameters, to be added back when implemented.
CancellationToken
Updates Protobuf serdes message framing to match Java (zigzag message indices); set UseDeprecatedFormat to true to disable.
ProtobufSerializerProtobufDeserializerUseDeprecatedFormat
The 1.0 API is not compatible with earlier versions of the library.
Construction is now via builder classes, which require event handlers to be specified at construction time.
Moves ListGroups and GetMetadata methods from the Producer and Consumer classes to AdminClient.
ListGroupsGetMetadataAdminClient
Moves SyncOverAsync functionality to the Confluent.Kafka.SyncOverAsync namespace.
Confluent.Kafka.SyncOverAsync
Replaces ISerializer interface with Serializer delegate.
ISerializerSerializer
Replaces IDeserializer interface with Deserializer delegate.
IDeserializerDeserializer
Replaces SetRebalanceHandler with SetPartitionsAssignedHandler and SetPartitionsRevokedHandler.
SetRebalanceHandlerSetPartitionsAssignedHandlerSetPartitionsRevokedHandler
Prohibits calling Assign or Unassign inside the rebalance handlers.
AssignUnassign
Moves GetWatermarkOffsets and QueryWatermarkOffsets from the admin client to the consumer.
GetWatermarkOffsetsQueryWatermarkOffsets
Provides context to serdes via a SerializationContext class instance.
SerializationContext
Builder classes now return interfaces instead of concrete classes.
Makes the AdminClient, Producer, and Consumer classes internal.
AdminClientProducerConsumer
Security4
Upgrades Newtonsoft.Json to 13.0.1 to address a security vulnerability in 9.0.1.
Newtonsoft.Json
Upgrades Google.Protobuf dependency to 3.15.0 to address CVE-2021-22570.
Google.Protobuf
Upgrades bundled zlib from 1.2.8 to 1.2.11 in librdkafka.redist, fixing CVE-2016-9840 through CVE-2016-9843.
Updates the System.Net.Http dependency to v4.3.4 to address CVE-2018-8292.
System.Net.Http
Deprecated3
Marks ConsumeResult properties that delegate to ConsumeResult.Message properties as obsolete.
ConsumeResultConsumeResult.Message
Deprecates SchemaRegistryConfig properties with the superfluous SchemaRegistry prefix and adds corresponding unprefixed properties.
SchemaRegistryConfig
Marks DependentProducerBuilder as API-SUBJECT-TO-CHANGE.
DependentProducerBuilder