Show / Hide Table of Contents

    Interface IMockedKafkaOptionsBuilder

    Exposes the methods to configure the mocked Kafka.

    Namespace: Silverback.Messaging.Configuration.Kafka
    Assembly: Silverback.Integration.Kafka.Testing.dll
    Syntax
    public interface IMockedKafkaOptionsBuilder

    Methods

    | Improve this doc View source

    DelayPartitionsAssignment(TimeSpan)

    Specifies the delay to be applied before assigning the partitions.

    Declaration
    IMockedKafkaOptionsBuilder DelayPartitionsAssignment(TimeSpan delay)
    Parameters
    Type Name Description
    TimeSpan delay

    The delay to be applied before assigning the partitions.

    Returns
    Type Description
    IMockedKafkaOptionsBuilder

    The IMockedKafkaOptionsBuilder so that additional calls can be chained.

    | Improve this doc View source

    OverrideAutoCommitIntervalMs(int?)

    Specifies the value to be used instead of the default 5 seconds or the configured AutoCommitIntervalMs for the inbound topics. Set it to null to disable the feature. The default is 10 milliseconds.

    Declaration
    IMockedKafkaOptionsBuilder OverrideAutoCommitIntervalMs(int? intervalMs)
    Parameters
    Type Name Description
    int? intervalMs

    The desired auto commit interval in milliseconds.

    Returns
    Type Description
    IMockedKafkaOptionsBuilder

    The IMockedKafkaOptionsBuilder so that additional calls can be chained.

    Remarks

    This is necessary to speed up the tests, since the WaitUntilAllMessagesAreConsumedAsync(TimeSpan?) method waits until the offsets are committed.

    | Improve this doc View source

    WithDefaultPartitionsCount(int)

    Specifies the default number of partitions to be created per each topic. The default is 5.

    Declaration
    IMockedKafkaOptionsBuilder WithDefaultPartitionsCount(int partitionsCount)
    Parameters
    Type Name Description
    int partitionsCount

    The number of partitions.

    Returns
    Type Description
    IMockedKafkaOptionsBuilder

    The IMockedKafkaOptionsBuilder so that additional calls can be chained.

    | Improve this doc View source

    WithPartitionsCount(string, int)

    Specify the default number of partitions to be created for the topic.

    Declaration
    IMockedKafkaOptionsBuilder WithPartitionsCount(string topicName, int partitionsCount)
    Parameters
    Type Name Description
    string topicName

    The name of the topic.

    int partitionsCount

    The number of partitions.

    Returns
    Type Description
    IMockedKafkaOptionsBuilder

    The IMockedKafkaOptionsBuilder so that additional calls can be chained.

    • Improve this doc
    • View source
    GitHub E-Mail
    ↑ Back to top © 2020 Sergio Aquilini