Show / Hide Table of Contents

    Interface IConsumerEndpointBuilder<TBuilder>

    Builds the ConsumerEndpoint.

    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 IConsumerEndpointBuilder<out TBuilder> : IEndpointBuilder<TBuilder> where TBuilder : IConsumerEndpointBuilder<out TBuilder>
    Type Parameters
    Name Description
    TBuilder

    The actual builder type.

    Methods

    | Improve this doc View source

    Decrypt(EncryptionSettings)

    Specifies the EncryptionSettings to be used to decrypt the messages.

    Declaration
    TBuilder Decrypt(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

    DeserializeUsing(IMessageSerializer)

    Specifies the IMessageSerializer to be used to deserialize the messages.

    Declaration
    TBuilder DeserializeUsing(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

    EnableBatchProcessing(int, TimeSpan?)

    Enables batch processing.

    Declaration
    TBuilder EnableBatchProcessing(int batchSize, TimeSpan? maxWaitTime = null)
    Parameters
    Type Name Description
    int batchSize

    The number of messages to be processed in batch.

    TimeSpan? maxWaitTime

    The maximum amount of time to wait for the batch to be filled. After this time the batch will be completed even if the specified batchSize is not reached.

    Returns
    Type Description
    TBuilder

    The endpoint builder so that additional calls can be chained.

    | Improve this doc View source

    EnsureExactlyOnce(IExactlyOnceStrategy)

    Specifies the strategy to be used to ensure that each message is processed exactly once.

    Declaration
    TBuilder EnsureExactlyOnce(IExactlyOnceStrategy strategy)
    Parameters
    Type Name Description
    IExactlyOnceStrategy strategy

    The IExactlyOnceStrategy.

    Returns
    Type Description
    TBuilder

    The endpoint builder so that additional calls can be chained.

    | Improve this doc View source

    EnsureExactlyOnce(Action<IExactlyOnceStrategyBuilder>)

    Specifies the strategy to be used to ensure that each message is processed exactly once.

    Declaration
    TBuilder EnsureExactlyOnce(Action<IExactlyOnceStrategyBuilder> strategyBuilderAction)
    Parameters
    Type Name Description
    Action<IExactlyOnceStrategyBuilder> strategyBuilderAction

    An Action<T> that takes the IExactlyOnceStrategyBuilder and configures it.

    Returns
    Type Description
    TBuilder

    The endpoint builder so that additional calls can be chained.

    | Improve this doc View source

    HandleTombstoneMessages()

    Specifies that the null messages have to be mapped to a Tombstone<TMessage> ( Tombstone). This is the default behavior, use the UseLegacyNullMessageHandling() or SkipNullMessages() methods to change it.

    Declaration
    TBuilder HandleTombstoneMessages()
    Returns
    Type Description
    TBuilder

    The endpoint builder so that additional calls can be chained.

    | Improve this doc View source

    IgnoreUnhandledMessages()

    Specifies that the message has to be silently ignored if no subscriber is handling it.

    Declaration
    TBuilder IgnoreUnhandledMessages()
    Returns
    Type Description
    TBuilder

    The endpoint builder so that additional calls can be chained.

    | Improve this doc View source

    OnError(IErrorPolicy)

    Specifies the error policy to be applied when an exception occurs during the processing of the consumed messages.

    Declaration
    TBuilder OnError(IErrorPolicy errorPolicy)
    Parameters
    Type Name Description
    IErrorPolicy errorPolicy

    The IErrorPolicy.

    Returns
    Type Description
    TBuilder

    The endpoint builder so that additional calls can be chained.

    | Improve this doc View source

    OnError(Action<IErrorPolicyBuilder>)

    Specifies the error policy to be applied when an exception occurs during the processing of the consumed messages.

    Declaration
    TBuilder OnError(Action<IErrorPolicyBuilder> errorPolicyBuilderAction)
    Parameters
    Type Name Description
    Action<IErrorPolicyBuilder> errorPolicyBuilderAction

    An Action<T> that takes the IErrorPolicyBuilder and configures it.

    Returns
    Type Description
    TBuilder

    The endpoint builder so that additional calls can be chained.

    | Improve this doc View source

    SkipNullMessages()

    Specifies that the null messages have to be silently skipped ( Skip).

    Declaration
    TBuilder SkipNullMessages()
    Returns
    Type Description
    TBuilder

    The endpoint builder so that additional calls can be chained.

    | Improve this doc View source

    ThrowIfUnhandled()

    Specifies that an exception must be thrown if no subscriber is handling the received message. This option is enabled by default. Use the IgnoreUnhandledMessages() to disable it.

    Declaration
    TBuilder ThrowIfUnhandled()
    Returns
    Type Description
    TBuilder

    The endpoint builder so that additional calls can be chained.

    | Improve this doc View source

    UseLegacyNullMessageHandling()

    Specifies that the null messages have to be forwarded as null ( Legacy).

    Declaration
    TBuilder UseLegacyNullMessageHandling()
    Returns
    Type Description
    TBuilder

    The endpoint builder so that additional calls can be chained.

    | Improve this doc View source

    WithSequenceTimeout(TimeSpan)

    Sets the timeout after which an incomplete sequence that isn't pushed with new messages will be aborted and discarded. The default is a conservative 30 minutes.

    Declaration
    TBuilder WithSequenceTimeout(TimeSpan timeout)
    Parameters
    Type Name Description
    TimeSpan timeout

    The timeout.

    Returns
    Type Description
    TBuilder

    The endpoint builder so that additional calls can be chained.

    Remarks

    This setting is ignored for batches (BatchSequence), use the maxWaitTime parameter of EnableBatchProcessing(int, TimeSpan?) instead.

    Extension Methods

    ConsumerEndpointBuilderConsumeBinaryFilesExtensions.ConsumeBinaryFiles<TBuilder>(IConsumerEndpointBuilder<TBuilder>, Action<IBinaryFileMessageSerializerBuilder>?)
    ConsumerEndpointBuilderDecryptUsingExtensions.DecryptUsingAes<TBuilder>(IConsumerEndpointBuilder<TBuilder>, byte[], byte[]?)
    ConsumerEndpointBuilderDecryptUsingExtensions.DecryptUsingAes<TBuilder>(IConsumerEndpointBuilder<TBuilder>, Func<string?, byte[]>, byte[]?)
    ConsumerEndpointBuilderDeserializeJsonExtensions.DeserializeJson<TBuilder>(IConsumerEndpointBuilder<TBuilder>, Action<IJsonMessageSerializerBuilder>?)
    ConsumerEndpointBuilderDeserializeJsonUsingNewtonsoftExtensions.DeserializeJsonUsingNewtonsoft<TBuilder>(IConsumerEndpointBuilder<TBuilder>, Action<INewtonsoftJsonMessageSerializerBuilder>?)
    • Improve this doc
    • View source
    GitHub E-Mail
    ↑ Back to top © 2020 Sergio Aquilini