Class AvroMessageSerializerBuilder
Builds the AvroMessageSerializer<TMessage>.
Implements
Inherited Members
Namespace: Silverback.Messaging.Configuration
Assembly: Silverback.Integration.Kafka.SchemaRegistry.dll
Syntax
public class AvroMessageSerializerBuilder : IAvroMessageSerializerBuilder
Methods
| Improve this doc View sourceBuild()
Builds the IMessageSerializer instance.
Declaration
public IMessageSerializer Build()
Returns
Type | Description |
---|---|
IMessageSerializer | The IMessageSerializer. |
Configure(Action<SchemaRegistryConfig>, Action<AvroSerializerConfig>?)
Configures the Confluent.SchemaRegistry.SchemaRegistryConfig and the Confluent.SchemaRegistry.Serdes.AvroSerializerConfig.
Declaration
public IAvroMessageSerializerBuilder Configure(Action<SchemaRegistryConfig> configureSchemaRegistryAction, Action<AvroSerializerConfig>? configureSerializerAction = null)
Parameters
Type | Name | Description |
---|---|---|
Action<SchemaRegistryConfig> | configureSchemaRegistryAction | An Action<T> that takes the Confluent.SchemaRegistry.SchemaRegistryConfig and configures it. |
Action<AvroSerializerConfig> | configureSerializerAction | An Action<T> that takes the Confluent.SchemaRegistry.Serdes.AvroSerializerConfig and configures it. |
Returns
Type | Description |
---|---|
IAvroMessageSerializerBuilder | The IAvroMessageSerializerBuilder so that additional calls can be chained. |
UseType(Type)
Specifies the message type.
Declaration
public IAvroMessageSerializerBuilder UseType(Type messageType)
Parameters
Type | Name | Description |
---|---|---|
Type | messageType | The type of the message to serialize or deserialize. |
Returns
Type | Description |
---|---|
IAvroMessageSerializerBuilder | The IAvroMessageSerializerBuilder so that additional calls can be chained. |
UseType<TMessage>()
Specifies the message type.
Declaration
public IAvroMessageSerializerBuilder UseType<TMessage>() where TMessage : class
Returns
Type | Description |
---|---|
IAvroMessageSerializerBuilder | The IAvroMessageSerializerBuilder so that additional calls can be chained. |
Type Parameters
Name | Description |
---|---|
TMessage | The type of the message to serialize or deserialize. |