Show / Hide Table of Contents

    Interface IProducerEndpointBuilder<TBuilder>

    Builds the ProducerEndpoint.

    Inherited Members
    IEndpointBuilder<TBuilder>.MessageType
    IEndpointBuilder<TBuilder>.WithName(string)
    IEndpointBuilder<TBuilder>.UseSerializer(IMessageSerializer)
    IEndpointBuilder<TBuilder>.WithEncryption(EncryptionSettings)
    IEndpointBuilder<TBuilder>.ValidateMessage(bool)
    IEndpointBuilder<TBuilder>.DisableMessageValidation()
    Namespace: Silverback.Messaging.Configuration
    Assembly: Silverback.Integration.dll
    Syntax
    public interface IProducerEndpointBuilder<out TBuilder> : IEndpointBuilder<TBuilder> where TBuilder : IProducerEndpointBuilder<out TBuilder>
    Type Parameters
    Name Description
    TBuilder

    The actual builder type.

    Methods

    | Improve this doc View source

    AddHeader(string, object?)

    Adds the specified header to all produced messages.

    Declaration
    TBuilder AddHeader(string name, object? value)
    Parameters
    Type Name Description
    string name

    The header name.

    object value

    The header value.

    Returns
    Type Description
    TBuilder

    The endpoint builder so that additional calls can be chained.

    | Improve this doc View source

    AddHeader<TMessage>(string, Func<IOutboundEnvelope<TMessage>, object?>)

    Adds the specified header to all produced messages of the specified type, using a value provider function to determine the header value for each message.

    Declaration
    TBuilder AddHeader<TMessage>(string name, Func<IOutboundEnvelope<TMessage>, object?> valueProvider) where TMessage : class
    Parameters
    Type Name Description
    string name

    The header name.

    Func<IOutboundEnvelope<TMessage>, object> valueProvider

    The value provider function.

    Returns
    Type Description
    TBuilder

    The endpoint builder so that additional calls can be chained.

    Type Parameters
    Name Description
    TMessage

    The type of the messages to be enriched with this header.

    | Improve this doc View source

    AddHeader<TMessage>(string, object?)

    Adds the specified header to all produced messages of the specified type.

    Declaration
    TBuilder AddHeader<TMessage>(string name, object? value) where TMessage : class
    Parameters
    Type Name Description
    string name

    The header name.

    object value

    The header value.

    Returns
    Type Description
    TBuilder

    The endpoint builder so that additional calls can be chained.

    Type Parameters
    Name Description
    TMessage

    The type of the messages to be enriched with this header.

    | Improve this doc View source

    EnableChunking(int, bool)

    Enables chunking, splitting the larger messages into smaller chunks.

    Declaration
    TBuilder EnableChunking(int chunkSize, bool alwaysAddHeaders = true)
    Parameters
    Type Name Description
    int chunkSize

    The maximum chunk size in bytes.

    bool alwaysAddHeaders

    A value indicating whether the x-chunk-index and related headers have to be added to the produced message in any case, even if its size doesn't exceed the single chunk size. The default is true.

    Returns
    Type Description
    TBuilder

    The endpoint builder so that additional calls can be chained.

    | Improve this doc View source

    Encrypt(EncryptionSettings)

    Specifies the EncryptionSettings to be used to encrypt the messages.

    Declaration
    TBuilder Encrypt(EncryptionSettings encryptionSettings)
    Parameters
    Type Name Description
    EncryptionSettings encryptionSettings

    The EncryptionSettings.

    Returns
    Type Description
    TBuilder

    The endpoint builder so that additional calls can be chained.

    | Improve this doc View source

    ProduceDirectly()

    Specifies that the Silverback.Messaging.Outbound.DefaultProduceStrategy has to be used, producing directly to the message broker.

    Declaration
    TBuilder ProduceDirectly()
    Returns
    Type Description
    TBuilder

    The endpoint builder so that additional calls can be chained.

    | Improve this doc View source

    ProduceToOutbox()

    Specifies that theOutboxProduceStrategy has to be used, storing the messages into the transactional outbox table. The operation is therefore included in the database transaction applying the message side effects to the local database. The IOutboxWorker takes care of asynchronously sending the messages to the message broker.

    Declaration
    TBuilder ProduceToOutbox()
    Returns
    Type Description
    TBuilder

    The endpoint builder so that additional calls can be chained.

    | Improve this doc View source

    SerializeUsing(IMessageSerializer)

    Specifies the IMessageSerializer to be used to serialize the messages.

    Declaration
    TBuilder SerializeUsing(IMessageSerializer serializer)
    Parameters
    Type Name Description
    IMessageSerializer serializer

    The IMessageSerializer.

    Returns
    Type Description
    TBuilder

    The endpoint builder so that additional calls can be chained.

    | Improve this doc View source

    UseStrategy(IProduceStrategy)

    Specifies the strategy to be used to produce the messages.

    Declaration
    TBuilder UseStrategy(IProduceStrategy strategy)
    Parameters
    Type Name Description
    IProduceStrategy strategy

    The IProduceStrategy.

    Returns
    Type Description
    TBuilder

    The endpoint builder so that additional calls can be chained.

    | Improve this doc View source

    WithMessageId<TMessage>(Func<IOutboundEnvelope<TMessage>, object?>)

    Uses the specified value provider function to set the message id header for each produced message.

    Declaration
    TBuilder WithMessageId<TMessage>(Func<IOutboundEnvelope<TMessage>, object?> valueProvider) where TMessage : class
    Parameters
    Type Name Description
    Func<IOutboundEnvelope<TMessage>, object> valueProvider

    The value provider function.

    Returns
    Type Description
    TBuilder

    The endpoint builder so that additional calls can be chained.

    Type Parameters
    Name Description
    TMessage

    The type of the messages to be enriched with this header.

    Extension Methods

    ProducerEndpointBuilderEncryptUsingExtensions.EncryptUsingAes<TBuilder>(IProducerEndpointBuilder<TBuilder>, byte[], byte[]?)
    ProducerEndpointBuilderEncryptUsingExtensions.EncryptUsingAes<TBuilder>(IProducerEndpointBuilder<TBuilder>, byte[], string, byte[]?)
    ProducerEndpointBuilderProduceBinaryFilesExtensions.ProduceBinaryFiles<TBuilder>(IProducerEndpointBuilder<TBuilder>, Action<IBinaryFileMessageSerializerBuilder>?)
    ProducerEndpointBuilderSerializeAsJsonExtensions.SerializeAsJson<TBuilder>(IProducerEndpointBuilder<TBuilder>, Action<IJsonMessageSerializerBuilder>?)
    ProducerEndpointBuilderSerializeAsJsonUsingNewtonsoftExtensions.SerializeAsJsonUsingNewtonsoft<TBuilder>(IProducerEndpointBuilder<TBuilder>, Action<INewtonsoftJsonMessageSerializerBuilder>?)
    • Improve this doc
    • View source
    GitHub E-Mail
    ↑ Back to top © 2020 Sergio Aquilini