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.
In plain terms
- 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.
Must act 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.
What you must change
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.0Renames ProduceAsync variants with a callback to Produce.
ProduceAsyncProducePartitionEOF notification is now via ConsumeResult, not events, and is disabled by default.
ConsumeResultRenames Confluent.Kafka.Avro to Confluent.SchemaRegistry.Serdes in preparation for additional serialization formats.
Confluent.Kafka.AvroConfluent.SchemaRegistry.SerdesRenames AsyncAvroSerializer to AvroSerializer and AsyncAvroDeserializer to AvroDeserializer.
AsyncAvroSerializerAvroSerializerAsyncAvroDeserializerAvroDeserializerRenames AvroSerializer to AsyncAvroSerializer and AvroDeserializer to AsyncAvroDeserializer.
AvroSerializerAsyncAvroSerializerAvroDeserializerAsyncAvroDeserializerRemoves IAsyncDeserializer setter overloads from the ConsumerBuilder class.
IAsyncDeserializerConsumerBuilderRenames Producer.BeginProduce to Producer.Produce.
Producer.BeginProduceProducer.ProduceRemoves
SerializationContext from non-async serde interfaces.SerializationContextRemoves the Confluent.Kafka.Serdes namespace.
Confluent.Kafka.SerdesRenames the Message.PersistenceStatus property to Message.Status.
Message.PersistenceStatusMessage.StatusRemoves unused CancellationToken parameters, to be added back when implemented.
CancellationTokenUpdates Protobuf serdes message framing to match Java (zigzag message indices); set UseDeprecatedFormat to true to disable.
ProtobufSerializerProtobufDeserializerUseDeprecatedFormatThe 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.
ListGroupsGetMetadataAdminClientMoves SyncOverAsync functionality to the Confluent.Kafka.SyncOverAsync namespace.
Confluent.Kafka.SyncOverAsyncReplaces
ISerializer interface with Serializer delegate.ISerializerSerializerReplaces
IDeserializer interface with Deserializer delegate.IDeserializerDeserializerReplaces SetRebalanceHandler with SetPartitionsAssignedHandler and SetPartitionsRevokedHandler.
SetRebalanceHandlerSetPartitionsAssignedHandlerSetPartitionsRevokedHandlerProhibits calling Assign or Unassign inside the rebalance handlers.
AssignUnassignMoves GetWatermarkOffsets and QueryWatermarkOffsets from the admin client to the consumer.
GetWatermarkOffsetsQueryWatermarkOffsetsProvides context to serdes via a SerializationContext class instance.
SerializationContextBuilder classes now return interfaces instead of concrete classes.
Makes the AdminClient, Producer, and Consumer classes internal.
AdminClientProducerConsumerSecurity4
Upgrades Newtonsoft.Json to 13.0.1 to address a security vulnerability in 9.0.1.
Newtonsoft.JsonUpgrades Google.Protobuf dependency to 3.15.0 to address CVE-2021-22570.
Google.ProtobufUpgrades 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.HttpDeprecations to plan for
Deprecated3
Marks ConsumeResult properties that delegate to ConsumeResult.Message properties as obsolete.
ConsumeResultConsumeResult.MessageDeprecates SchemaRegistryConfig properties with the superfluous SchemaRegistry prefix and adds corresponding unprefixed properties.
SchemaRegistryConfigMarks DependentProducerBuilder as API-SUBJECT-TO-CHANGE.
DependentProducerBuilder