Table of Contents

Class KafkaSchemaRegistryConfiguration

Namespace
Silverback.Messaging.Configuration.Kafka.SchemaRegistry
Assembly
Silverback.Integration.Kafka.SchemaRegistry.dll

Wraps the Confluent.SchemaRegistry.SchemaRegistryConfig adding the Silverback specific settings.

public sealed record KafkaSchemaRegistryConfiguration : IValidatableSettings, IEquatable<KafkaSchemaRegistryConfiguration>
Inheritance
KafkaSchemaRegistryConfiguration
Implements
Inherited Members

Constructors

KafkaSchemaRegistryConfiguration()

public KafkaSchemaRegistryConfiguration()

Properties

BasicAuthCredentialsSource

Gets the source of the basic authentication credentials. This specifies whether the credentials are specified in the BasicAuthUserInfo or they are inherited from the producer or consumer configuration.

public AuthCredentialsSource? BasicAuthCredentialsSource { get; init; }

Property Value

AuthCredentialsSource?

BasicAuthUserInfo

Gets the basic authentication credentials in the form {username}:{password}.

public string? BasicAuthUserInfo { get; init; }

Property Value

string

BearerAuthClientId

Gets the client ID for the bearer authentication credentials.

public string? BearerAuthClientId { get; init; }

Property Value

string

BearerAuthClientSecret

Gets the client secret for the bearer authentication credentials.

public string? BearerAuthClientSecret { get; init; }

Property Value

string

BearerAuthCredentialsSource

Gets the source of the bearer authentication credentials: a static token (BearerAuthToken), an OAuth client (BearerAuthClientId and BearerAuthClientSecret), the Azure Instance Metadata Service (IMDS) or a custom Confluent.SchemaRegistry.IAuthenticationHeaderValueProvider implementation.

public BearerAuthCredentialsSource? BearerAuthCredentialsSource { get; init; }

Property Value

BearerAuthCredentialsSource?

BearerAuthIdentityPoolId

Gets the identity pool for the bearer authentication credentials.

public string? BearerAuthIdentityPoolId { get; init; }

Property Value

string

BearerAuthLogicalCluster

Gets the logical cluster for the bearer authentication credentials.

public string? BearerAuthLogicalCluster { get; init; }

Property Value

string

BearerAuthScope

Gets the scope for the bearer authentication credentials.

public string? BearerAuthScope { get; init; }

Property Value

string

BearerAuthToken

Gets the bearer authentication token.

public string? BearerAuthToken { get; init; }

Property Value

string

BearerAuthTokenEndpointQuery

Gets the token query parameters for the bearer token endpoint. Currently valid only when using the Azure Instance Metadata Service (IMDS) for token retrieval.

public string? BearerAuthTokenEndpointQuery { get; init; }

Property Value

string

BearerAuthTokenEndpointUrl

Gets the token endpoint for the bearer authentication credentials.

public string? BearerAuthTokenEndpointUrl { get; init; }

Property Value

string

EnableSslCertificateVerification

Gets a value indicating whether the registry (server) certificate must be verified.

public bool? EnableSslCertificateVerification { get; init; }

Property Value

bool?

LatestCacheTtlSecs

Gets the TTL in seconds for caches holding latest schemas, or -1 for no TTL.

public int? LatestCacheTtlSecs { get; init; }

Property Value

int?

MaxCachedSchemas

Gets the maximum number of schemas that are cached by the schema registry client.

public int? MaxCachedSchemas { get; init; }

Property Value

int?

MaxConnectionsPerServer

Gets the maximum number of connections per server.

public int? MaxConnectionsPerServer { get; init; }

Property Value

int?

MaxRetries

Gets the maximum number of retries for a request.

public int? MaxRetries { get; init; }

Property Value

int?

RequestTimeoutMs

Gets the timeout in milliseconds for the requests to the Confluent schema registry.

public int? RequestTimeoutMs { get; init; }

Property Value

int?

RetriesMaxWaitMs

Gets the time to wait for any retry in milliseconds.

public int? RetriesMaxWaitMs { get; init; }

Property Value

int?

RetriesWaitMs

Gets the time to wait for the first retry in milliseconds.

public int? RetriesWaitMs { get; init; }

Property Value

int?

SslCaLocation

Gets the file or directory path to the CA certificate(s) for verifying the registry's key. Defaults: On Windows the system's CA certificates are automatically looked up in the Windows Root certificate store. On Mac OSX this configuration defaults to probe. It is recommended to install openssl using Homebrew, to provide CA certificates. On Linux install the distribution's ca-certificates package. If OpenSSL is statically linked or SslCaLocation is set to probe a list of standard paths will be probed and the first one found will be used as the default CA certificate location path. If OpenSSL is dynamically linked the OpenSSL library's default path will be used (see OPENSSLDIR in openssl version -a).

public string? SslCaLocation { get; init; }

Property Value

string

SslKeystoreLocation

Gets the path to the client's keystore (PKCS#12) used for the authentication.

public string? SslKeystoreLocation { get; init; }

Property Value

string

SslKeystorePassword

Gets the client's keystore (PKCS#12) password.

public string? SslKeystorePassword { get; init; }

Property Value

string

Url

Gets the comma-separated list of URLs for schema registry instances that are used to register or lookup schemas.

public string? Url { get; init; }

Property Value

string

Methods

Equals(KafkaSchemaRegistryConfiguration?)

public bool Equals(KafkaSchemaRegistryConfiguration? other)

Parameters

other KafkaSchemaRegistryConfiguration

Returns

bool

Equals(object?)

public override bool Equals(object? obj)

Parameters

obj object

Returns

bool

GetHashCode()

public override int GetHashCode()

Returns

int

ToString()

public override string ToString()

Returns

string

Validate()

Throws a SilverbackConfigurationException if the configuration is not valid.

public void Validate()

Operators

operator ==(KafkaSchemaRegistryConfiguration?, KafkaSchemaRegistryConfiguration?)

public static bool operator ==(KafkaSchemaRegistryConfiguration? left, KafkaSchemaRegistryConfiguration? right)

Parameters

left KafkaSchemaRegistryConfiguration
right KafkaSchemaRegistryConfiguration

Returns

bool

operator !=(KafkaSchemaRegistryConfiguration?, KafkaSchemaRegistryConfiguration?)

public static bool operator !=(KafkaSchemaRegistryConfiguration? left, KafkaSchemaRegistryConfiguration? right)

Parameters

left KafkaSchemaRegistryConfiguration
right KafkaSchemaRegistryConfiguration

Returns

bool