Interface IMockedKafkaOptions
- Namespace
- Silverback.Messaging.Configuration.Kafka
- Assembly
- Silverback.Integration.Kafka.Testing.dll
Stores the mocked Kafka configuration.
public interface IMockedKafkaOptions
Properties
DefaultPartitionsCount
Gets or sets the default number of partitions to be created per each topic. The default is 5.
int DefaultPartitionsCount { get; set; }
Property Value
OverriddenAutoCommitIntervalMs
Gets or sets the auto-commit interval in milliseconds to use in mocked consumers instead of
AutoCommitIntervalMs. The override is applied automatically and defaults to 50 milliseconds.
Set it to null to use the consumer's configured interval, or 5 seconds if no interval is configured.
int? OverriddenAutoCommitIntervalMs { get; set; }
Property Value
- int?
Remarks
This override only affects consumers with auto-commit enabled and speeds up tests that wait for broker offset commits. WaitUntilAllMessagesAreConsumedAsync(params string[]) uses locally stored offsets and does not depend on this interval.
PartitionsAssignmentDelay
Gets or sets the delay to be applied before and assigning the partitions.
TimeSpan PartitionsAssignmentDelay { get; set; }
Property Value
TopicPartitionsCount
Gets the number of partitions created for the given topic. If not specified for a topic the DefaultPartitionsCount will be used.
IDictionary<string, int> TopicPartitionsCount { get; }