SolTechnology.Avro.Kafka
4.0.0
dotnet add package SolTechnology.Avro.Kafka --version 4.0.0
NuGet\Install-Package SolTechnology.Avro.Kafka -Version 4.0.0
<PackageReference Include="SolTechnology.Avro.Kafka" Version="4.0.0" />
<PackageVersion Include="SolTechnology.Avro.Kafka" Version="4.0.0" />
<PackageReference Include="SolTechnology.Avro.Kafka" />
paket add SolTechnology.Avro.Kafka --version 4.0.0
#r "nuget: SolTechnology.Avro.Kafka, 4.0.0"
#:package SolTechnology.Avro.Kafka@4.0.0
#addin nuget:?package=SolTechnology.Avro.Kafka&version=4.0.0
#tool nuget:?package=SolTechnology.Avro.Kafka&version=4.0.0
SolTechnology.Avro.Kafka
Confluent Kafka serializers for plain C# classes, built on AvroConvert. There is no code generation and no ISpecificRecord. Messages use the Confluent Schema Registry wire format, so the Confluent serializers of Java, Python, Go and .NET read and write them.
dotnet add package SolTechnology.Avro.Kafka
With Schema Registry
using var schemaRegistry = new CachedSchemaRegistryClient(new SchemaRegistryConfig { Url = "http://localhost:8081" });
using var producer = new ProducerBuilder<string, Order>(producerConfig)
.SetAvroValueSerializer(schemaRegistry) // registers the schema of Order under "{topic}-value"
.Build();
using var consumer = new ConsumerBuilder<string, Order>(consumerConfig)
.SetAvroValueDeserializer(schemaRegistry) // writer schema from the registry, resolved against Order
.Build();
- Registry handling: subject name strategies (
Topic,Record,TopicRecord), auto-registration, use latest version / schema id, and the schema id in the prefix or in a message header. All of this comes from Confluent.SchemaRegistry. - Schemas: schema evolution, and schema references (types shared through their own subjects).
- Messages: tombstones (null values) in both directions, and keys through
SetAvroKeySerializer/SetAvroKeyDeserializer. - Options:
AvroConvertOptions(naming policy, converters) throughAvroConvertSerializerConfig/AvroConvertDeserializerConfig. - Not supported: Confluent data contract rules (migration rules, field-level encryption). If your schemas carry rules, they are not executed.
Without a registry
Plain headless Avro, with the schema agreed out of band:
.SetAvroValueSerializer(AvroSchema.Create<Order>())
.SetAvroValueDeserializer(writerSchema: AvroSchema.Parse(schemaJson))
Links
- Documentation
- Sample with Kafka and Schema Registry in Docker
- Kafka message decoder: magic byte, schema id and payload in your browser
Licence
Free for noncommercial use and for companies under 100 people and USD 1M revenue (PolyForm Noncommercial / Small Business). Other organisations need a commercial licence: soltechnology.dev/avroconvert. See LICENSE.md in the package.
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net10.0 is compatible. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
-
net10.0
- AvroConvert (>= 4.0.0)
- Confluent.Kafka (>= 2.16.0)
- Confluent.SchemaRegistry (>= 2.16.0)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 4.0.0 | 49 | 11/11/2026 |
| 4.0.0-preview.4 | 60 | 11/2/2026 |
| 4.0.0-preview.3 | 56 | 10/28/2026 |
| 4.0.0-preview.2 | 64 | 10/25/2026 |
| 4.0.0-preview.1 | 66 | 10/24/2026 |
| 0.1.0 | 26,615 | 6/9/2020 |