Class ProducerEndpointBuilderSerializeAsAvroExtensions
Adds the SerializeAsAvro
method to the ProducerEndpoint.
Inherited Members
Namespace: Silverback.Messaging.Configuration
Assembly: Silverback.Integration.Kafka.SchemaRegistry.dll
Syntax
public static class ProducerEndpointBuilderSerializeAsAvroExtensions
Methods
| Improve this doc View sourceSerializeAsAvro<TBuilder>(IProducerEndpointBuilder<TBuilder>, Action<IAvroMessageSerializerBuilder>?)
Sets the serializer to an instance of AvroMessageSerializer<TMessage> to serialize the produced messages as Avro.
Declaration
public static TBuilder SerializeAsAvro<TBuilder>(this IProducerEndpointBuilder<TBuilder> endpointBuilder, Action<IAvroMessageSerializerBuilder>? serializerBuilderAction = null) where TBuilder : IProducerEndpointBuilder<TBuilder>
Parameters
Type | Name | Description |
---|---|---|
IProducerEndpointBuilder<TBuilder> | endpointBuilder | The endpoint builder. |
Action<IAvroMessageSerializerBuilder> | serializerBuilderAction | An optional Action<T> that takes the IAvroMessageSerializerBuilder and configures it. |
Returns
Type | Description |
---|---|
TBuilder | The endpoint builder so that additional calls can be chained. |
Type Parameters
Name | Description |
---|---|
TBuilder | The actual builder type. |