Table of Contents

Class KEFCoreSingletonOptions

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 class KEFCoreSingletonOptions : IKEFCoreSingletonOptions, ISingletonOptions
Inheritance
KEFCoreSingletonOptions
Implements
Inherited Members
Extension Methods

Properties

ApplicationId

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

public virtual 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

public virtual string? BootstrapServers { get; }

Property Value

string

ConsumerConfig

[Obsolete("Option will be removed soon")]
public virtual ConsumerConfigBuilder? ConsumerConfig { get; }

Property Value

ConsumerConfigBuilder

DefaultNumPartitions

Default number of partitions associated to each topic

public virtual int DefaultNumPartitions { get; }

Property Value

int

DefaultReplicationFactor

Default replication factor associated to each topic

public virtual int DefaultReplicationFactor { get; }

Property Value

int

KeySerDesSelectorType

The optional Type to use for key serialization selection

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

public virtual Type? KeySerDesSelectorType { get; }

Property Value

Type

ProducerConfig

The optional ProducerConfigBuilder

public virtual ProducerConfigBuilder? ProducerConfig { get; }

Property Value

ProducerConfigBuilder

SaslConfig

SASL configuration applied to all Kafka clients (producer, streams). When set, it is merged into ProducerConfig and StreamsConfig at connection time via WithSaslConfigs(SaslConfigsBuilder).

public virtual SaslConfigsBuilder? SaslConfig { get; }

Property Value

SaslConfigsBuilder

SecurityProtocol

SecurityProtocol configuration applied to all Kafka clients (producer, streams). When set, it is merged into ProducerConfig and StreamsConfig at connection time via WithSecurityProtocol(string).

public virtual SecurityProtocol? SecurityProtocol { get; }

Property Value

SecurityProtocol

SslConfig

SSL configuration applied to all Kafka clients (producer, streams). When set, it is merged into ProducerConfig and StreamsConfig at connection time via WithSslConfigs(SslConfigsBuilder).

public virtual SslConfigsBuilder? SslConfig { get; }

Property Value

SslConfigsBuilder

StreamsConfig

The optional StreamsConfig used when UseCompactedReplicator is false

public virtual StreamsConfigBuilder? StreamsConfig { get; }

Property Value

StreamsConfigBuilder

TopicConfig

The optional TopicConfigBuilder used when topics shall be created

public virtual TopicConfigBuilder? TopicConfig { get; }

Property Value

TopicConfigBuilder

UseCompactedReplicator

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

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

Property Value

bool

UseDeletePolicyForTopic

Use delete cleanup policy when a topic is created

public virtual bool UseDeletePolicyForTopic { get; }

Property Value

bool

UseKNetStreams

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

public virtual bool UseKNetStreams { get; }

Property Value

bool

UseKeyByteBufferDataTransfer

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

public virtual bool UseKeyByteBufferDataTransfer { get; }

Property Value

bool

UsePersistentStorage

Use persistent storage when Apache Kafka� Streams is in use

public virtual bool UsePersistentStorage { get; }

Property Value

bool

UseValueContainerByteBufferDataTransfer

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

public virtual bool UseValueContainerByteBufferDataTransfer { 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>

public virtual 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>

public virtual Type? ValueSerDesSelectorType { get; }

Property Value

Type

Methods

Initialize(IDbContextOptions)

Initializes the singleton options from the given IDbContextOptions.

public virtual void Initialize(IDbContextOptions options)

Parameters

options IDbContextOptions

Validate(IDbContextOptions)

Validates that the options in given IDbContextOptions have not changed when compared to the options already set here, and throws if they have.

public virtual void Validate(IDbContextOptions options)

Parameters

options IDbContextOptions