|
| 1 | +--- |
| 2 | +sidebar_position: 2 |
| 3 | +--- |
| 4 | + |
| 5 | +# From v3 to v4 |
| 6 | + |
| 7 | +KafkaFlow version 4 introduces the latest Confluent.Kafka package and upgrades to .NET 8. This guide will help you navigate the migration process from version 3 to version 4. |
| 8 | + |
| 9 | +## Table of Contents |
| 10 | + |
| 11 | +- [Prerequisites](#prerequisites) |
| 12 | +- [Update package references](#update-package-references) |
| 13 | +- [Breaking Changes / Improvements](#breaking-changes--improvements) |
| 14 | + - [1. Update to .NET 8 with Admin Packages](#1-update-to-net-8-with-admin-packages) |
| 15 | + - [2. Update `Confluent.*` from `2.1.1` to `2.8.0`](#2-update-confluent-from-211-to-280) |
| 16 | +- [Conclusion](#conclusion) |
| 17 | + |
| 18 | +## Prerequisites |
| 19 | + |
| 20 | +As .NET Core 6 has reached the end of support in its lifecycle, we have updated references to Core Packages (`Microsoft.*` and `System.*`) to version 8. |
| 21 | + |
| 22 | +While the KafkaFlow core and most of the extension packages are still targeting `netstandard2.0` which supports a range of runtimes, we recommend with this v4 update to target at least .NET 8 in applications using KafkaFlow. |
| 23 | + |
| 24 | +## Update package references |
| 25 | + |
| 26 | +To update to KafkaFlow v4, change the `Version` related to KafkaFlow packages to the latest v4 available in each project referencing KafkaFlow packages. |
| 27 | + |
| 28 | +``` |
| 29 | +<ItemGroup> |
| 30 | +- <PackageReference Include="KafkaFlow" Version="3.1.0" /> |
| 31 | +- <PackageReference Include="KafkaFlow.Abstractions" Version="3.1.0" /> |
| 32 | +- <PackageReference Include="KafkaFlow.Admin" Version="3.1.0" /> |
| 33 | +- <PackageReference Include="KafkaFlow.Admin.Dashboard" Version="3.1.0" /> |
| 34 | +- <PackageReference Include="KafkaFlow.Admin.WebApi" Version="3.1.0" /> |
| 35 | +- <PackageReference Include="KafkaFlow.Compressor.Gzip" Version="3.1.0" /> |
| 36 | +- <PackageReference Include="KafkaFlow.Extensions.Hosting" Version="3.1.0" /> |
| 37 | +- <PackageReference Include="KafkaFlow.LogHandler.Console" Version="3.1.0" /> |
| 38 | +- <PackageReference Include="KafkaFlow.LogHandler.Microsoft" Version="3.1.0" /> |
| 39 | +- <PackageReference Include="KafkaFlow.Microsoft.DependencyInjection" Version="3.1.0" /> |
| 40 | +- <PackageReference Include="KafkaFlow.OpenTelemetry" Version="3.1.0" /> |
| 41 | +- <PackageReference Include="KafkaFlow.SchemaRegistry" Version="3.1.0" /> |
| 42 | +- <PackageReference Include="KafkaFlow.Serializer.JsonCore" Version="3.1.0" /> |
| 43 | +- <PackageReference Include="KafkaFlow.Serializer.NewtonsoftJson" Version="3.1.0" /> |
| 44 | +- <PackageReference Include="KafkaFlow.Serializer.ProtobufNet" Version="3.1.0" /> |
| 45 | +- <PackageReference Include="KafkaFlow.Serializer.SchemaRegistry.ConfluentAvro" Version="3.1.0" /> |
| 46 | +- <PackageReference Include="KafkaFlow.Serializer.SchemaRegistry.ConfluentJson" Version="3.1.0" /> |
| 47 | +- <PackageReference Include="KafkaFlow.Serializer.SchemaRegistry.ConfluentProtobuf" Version="3.1.0" /> |
| 48 | +- <PackageReference Include="KafkaFlow.Unity" Version="3.1.0" /> |
| 49 | +
|
| 50 | ++ <PackageReference Include="KafkaFlow" Version="4.0.0" /> |
| 51 | ++ <PackageReference Include="KafkaFlow.Abstractions" Version="4.0.0" /> |
| 52 | ++ <PackageReference Include="KafkaFlow.Admin" Version="4.0.0" /> |
| 53 | ++ <PackageReference Include="KafkaFlow.Admin.Dashboard" Version="4.0.0" /> |
| 54 | ++ <PackageReference Include="KafkaFlow.Admin.WebApi" Version="4.0.0" /> |
| 55 | ++ <PackageReference Include="KafkaFlow.Compressor.Gzip" Version="4.0.0" /> |
| 56 | ++ <PackageReference Include="KafkaFlow.Extensions.Hosting" Version="4.0.0" /> |
| 57 | ++ <PackageReference Include="KafkaFlow.LogHandler.Console" Version="4.0.0" /> |
| 58 | ++ <PackageReference Include="KafkaFlow.LogHandler.Microsoft" Version="4.0.0" /> |
| 59 | ++ <PackageReference Include="KafkaFlow.Microsoft.DependencyInjection" Version="4.0.0" /> |
| 60 | ++ <PackageReference Include="KafkaFlow.OpenTelemetry" Version="4.0.0" /> |
| 61 | ++ <PackageReference Include="KafkaFlow.SchemaRegistry" Version="4.0.0" /> |
| 62 | ++ <PackageReference Include="KafkaFlow.Serializer.JsonCore" Version="4.0.0" /> |
| 63 | ++ <PackageReference Include="KafkaFlow.Serializer.NewtonsoftJson" Version="4.0.0" /> |
| 64 | ++ <PackageReference Include="KafkaFlow.Serializer.ProtobufNet" Version="4.0.0" /> |
| 65 | ++ <PackageReference Include="KafkaFlow.Serializer.SchemaRegistry.ConfluentAvro" Version="4.0.0" /> |
| 66 | ++ <PackageReference Include="KafkaFlow.Serializer.SchemaRegistry.ConfluentJson" Version="4.0.0" /> |
| 67 | ++ <PackageReference Include="KafkaFlow.Serializer.SchemaRegistry.ConfluentProtobuf" Version="4.0.0" /> |
| 68 | ++ <PackageReference Include="KafkaFlow.Unity" Version="4.0.0" /> |
| 69 | +</ItemGroup> |
| 70 | +``` |
| 71 | + |
| 72 | +## Breaking Changes / Improvements |
| 73 | + |
| 74 | +The update to v4 introduces some breaking changes. Please consider them when updating KafkaFlow. |
| 75 | + |
| 76 | +### 1. Update to .NET 8 with Admin Packages |
| 77 | + |
| 78 | +> Related Issues: [#612](https://github.com/Farfetch/kafkaflow/issues/612) |
| 79 | +
|
| 80 | +The target frameworks for ASP.NET Admin projects have been updated from `.net6.0` to `.net8.0`. |
| 81 | + |
| 82 | +If you are using the Admin packages (`KafkaFlow.Admin.Dashboard` and `KafkaFlow.Admin.WebApi`), you must target the .NET 8 runtime. |
| 83 | + |
| 84 | +### 2. Update `Confluent.*` from `2.1.1` to `2.8.0` |
| 85 | + |
| 86 | +All `Confluent.*` packages have been updated. No breaking changes are expected, but it is recommended to check the release notes for potential impacts: [Confluent Kafka Release Notes](https://github.com/confluentinc/confluent-kafka-dotnet/releases). |
| 87 | + |
| 88 | +## Conclusion |
| 89 | + |
| 90 | +Please ensure you review and adapt your codebase according to these changes. If you encounter any issues or need assistance, feel free to [reach out](https://github.com/Farfetch/kafkaflow#get-in-touch) to the KafkaFlow community. |
| 91 | + |
| 92 | +Thank you for using KafkaFlow! |
0 commit comments