Show / Hide Table of Contents

    Class SchemaRegistryMessageDeserializer<TMessage>

    Connects to the specified schema registry and deserializes the messages.

    Inheritance
    object
    SchemaRegistryMessageDeserializer<TMessage>
    AvroMessageDeserializer<TMessage>
    JsonSchemaRegistryMessageDeserializer<TMessage>
    ProtobufMessageDeserializer<TMessage>
    Implements
    IMessageDeserializer
    Inherited Members
    object.GetType()
    object.MemberwiseClone()
    object.ToString()
    object.Equals(object)
    object.Equals(object, object)
    object.ReferenceEquals(object, object)
    object.GetHashCode()
    Namespace: Silverback.Messaging.Serialization
    Assembly: Silverback.Integration.Kafka.SchemaRegistry.dll
    Syntax
    public abstract class SchemaRegistryMessageDeserializer<TMessage> : IMessageDeserializer where TMessage : class
    Type Parameters
    Name Description
    TMessage

    The type of the messages to be deserialized.

    Constructors

    SchemaRegistryMessageDeserializer(ISchemaRegistryClient, IAsyncDeserializer<TMessage>)

    Initializes a new instance of the SchemaRegistryMessageDeserializer<TMessage> class.

    Declaration
    protected SchemaRegistryMessageDeserializer(ISchemaRegistryClient schemaRegistryClient, IAsyncDeserializer<TMessage> confluentDeserializer)
    Parameters
    Type Name Description
    ISchemaRegistryClient schemaRegistryClient

    The schema registry client.

    IAsyncDeserializer<TMessage> confluentDeserializer

    The Confluent deserializer to be used to deserialize the message.

    Properties

    RequireHeaders

    Gets a value indicating whether this serializer (with the current configuration) needs the headers support to work properly.

    Declaration
    public bool RequireHeaders { get; }
    Property Value
    Type Description
    bool

    SchemaRegistryClient

    Gets the schema registry client.

    Declaration
    public ISchemaRegistryClient SchemaRegistryClient { get; }
    Property Value
    Type Description
    ISchemaRegistryClient

    Methods

    DeserializeAsync(Stream?, MessageHeaderCollection, ConsumerEndpoint)

    Deserializes the byte array into a message object.

    Declaration
    public ValueTask<DeserializedMessage> DeserializeAsync(Stream? messageStream, MessageHeaderCollection headers, ConsumerEndpoint endpoint)
    Parameters
    Type Name Description
    Stream messageStream

    The Stream containing the message to be deserialized.

    MessageHeaderCollection headers

    The message headers collection.

    ConsumerEndpoint endpoint

    The endpoint.

    Returns
    Type Description
    ValueTask<DeserializedMessage>

    A ValueTask<TResult> representing the asynchronous operation. The task result contains the deserialized message (or null when the input is null or empty) and the type of the message.

    GetCompatibleSerializer()

    Gets a new IMessageSerializer compatible with this deserializer.

    Declaration
    public abstract IMessageSerializer GetCompatibleSerializer()
    Returns
    Type Description
    IMessageSerializer

    A new instance of an IMessageSerializer compatible with this deserializer.

    Implements

    IMessageDeserializer
    GitHub E-Mail
    ↑ Back to top © 2026 Sergio Aquilini