Class AvroSharpKafkaFlowExtensions
Adds AvroSharp's Confluent Schema Registry serializer and deserializers to KafkaFlow producers and consumers, in
place of KafkaFlow's AddSchemaRegistryAvroSerializer and AddSchemaRegistryAvroDeserializer. The
registry is the one set with KafkaFlow's WithSchemaRegistry on the cluster.
public static class AvroSharpKafkaFlowExtensions
- Inheritance
-
AvroSharpKafkaFlowExtensions
- Inherited Members
Methods
- AddSchemaRegistryAvroSharpDeserializer(IConsumerMiddlewareConfigurationBuilder, IEnumerable<Type>, AvroSharpDeserializerConfig?)
Reads each consumed message as the one of
messageTypeswhose record its writer's schema is, for topics with several record types (AvroSharpMessageTypeResolver).
- AddSchemaRegistryAvroSharpDeserializerByTypeName(IConsumerMiddlewareConfigurationBuilder, AvroSharpDeserializerConfig?)
Reads each consumed message as the type its writer's record names, found by its .NET full name in the loaded assemblies, as KafkaFlow's
AddSchemaRegistryAvroDeserializerdoes. It needs reflection, which AddSchemaRegistryAvroSharpDeserializer(IConsumerMiddlewareConfigurationBuilder, IEnumerable<Type>, AvroSharpDeserializerConfig?), given the message types, doesn't.
- AddSchemaRegistryAvroSharpDeserializer<TMessage>(IConsumerMiddlewareConfigurationBuilder, AvroSharpDeserializerConfig?)
Reads each consumed message as
TMessage, whatever version of its schema wrote it.
- AddSchemaRegistryAvroSharpSerializer(IProducerMiddlewareConfigurationBuilder, AvroSharpSerializerConfig?)
Writes each produced message with AvroSharpKafkaFlowSerializer: of any type AvroTypes knows.