Table of Contents

Method AddSchemaRegistryAvroSharpDeserializer

Namespace
AvroSharp.KafkaFlow
Assembly
AvroSharp.KafkaFlow.dll

AddSchemaRegistryAvroSharpDeserializer<TMessage>(IConsumerMiddlewareConfigurationBuilder, AvroSharpDeserializerConfig?)

Reads each consumed message as TMessage, whatever version of its schema wrote it.

public static IConsumerMiddlewareConfigurationBuilder AddSchemaRegistryAvroSharpDeserializer<TMessage>(this IConsumerMiddlewareConfigurationBuilder middlewares, AvroSharpDeserializerConfig? config = null)

Parameters

middlewares IConsumerMiddlewareConfigurationBuilder

The consumer's middlewares.

config AvroSharpDeserializerConfig

The settings, or null for the defaults.

Returns

IConsumerMiddlewareConfigurationBuilder

Type Parameters

TMessage

The message type, which AvroTypes knows.

Exceptions

InvalidOperationException

TMessage is not a type AvroTypes knows.

AddSchemaRegistryAvroSharpDeserializer(IConsumerMiddlewareConfigurationBuilder, IEnumerable<Type>, AvroSharpDeserializerConfig?)

Reads each consumed message as the one of messageTypes whose record its writer's schema is, for topics with several record types (AvroSharpMessageTypeResolver).

public static IConsumerMiddlewareConfigurationBuilder AddSchemaRegistryAvroSharpDeserializer(this IConsumerMiddlewareConfigurationBuilder middlewares, IEnumerable<Type> messageTypes, AvroSharpDeserializerConfig? config = null)

Parameters

middlewares IConsumerMiddlewareConfigurationBuilder

The consumer's middlewares.

messageTypes IEnumerable<Type>

The message types, which AvroTypes knows, each of a record schema.

config AvroSharpDeserializerConfig

The settings, or null for the defaults.

Returns

IConsumerMiddlewareConfigurationBuilder

Exceptions

ArgumentException

No types are given, a type's schema isn't a record, or two types have records of the same name.

InvalidOperationException

A type is not one AvroTypes knows.