Table of Contents

Interface IKEFCoreSingletonOptions

Namespace
MASES.EntityFrameworkCore.KNet.Infrastructure.Internal
Assembly
MASES.EntityFrameworkCore.KNet.dll

This is an internal API that supports the Entity Framework Core infrastructure and not subject to the same compatibility standards as public APIs. It may be changed or removed without notice in any release. You should only use it directly in your code with extreme caution and knowing that doing so can result in application failures when updating to a new Entity Framework Core release.

public interface IKEFCoreSingletonOptions : ISingletonOptions
Inherited Members
Extension Methods

Properties

ApplicationId

The application id associated to the application in use, shall be set if UseCompactedReplicator is false

string? ApplicationId { get; }

Property Value

string

Remarks

Choose the value carefully: upon restart its value is used to identify information on Apache Kafka™ cluster of previous running application. If UseGlobalTable is false the partitions associated to each topic are shared across all instances with the same ApplicationId so be carefull to avoid other application consumes the data from Apache Kafka™ cluster and local stores does not contains the expected information.

BootstrapServers

The bootstrap servers of the Apache Kafka™ cluster

string? BootstrapServers { get; }

Property Value

string

ConsumerConfig

ConsumerConfigBuilder? ConsumerConfig { get; }

Property Value

ConsumerConfigBuilder

DefaultConsumerInstances

Default consumr instances used in conjunction with UseCompactedReplicator

int? DefaultConsumerInstances { get; }

Property Value

int?

DefaultNumPartitions

Default number of partitions associated to each topic

int DefaultNumPartitions { get; }

Property Value

int

DefaultReplicationFactor

Default replication factor associated to each topic

int DefaultReplicationFactor { get; }

Property Value

int

DefaultSynchronizationTimeout

The default timeout, expressed in milliseconds, KEFCore will wait for backend to be in-sync with Apache Kafka™ cluster. Setting DefaultSynchronizationTimeout to 0 the synchronization will be disabled

long DefaultSynchronizationTimeout { get; }

Property Value

long

Remarks

The KEFCore provider try to synchronize with Apache Kafka™ cluster waiting at least DefaultSynchronizationTimeout when EnsureCreated() of Database is invoked.

KeySerDesSelectorType

The optional Type to use for key serialization selection

Default value is DefaultKEFCoreSerDes.Key<T>, any custom Type shall implement ISerDesSelector<T>

Type? KeySerDesSelectorType { get; }

Property Value

Type

ManageEvents

Setting this property to true the engine will emit events on ChangeTracker, default is true

bool ManageEvents { get; }

Property Value

bool

ProducerConfig

The optional ProducerConfigBuilder

ProducerConfigBuilder? ProducerConfig { get; }

Property Value

ProducerConfigBuilder

ReadOnlyMode

Setting this property to true if the engine shall reject any write operation, its value will be used to verify if topics has the proper rights WRITE and READ

bool ReadOnlyMode { get; }

Property Value

bool

StreamsConfig

The optional StreamsConfig used when UseCompactedReplicator is false

StreamsConfigBuilder? StreamsConfig { get; }

Property Value

StreamsConfigBuilder

TopicConfig

The optional TopicConfigBuilder used when topics shall be created

TopicConfigBuilder? TopicConfig { get; }

Property Value

TopicConfigBuilder

TopicPrefix

Database name means whe prefix of the topics associated to the instance of KEFCoreDbContext

string? TopicPrefix { get; }

Property Value

string

UseByteBufferDataTransfer

Setting this property to true the engine prefers to use ByteBuffer data exchange in serializer instances

bool UseByteBufferDataTransfer { get; }

Property Value

bool

UseCompactedReplicator

Use KNetCompactedReplicator<K, V> instead of Apache Kafka™ Streams

[Obsolete("Option will be removed soon")]
bool UseCompactedReplicator { get; }

Property Value

bool

UseDeletePolicyForTopic

Use delete cleanup policy when a topic is created

bool UseDeletePolicyForTopic { get; }

Property Value

bool

UseEnumeratorWithPrefetch

Setting this property to true the engine prefers to use enumerator instances able to do a prefetch on data speeding up execution

bool UseEnumeratorWithPrefetch { get; }

Property Value

bool

Remarks

Used only if UseCompactedReplicator is false and UseKNetStreams is true, not available in EFCore 6.

UseGlobalTable

Setting this property to true the engine based on Streams (i.e. UseCompactedReplicator is false) will use GlobalKTable<K, V> (GlobalKTable<K, V, TJVMK, TJVMV> if UseKNetStreams is true) instead of KTable<K, V> (KTable<K, V, TJVMK, TJVMV> if UseKNetStreams is true) to manage local storage of information.

bool UseGlobalTable { get; }

Property Value

bool

Remarks

Setting UseGlobalTable to true is in contrast with ManageEvents that needs UseCompactedReplicator=true or a backend based on KTable<K, V> (KTable<K, V, TJVMK, TJVMV> if UseKNetStreams is true) The behavior can be changed if the application based on KEFCore does not needs events (ManageEvents=true) and/or there is a limitation using KTable<K, V> (KTable<K, V, TJVMK, TJVMV> if UseKNetStreams is true) coming from other configuration parameters like ApplicationId: using the same ApplicationId across the same cluster, the partitions of KTable<K, V> (KTable<K, V, TJVMK, TJVMV> if UseKNetStreams is true) are managed from multiple instances.

UseKNetStreams

Use KNet version of Apache Kafka™ Streams instead of standard Apache Kafka™ Streams

bool UseKNetStreams { get; }

Property Value

bool

UsePersistentStorage

Use persistent storage when Apache Kafka™ Streams is in use

bool UsePersistentStorage { get; }

Property Value

bool

ValueContainerType

The optional Type to use as value container

Default value is DefaultValueContainer<TKey>, any custom Type shall implement IValueContainer<T>

Type? ValueContainerType { get; }

Property Value

Type

ValueSerDesSelectorType

The optional Type to use for value serialization selection

Default value is DefaultKEFCoreSerDes.ValueContainer<T>, any custom Type shall implement ISerDesSelector<T>

Type? ValueSerDesSelectorType { get; }

Property Value

Type