Class KafkaClientConfigurationBuilder<TConfig, TConfluentConfig, TBuilder>
The base class for all Kafka client configuration builders.
Inheritance
Inherited Members
Namespace: Silverback.Messaging.Configuration.Kafka
Assembly: Silverback.Integration.Kafka.dll
Syntax
public abstract class KafkaClientConfigurationBuilder<TConfig, TConfluentConfig, TBuilder> where TConfig : KafkaClientConfiguration<TConfluentConfig>, new() where TConfluentConfig : ClientConfig, new() where TBuilder : KafkaClientConfigurationBuilder<TConfig, TConfluentConfig, TBuilder>
Type Parameters
| Name | Description |
|---|---|
| TConfig | The type of the configuration being built. |
| TConfluentConfig | The type of the wrapped Confluent.Kafka.ClientConfig. |
| TBuilder | The actual builder type. |
Constructors
KafkaClientConfigurationBuilder()
The base class for all Kafka client configuration builders.
Declaration
protected KafkaClientConfigurationBuilder()
Properties
Config
Gets the configuration being built.
Declaration
protected TConfig Config { get; }
Property Value
| Type | Description |
|---|---|
| TConfig |
This
Gets this instance.
Declaration
protected abstract TBuilder This { get; }
Property Value
| Type | Description |
|---|---|
| TBuilder |
Remarks
This is necessary to work around casting in the base classes.
Methods
AllowAutoCreateTopics()
Allow automatic topic creation on the broker when subscribing to or assigning non-existent topics. The broker must also
be configured with auto.create.topics.enable=true for this configuration to take effect.
Note: The default value (false) is different from the Java consumer (true).
Requires broker version >= 0.11.0.0, for older broker versions only the broker configuration applies.
Declaration
public TBuilder AllowAutoCreateTopics()
Returns
| Type | Description |
|---|---|
| TBuilder | The builder so that additional calls can be chained. |
BuildCore()
Builds the configuration.
Declaration
protected virtual TConfig BuildCore()
Returns
| Type | Description |
|---|---|
| TConfig | The configuration. |
DisableApiVersionRequest()
Disables the API versions requests and uses the fallback version specified in BrokerVersionFallback.
Declaration
public TBuilder DisableApiVersionRequest()
Returns
| Type | Description |
|---|---|
| TBuilder | The builder so that additional calls can be chained. |
DisableMetricsPush()
Disables pushing of client metrics to the cluster.
Declaration
public TBuilder DisableMetricsPush()
Returns
| Type | Description |
|---|---|
| TBuilder | The builder so that additional calls can be chained. |
DisableSaslOauthbearerUnsecureJwt()
Disables the builtin unsecure JWT OAUTHBEARER token handler. This builtin handler should only be used for development or testing, and not in production.
Declaration
public TBuilder DisableSaslOauthbearerUnsecureJwt()
Returns
| Type | Description |
|---|---|
| TBuilder | The builder so that additional calls can be chained. |
DisableSocketKeepalive()
Disables the TCP keep-alive (SO_KEEPALIVE) on the broker sockets.
Declaration
public TBuilder DisableSocketKeepalive()
Returns
| Type | Description |
|---|---|
| TBuilder | The builder so that additional calls can be chained. |
DisableSocketNagle()
Disables the Nagle's algorithm (TCP_NODELAY) on the broker sockets.
Declaration
public TBuilder DisableSocketNagle()
Returns
| Type | Description |
|---|---|
| TBuilder | The builder so that additional calls can be chained. |
DisableSparseTopicMetadataRefresh()
Disables sparse topic metadata requests.
Declaration
public TBuilder DisableSparseTopicMetadataRefresh()
Returns
| Type | Description |
|---|---|
| TBuilder | The builder so that additional calls can be chained. |
DisableSslCertificateVerification()
Disables the SSL certificate validation.
Declaration
public TBuilder DisableSslCertificateVerification()
Returns
| Type | Description |
|---|---|
| TBuilder | The builder so that additional calls can be chained. |
DisallowAutoCreateTopics()
Disallow automatic topic creation on the broker when subscribing to or assigning non-existent topics.
Declaration
public TBuilder DisallowAutoCreateTopics()
Returns
| Type | Description |
|---|---|
| TBuilder | The builder so that additional calls can be chained. |
EnableApiVersionRequest()
Enables the API versions requests to adjust the functionality according to the available protocol features. If the request fails, the fallback version specified in BrokerVersionFallback will be used.
Declaration
public TBuilder EnableApiVersionRequest()
Returns
| Type | Description |
|---|---|
| TBuilder | The builder so that additional calls can be chained. |
EnableMetricsPush()
Enables pushing of client metrics to the cluster, if the cluster has a client metrics subscription which matches this client.
Declaration
public TBuilder EnableMetricsPush()
Returns
| Type | Description |
|---|---|
| TBuilder | The builder so that additional calls can be chained. |
EnableSaslOauthbearerUnsecureJwt()
Enables the builtin unsecure JWT OAUTHBEARER token handler. This builtin handler should only be used for development or testing, and not in production.
Declaration
public TBuilder EnableSaslOauthbearerUnsecureJwt()
Returns
| Type | Description |
|---|---|
| TBuilder | The builder so that additional calls can be chained. |
EnableSocketKeepalive()
Enables the TCP keep-alive (SO_KEEPALIVE) on the broker sockets.
Declaration
public TBuilder EnableSocketKeepalive()
Returns
| Type | Description |
|---|---|
| TBuilder | The builder so that additional calls can be chained. |
EnableSocketNagle()
Enables the Nagle's algorithm (TCP_NODELAY) on the broker sockets.
Declaration
public TBuilder EnableSocketNagle()
Returns
| Type | Description |
|---|---|
| TBuilder | The builder so that additional calls can be chained. |
EnableSparseTopicMetadataRefresh()
Enables Generates less topic metadata requests (consuming less network bandwidth).
Declaration
public TBuilder EnableSparseTopicMetadataRefresh()
Returns
| Type | Description |
|---|---|
| TBuilder | The builder so that additional calls can be chained. |
EnableSslCertificateVerification()
Enables the SSL certificate validation.
Declaration
public TBuilder EnableSslCertificateVerification()
Returns
| Type | Description |
|---|---|
| TBuilder | The builder so that additional calls can be chained. |
WithAcks(Acks?)
Sets the number of acknowledgements that the leader broker must receive from the in-sync replicas before responding to the request:
Confluent.Kafka.Acks.None (no response/ack is sent to the client), Confluent.Kafka.Acks.Leader (the leader will write the record to
its local log but will respond without awaiting full acknowledgement from all followers, or Confluent.Kafka.Acks.All (the broker
will block until the message is committed by all in-sync replicas. If there are less than min.insync.replicas (broker configuration)
in the in-sync replicas set the produce request will fail.
Declaration
public TBuilder WithAcks(Acks? acks)
Parameters
| Type | Name | Description |
|---|---|---|
| Acks? | acks | The number of acknowledgements that the leader broker must receive from the in-sync replicas. |
Returns
| Type | Description |
|---|---|
| TBuilder | The builder so that additional calls can be chained. |
WithApiVersionFallbackMs(int?)
Sets how long the BrokerVersionFallback is used in the case the API version request fails.
Declaration
public TBuilder WithApiVersionFallbackMs(int? apiVersionFallbackMs)
Parameters
| Type | Name | Description |
|---|---|---|
| int? | apiVersionFallbackMs | How long the fallback API version must be used. |
Returns
| Type | Description |
|---|---|
| TBuilder | The builder so that additional calls can be chained. |
WithApiVersionRequestTimeoutMs(int?)
Sets the timeout (in milliseconds) for the broker API version requests.
Declaration
public TBuilder WithApiVersionRequestTimeoutMs(int? apiVersionRequestTimeoutMs)
Parameters
| Type | Name | Description |
|---|---|---|
| int? | apiVersionRequestTimeoutMs | The timeout for the broker API version requests. |
Returns
| Type | Description |
|---|---|
| TBuilder | The builder so that additional calls can be chained. |
WithBootstrapServers(string?)
Sets the comma-separated list of brokers (host or host:port).
Declaration
public TBuilder WithBootstrapServers(string? bootstrapServers)
Parameters
| Type | Name | Description |
|---|---|---|
| string | bootstrapServers | The comma-separated list of brokers. |
Returns
| Type | Description |
|---|---|
| TBuilder | The builder so that additional calls can be chained. |
WithBrokerAddressFamily(BrokerAddressFamily?)
Sets the allowed broker IP address families.
Declaration
public TBuilder WithBrokerAddressFamily(BrokerAddressFamily? brokerAddressFamily)
Parameters
| Type | Name | Description |
|---|---|---|
| BrokerAddressFamily? | brokerAddressFamily | The allowed broker IP address families. |
Returns
| Type | Description |
|---|---|
| TBuilder | The builder so that additional calls can be chained. |
WithBrokerAddressTtl(int?)
Sets the duration in milliseconds of the cache of the broker address resolving results.
Declaration
public TBuilder WithBrokerAddressTtl(int? brokerAddressTtl)
Parameters
| Type | Name | Description |
|---|---|---|
| int? | brokerAddressTtl | The duration in milliseconds of the cache of the broker address resolving results. |
Returns
| Type | Description |
|---|---|
| TBuilder | The builder so that additional calls can be chained. |
WithBrokerVersionFallback(string?)
Sets the broker API version to be used when the API version request fails or it's disabled. Older broker versions (before 0.10.0) don't support the API version request. Valid values are: 0.9.0, 0.8.2, 0.8.1, 0.8.0. Any other value >= 0.10, such as 0.10.2.1, enables the ApiVersionRequest.
Declaration
public TBuilder WithBrokerVersionFallback(string? brokerVersionFallback)
Parameters
| Type | Name | Description |
|---|---|---|
| string | brokerVersionFallback | The broker API version to be used as fallback. |
Returns
| Type | Description |
|---|---|
| TBuilder | The builder so that additional calls can be chained. |
WithCancellationDelayMaxMs(int)
Sets the maximum time (in milliseconds) before a cancellation request is acted on. Low values may result in measurably higher CPU usage.
Declaration
public TBuilder WithCancellationDelayMaxMs(int cancellationDelayMaxMs)
Parameters
| Type | Name | Description |
|---|---|---|
| int | cancellationDelayMaxMs | The maximum time (in milliseconds) before a cancellation request is acted on. |
Returns
| Type | Description |
|---|---|
| TBuilder | The builder so that additional calls can be chained. |
WithClientDnsLookup(ClientDnsLookup?)
Sets a value indicating how the client uses DNS lookups. By default, when the lookup returns multiple IP addresses for a hostname, they will all be attempted for connection before the connection is considered failed. This applies to both bootstrap and advertised servers. If the value is set to Confluent.Kafka.ClientDnsLookup.ResolveCanonicalBootstrapServersOnly, each entry will be resolved and expanded into a list of canonical names. Warning: Confluent.Kafka.ClientDnsLookup.ResolveCanonicalBootstrapServersOnly must only be used with Confluent.Kafka.SaslMechanism.Gssapi (Kerberos), as it's the only purpose of this configuration value. Note: Default here is different from the Java client's default behavior, which connects only to the first IP address returned for a hostname.
Declaration
public TBuilder WithClientDnsLookup(ClientDnsLookup? clientDnsLookup)
Parameters
| Type | Name | Description |
|---|---|---|
| ClientDnsLookup? | clientDnsLookup | A value indicating how the client uses DNS lookups. |
Returns
| Type | Description |
|---|---|
| TBuilder | The builder so that additional calls can be chained. |
WithClientId(string?)
Sets the client identifier.
Declaration
public TBuilder WithClientId(string? clientId)
Parameters
| Type | Name | Description |
|---|---|---|
| string | clientId | The client identifier. |
Returns
| Type | Description |
|---|---|
| TBuilder | The builder so that additional calls can be chained. |
WithClientRack(string?)
Sets the rack identifier for this client. This can be any string value which indicates where this client is physically located.
Declaration
public TBuilder WithClientRack(string? clientRack)
Parameters
| Type | Name | Description |
|---|---|---|
| string | clientRack | The rack identifier for this client. |
Returns
| Type | Description |
|---|---|
| TBuilder | The builder so that additional calls can be chained. |
WithConnectionsMaxIdleMs(int?)
Sets the maximum time of inactivity (in milliseconds) before closing the broker connections. Disable with 0. If this property is left at its default value some heuristics are performed to determine a suitable default value.
Declaration
public TBuilder WithConnectionsMaxIdleMs(int? connectionsMaxIdleMs)
Parameters
| Type | Name | Description |
|---|---|---|
| int? | connectionsMaxIdleMs | The maximum time of inactivity. |
Returns
| Type | Description |
|---|---|
| TBuilder | The builder so that additional calls can be chained. |
WithDebug(string?)
Sets a comma-separated list of debug contexts to enable.
Detailed producer debugging: broker,topic,msg.
Detailed consumer debugging: consumer,cgrp,topic,fetch.
Declaration
public TBuilder WithDebug(string? debug)
Parameters
| Type | Name | Description |
|---|---|---|
| string | debug | The comma-separated list of debug contexts to enable. |
Returns
| Type | Description |
|---|---|
| TBuilder | The builder so that additional calls can be chained. |
WithHttpsCaLocation(string?)
Sets the file or directory path to CA certificate(s) for verifying HTTPS endpoints, such as sasl.oauthbearer.token.endpoint.url used for OAUTHBEARER/OIDC authentication.
Mutually exclusive with HttpsCaPem. 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 https.ca.location 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).
Declaration
public TBuilder WithHttpsCaLocation(string? httpsCaLocation)
Parameters
| Type | Name | Description |
|---|---|---|
| string | httpsCaLocation | The file or directory path to CA certificate(s) for verifying HTTPS endpoints, such as |
Returns
| Type | Description |
|---|---|
| TBuilder | The builder so that additional calls can be chained. |
WithHttpsCaPem(string?)
Sets the CA certificate string (in PEM format) for verifying HTTPS endpoints. Mutually exclusive with HttpsCaLocation.
Declaration
public TBuilder WithHttpsCaPem(string? httpsCaPem)
Parameters
| Type | Name | Description |
|---|---|---|
| string | httpsCaPem | The CA certificate string (in PEM format). |
Returns
| Type | Description |
|---|---|
| TBuilder | The builder so that additional calls can be chained. |
WithMaxInFlight(int?)
Sets the maximum number of in-flight requests per broker connection. This is a generic property applied to all broker communication; however, it is primarily relevant to produce requests. In particular, note that other mechanisms limit the number of outstanding consumer fetch requests per broker to one.
Declaration
public TBuilder WithMaxInFlight(int? maxInFlight)
Parameters
| Type | Name | Description |
|---|---|---|
| int? | maxInFlight | The maximum number of in-flight requests per broker connection. |
Returns
| Type | Description |
|---|---|
| TBuilder | The builder so that additional calls can be chained. |
WithMessageCopyMaxBytes(int?)
Sets the maximum size for a message to be copied into the buffer. Messages larger than this will be passed by reference (zero-copy) at the expense of larger iovecs.
Declaration
public TBuilder WithMessageCopyMaxBytes(int? messageCopyMaxBytes)
Parameters
| Type | Name | Description |
|---|---|---|
| int? | messageCopyMaxBytes | The maximum size for a message to be copied into the buffer. |
Returns
| Type | Description |
|---|---|
| TBuilder | The builder so that additional calls can be chained. |
WithMessageMaxBytes(int?)
Sets the maximum message size.
Declaration
public TBuilder WithMessageMaxBytes(int? messageMaxBytes)
Parameters
| Type | Name | Description |
|---|---|---|
| int? | messageMaxBytes | The maximum message size. |
Returns
| Type | Description |
|---|---|
| TBuilder | The builder so that additional calls can be chained. |
WithMetadataMaxAgeMs(int?)
Sets the metadata cache max age (in milliseconds). Defaults to TopicMetadataRefreshIntervalMs.
Declaration
public TBuilder WithMetadataMaxAgeMs(int? metadataMaxAgeMs)
Parameters
| Type | Name | Description |
|---|---|---|
| int? | metadataMaxAgeMs | The metadata cache max age. |
Returns
| Type | Description |
|---|---|
| TBuilder | The builder so that additional calls can be chained. |
WithMetadataRecoveryRebootstrapTriggerMs(int?)
Sets the metadata recovery rebootstrap trigger interval (ms). When using Confluent.Kafka.MetadataRecoveryStrategy.Rebootstrap,
if the client is unable to get metadata from any of the known brokers for the specified interval, the client repeats the bootstrap process using the configured
bootstrap.servers and brokers added through rd_kafka_brokers_add(). Default: 300000 (5 minutes).
Declaration
public TBuilder WithMetadataRecoveryRebootstrapTriggerMs(int? metadataRecoveryRebootstrapTriggerMs)
Parameters
| Type | Name | Description |
|---|---|---|
| int? | metadataRecoveryRebootstrapTriggerMs | The metadata recovery rebootstrap trigger interval (ms). |
Returns
| Type | Description |
|---|---|
| TBuilder | The builder so that additional calls can be chained. |
WithMetadataRecoveryStrategy(MetadataRecoveryStrategy?)
Sets the metadata recovery strategy. If set to Confluent.Kafka.MetadataRecoveryStrategy.None the client doesn't re-bootstrap.
If set to Confluent.Kafka.MetadataRecoveryStrategy.Rebootstrap the client repeats the bootstrap process using the configured
bootstrap.servers and brokers added through rd_kafka_brokers_add(). Rebootstrapping is useful when a client talks to brokers so infrequently that the broker
set may change entirely before the client refreshes metadata. Metadata recovery is triggered when all last-known brokers appear unavailable simultaneously, when the client
cannot refresh metadata within the configured rebootstrap trigger interval, or when requested in a metadata response.
Declaration
public TBuilder WithMetadataRecoveryStrategy(MetadataRecoveryStrategy? metadataRecoveryStrategy)
Parameters
| Type | Name | Description |
|---|---|---|
| MetadataRecoveryStrategy? | metadataRecoveryStrategy | The metadata recovery strategy. |
Returns
| Type | Description |
|---|---|
| TBuilder | The builder so that additional calls can be chained. |
WithPluginLibraryPaths(string?)
Sets the list of plugin libraries to load (; separated). The library search path is platform dependent. If no filename extension
is specified the platform-specific extension (such as .dll or .so) will be appended automatically.
Declaration
public TBuilder WithPluginLibraryPaths(string? pluginLibraryPaths)
Parameters
| Type | Name | Description |
|---|---|---|
| string | pluginLibraryPaths | The list of plugin libraries to load ( |
Returns
| Type | Description |
|---|---|
| TBuilder | The builder so that additional calls can be chained. |
WithReceiveMessageMaxBytes(int?)
Sets the maximum response message size. This serves as a safety precaution to avoid memory exhaustion in case of protocol hickups. This value must be at least FetchMaxBytes + 512 to allow for protocol overhead. The value is adjusted automatically unless the configuration property is explicitly set.
Declaration
public TBuilder WithReceiveMessageMaxBytes(int? receiveMessageMaxBytes)
Parameters
| Type | Name | Description |
|---|---|---|
| int? | receiveMessageMaxBytes | The maximum response message size. |
Returns
| Type | Description |
|---|---|
| TBuilder | The builder so that additional calls can be chained. |
WithReconnectBackoffMaxMs(int?)
Sets the maximum time (in milliseconds) to wait before reconnecting to a broker after the connection has been closed.
Declaration
public TBuilder WithReconnectBackoffMaxMs(int? reconnectBackoffMaxMs)
Parameters
| Type | Name | Description |
|---|---|---|
| int? | reconnectBackoffMaxMs | The maximum time to wait before reconnecting to a broker. |
Returns
| Type | Description |
|---|---|
| TBuilder | The builder so that additional calls can be chained. |
WithReconnectBackoffMs(int?)
Sets the initial time (in milliseconds) to wait before reconnecting to a broker after the connection has been closed. The time is increased exponentially until ReconnectBackoffMaxMs is reached. -25% to +50% jitter is applied to each reconnect backoff. A value of 0 disables the backoff and reconnects immediately.
Declaration
public TBuilder WithReconnectBackoffMs(int? reconnectBackoffMs)
Parameters
| Type | Name | Description |
|---|---|---|
| int? | reconnectBackoffMs | The initial time to wait before reconnecting to a broker. |
Returns
| Type | Description |
|---|---|
| TBuilder | The builder so that additional calls can be chained. |
WithRetryBackoffMaxMs(int?)
Sets the maximum backoff time in milliseconds before retrying a protocol request, this is the maximum backoff allowed for exponentially backed off requests.
Declaration
public TBuilder WithRetryBackoffMaxMs(int? retryBackoffMaxMs)
Parameters
| Type | Name | Description |
|---|---|---|
| int? | retryBackoffMaxMs | The maximum backoff time in milliseconds before retrying a protocol request. |
Returns
| Type | Description |
|---|---|
| TBuilder | The builder so that additional calls can be chained. |
WithRetryBackoffMs(int?)
Sets the backoff time in milliseconds before retrying a protocol request, this is the first backoff time, and will be backed off exponentially until number of retries is exhausted, and it's capped with RetryBackoffMaxMs.
Declaration
public TBuilder WithRetryBackoffMs(int? retryBackoffMs)
Parameters
| Type | Name | Description |
|---|---|---|
| int? | retryBackoffMs | The backoff time in milliseconds before retrying a protocol request. |
Returns
| Type | Description |
|---|---|
| TBuilder | The builder so that additional calls can be chained. |
WithSaslKerberosKeytab(string?)
Sets the path to the Kerberos keytab file. This configuration property is only used as a variable in
SaslKerberosKinitCmd as ... -t "%{sasl.kerberos.keytab}".
Declaration
public TBuilder WithSaslKerberosKeytab(string? saslKerberosKeytab)
Parameters
| Type | Name | Description |
|---|---|---|
| string | saslKerberosKeytab | The path to the Kerberos keytab file. |
Returns
| Type | Description |
|---|---|
| TBuilder | The builder so that additional calls can be chained. |
WithSaslKerberosKinitCmd(string?)
Sets the shell command to be used to refresh or acquire the client's Kerberos ticket. This command is executed on client creation and every SaslKerberosMinTimeBeforeRelogin (0=disable).
Declaration
public TBuilder WithSaslKerberosKinitCmd(string? saslKerberosKinitCmd)
Parameters
| Type | Name | Description |
|---|---|---|
| string | saslKerberosKinitCmd | The shell command to be used to refresh or acquire the client's Kerberos ticket. |
Returns
| Type | Description |
|---|---|
| TBuilder | The builder so that additional calls can be chained. |
WithSaslKerberosMinTimeBeforeRelogin(int?)
Sets the minimum time in milliseconds between each key refresh attempts. Disable automatic key refresh by setting this property to 0.
Declaration
public TBuilder WithSaslKerberosMinTimeBeforeRelogin(int? saslKerberosMinTimeBeforeRelogin)
Parameters
| Type | Name | Description |
|---|---|---|
| int? | saslKerberosMinTimeBeforeRelogin | The minimum time in milliseconds between each key refresh attempts. |
Returns
| Type | Description |
|---|---|
| TBuilder | The builder so that additional calls can be chained. |
WithSaslKerberosPrincipal(string?)
Sets the client's Kerberos principal name. (Not supported on Windows, will use the logon user's principal).
Declaration
public TBuilder WithSaslKerberosPrincipal(string? saslKerberosPrincipal)
Parameters
| Type | Name | Description |
|---|---|---|
| string | saslKerberosPrincipal | The client's Kerberos principal name. (Not supported on Windows, will use the logon user's principal). |
Returns
| Type | Description |
|---|---|
| TBuilder | The builder so that additional calls can be chained. |
WithSaslKerberosServiceName(string?)
Sets the Kerberos principal name that Kafka runs as, not including /hostname@REALM.
Declaration
public TBuilder WithSaslKerberosServiceName(string? saslKerberosServiceName)
Parameters
| Type | Name | Description |
|---|---|---|
| string | saslKerberosServiceName | The Kerberos principal name that Kafka runs as. |
Returns
| Type | Description |
|---|---|
| TBuilder | The builder so that additional calls can be chained. |
WithSaslMechanism(SaslMechanism?)
Sets the SASL mechanism to use for authentication. Supported: GSSAPI, PLAIN, SCRAM-SHA-256, SCRAM-SHA-512.
Declaration
public TBuilder WithSaslMechanism(SaslMechanism? saslMechanism)
Parameters
| Type | Name | Description |
|---|---|---|
| SaslMechanism? | saslMechanism | The SASL mechanism. |
Returns
| Type | Description |
|---|---|
| TBuilder | The builder so that additional calls can be chained. |
WithSaslOauthbearerAssertionAlgorithm(SaslOauthbearerAssertionAlgorithm?)
Sets the algorithm the client should use to sign the assertion sent to the identity provider and in the OAuth alg header in the JWT assertion.
Declaration
public TBuilder WithSaslOauthbearerAssertionAlgorithm(SaslOauthbearerAssertionAlgorithm? saslOauthbearerAssertionAlgorithm)
Parameters
| Type | Name | Description |
|---|---|---|
| SaslOauthbearerAssertionAlgorithm? | saslOauthbearerAssertionAlgorithm | The algorithm the client should use to sign the assertion sent to the identity provider and in the OAuth alg header in the JWT assertion. |
Returns
| Type | Description |
|---|---|
| TBuilder | The builder so that additional calls can be chained. |
WithSaslOauthbearerAssertionClaimAud(string?)
Sets the JWT audience claim. Only used when sasl.oauthbearer.method is set to "oidc" and JWT assertion is needed.
Declaration
public TBuilder WithSaslOauthbearerAssertionClaimAud(string? saslOauthbearerAssertionClaimAud)
Parameters
| Type | Name | Description |
|---|---|---|
| string | saslOauthbearerAssertionClaimAud | The JWT audience claim. |
Returns
| Type | Description |
|---|---|
| TBuilder | The builder so that additional calls can be chained. |
WithSaslOauthbearerAssertionClaimExpSeconds(int?)
Sets the assertion expiration time in seconds. Only used when sasl.oauthbearer.method is set to "oidc" and JWT assertion is needed.
Declaration
public TBuilder WithSaslOauthbearerAssertionClaimExpSeconds(int? saslOauthbearerAssertionClaimExpSeconds)
Parameters
| Type | Name | Description |
|---|---|---|
| int? | saslOauthbearerAssertionClaimExpSeconds | The assertion expiration time in seconds. |
Returns
| Type | Description |
|---|---|
| TBuilder | The builder so that additional calls can be chained. |
WithSaslOauthbearerAssertionClaimIss(string?)
Sets the JWT issuer claim. Only used when sasl.oauthbearer.method is set to "oidc" and JWT assertion is needed.
Declaration
public TBuilder WithSaslOauthbearerAssertionClaimIss(string? saslOauthbearerAssertionClaimIss)
Parameters
| Type | Name | Description |
|---|---|---|
| string | saslOauthbearerAssertionClaimIss | The JWT issuer claim. |
Returns
| Type | Description |
|---|---|
| TBuilder | The builder so that additional calls can be chained. |
WithSaslOauthbearerAssertionClaimJtiInclude(bool?)
Sets the JWT ID claim. When set to true, a random UUID is generated. Only used when sasl.oauthbearer.method is set to "oidc" and JWT assertion is needed.
Declaration
public TBuilder WithSaslOauthbearerAssertionClaimJtiInclude(bool? saslOauthbearerAssertionClaimJtiInclude)
Parameters
| Type | Name | Description |
|---|---|---|
| bool? | saslOauthbearerAssertionClaimJtiInclude | The JWT ID claim. |
Returns
| Type | Description |
|---|---|
| TBuilder | The builder so that additional calls can be chained. |
WithSaslOauthbearerAssertionClaimNbfSeconds(int?)
Sets the assertion not before time in seconds. Only used when sasl.oauthbearer.method is set to "oidc" and JWT assertion is needed.
Declaration
public TBuilder WithSaslOauthbearerAssertionClaimNbfSeconds(int? saslOauthbearerAssertionClaimNbfSeconds)
Parameters
| Type | Name | Description |
|---|---|---|
| int? | saslOauthbearerAssertionClaimNbfSeconds | The assertion not before time in seconds. |
Returns
| Type | Description |
|---|---|
| TBuilder | The builder so that additional calls can be chained. |
WithSaslOauthbearerAssertionClaimSub(string?)
Sets the JWT subject claim. Only used when sasl.oauthbearer.method is set to "oidc" and JWT assertion is needed.
Declaration
public TBuilder WithSaslOauthbearerAssertionClaimSub(string? saslOauthbearerAssertionClaimSub)
Parameters
| Type | Name | Description |
|---|---|---|
| string | saslOauthbearerAssertionClaimSub | The JWT subject claim. |
Returns
| Type | Description |
|---|---|
| TBuilder | The builder so that additional calls can be chained. |
WithSaslOauthbearerAssertionFile(string?)
Sets the path to the assertion file. Only used when sasl.oauthbearer.method is set to "oidc" and JWT assertion is needed.
Declaration
public TBuilder WithSaslOauthbearerAssertionFile(string? saslOauthbearerAssertionFile)
Parameters
| Type | Name | Description |
|---|---|---|
| string | saslOauthbearerAssertionFile | The path to the assertion file. |
Returns
| Type | Description |
|---|---|
| TBuilder | The builder so that additional calls can be chained. |
WithSaslOauthbearerAssertionJwtTemplateFile(string?)
Sets the path to the JWT template file. Only used when sasl.oauthbearer.method is set to "oidc" and JWT assertion is needed.
Declaration
public TBuilder WithSaslOauthbearerAssertionJwtTemplateFile(string? saslOauthbearerAssertionJwtTemplateFile)
Parameters
| Type | Name | Description |
|---|---|---|
| string | saslOauthbearerAssertionJwtTemplateFile | The path to the JWT template file. |
Returns
| Type | Description |
|---|---|
| TBuilder | The builder so that additional calls can be chained. |
WithSaslOauthbearerAssertionPrivateKeyFile(string?)
Sets the path to the client's private key (PEM) used for authentication when using the JWT assertion.
Declaration
public TBuilder WithSaslOauthbearerAssertionPrivateKeyFile(string? saslOauthbearerAssertionPrivateKeyFile)
Parameters
| Type | Name | Description |
|---|---|---|
| string | saslOauthbearerAssertionPrivateKeyFile | The path to the client's private key (PEM) used for authentication when using the JWT assertion. |
Returns
| Type | Description |
|---|---|
| TBuilder | The builder so that additional calls can be chained. |
WithSaslOauthbearerAssertionPrivateKeyPassphrase(string?)
Sets the private key passphrase for sasl.oauthbearer.assertion.private.key.file or sasl.oauthbearer.assertion.private.key.pem.
Declaration
public TBuilder WithSaslOauthbearerAssertionPrivateKeyPassphrase(string? saslOauthbearerAssertionPrivateKeyPassphrase)
Parameters
| Type | Name | Description |
|---|---|---|
| string | saslOauthbearerAssertionPrivateKeyPassphrase | The private key passphrase for |
Returns
| Type | Description |
|---|---|
| TBuilder | The builder so that additional calls can be chained. |
WithSaslOauthbearerAssertionPrivateKeyPem(string?)
Sets the client's private key (PEM) used for authentication when using the JWT assertion.
Declaration
public TBuilder WithSaslOauthbearerAssertionPrivateKeyPem(string? saslOauthbearerAssertionPrivateKeyPem)
Parameters
| Type | Name | Description |
|---|---|---|
| string | saslOauthbearerAssertionPrivateKeyPem | The client's private key (PEM) used for authentication when using the JWT assertion. |
Returns
| Type | Description |
|---|---|
| TBuilder | The builder so that additional calls can be chained. |
WithSaslOauthbearerClientId(string?)
Sets the public identifier for the application. Must be unique across all clients that the authorization server handles. Only used when SaslOauthbearerMethod is set to Confluent.Kafka.SaslOauthbearerMethod.Oidc.
Declaration
public TBuilder WithSaslOauthbearerClientId(string? saslOauthbearerClientId)
Parameters
| Type | Name | Description |
|---|---|---|
| string | saslOauthbearerClientId | The public identifier for the application. |
Returns
| Type | Description |
|---|---|
| TBuilder | The builder so that additional calls can be chained. |
WithSaslOauthbearerClientSecret(string?)
Sets the client secret only known to the application and the authorization server. This should be a sufficiently random string that is not guessable. Only used when SaslOauthbearerMethod is set to Confluent.Kafka.SaslOauthbearerMethod.Oidc.
Declaration
public TBuilder WithSaslOauthbearerClientSecret(string? saslOauthbearerClientSecret)
Parameters
| Type | Name | Description |
|---|---|---|
| string | saslOauthbearerClientSecret | The client secret only known to the application and the authorization server. |
Returns
| Type | Description |
|---|---|
| TBuilder | The builder so that additional calls can be chained. |
WithSaslOauthbearerConfig(string?)
Sets the SASL/OAUTHBEARER configuration. The format is implementation-dependent and must be parsed accordingly. The default unsecured token implementation
(see https://tools.ietf.org/html/rfc7515#appendix-A.5) recognizes space-separated name=value pairs with valid names including principalClaimName,
principal, scopeClaimName, scope, and lifeSeconds. The default value for principalClaimName is "sub", the default value
for scopeClaimName is "scope", and the default value for lifeSeconds is 3600. The scope value is CSV format with the default value being
no/empty scope. For example: principalClaimName=azp principal=admin scopeClaimName=roles scope=role1,role2 lifeSeconds=600. In addition, SASL extensions can be
communicated to the broker via extension_NAME=value. For example: principal=admin extension_traceId=123.
Declaration
public TBuilder WithSaslOauthbearerConfig(string? saslOauthbearerConfig)
Parameters
| Type | Name | Description |
|---|---|---|
| string | saslOauthbearerConfig | The SASL/OAUTHBEARER configuration. |
Returns
| Type | Description |
|---|---|
| TBuilder | The builder so that additional calls can be chained. |
WithSaslOauthbearerExtensions(string?)
Sets the additional information to be provided to the broker as a comma-separated list of key=value pairs (e.g. supportFeatureX=true,organizationId=sales-emea).
Only used when SaslOauthbearerMethod is set to Confluent.Kafka.SaslOauthbearerMethod.Oidc.
Declaration
public TBuilder WithSaslOauthbearerExtensions(string? saslOauthbearerExtensions)
Parameters
| Type | Name | Description |
|---|---|---|
| string | saslOauthbearerExtensions | The additional information to be provided to the broker as a comma-separated list of |
Returns
| Type | Description |
|---|---|
| TBuilder | The builder so that additional calls can be chained. |
WithSaslOauthbearerGrantType(SaslOauthbearerGrantType?)
Sets the OAuth grant type to use when communicating with the identity provider.
Declaration
public TBuilder WithSaslOauthbearerGrantType(SaslOauthbearerGrantType? saslOauthbearerGrantType)
Parameters
| Type | Name | Description |
|---|---|---|
| SaslOauthbearerGrantType? | saslOauthbearerGrantType | The OAuth grant type to use when communicating with the identity provider. |
Returns
| Type | Description |
|---|---|
| TBuilder | The builder so that additional calls can be chained. |
WithSaslOauthbearerMetadataAuthenticationType(SaslOauthbearerMetadataAuthenticationType?)
Sets the type of metadata-based authentication to use for OAUTHBEARER/OIDC azure_imds authenticates using the Azure IMDS endpoint. Sets a default value for sasl.oauthbearer.token.endpoint.url if missing. Configuration values specific of chosen authentication type can be passed through sasl.oauthbearer.config.
Declaration
public TBuilder WithSaslOauthbearerMetadataAuthenticationType(SaslOauthbearerMetadataAuthenticationType? saslOauthbearerMetadataAuthenticationType)
Parameters
| Type | Name | Description |
|---|---|---|
| SaslOauthbearerMetadataAuthenticationType? | saslOauthbearerMetadataAuthenticationType | The type of metadata-based authentication to use for OAUTHBEARER/OIDC. |
Returns
| Type | Description |
|---|---|
| TBuilder | The builder so that additional calls can be chained. |
WithSaslOauthbearerMethod(SaslOauthbearerMethod?)
Sets the login method to be used. If set to Confluent.Kafka.SaslOauthbearerMethod.Oidc, the following properties must also be be specified: SaslOauthbearerClientId, SaslOauthbearerClientSecret, and SaslOauthbearerTokenEndpointUrl.
Declaration
public TBuilder WithSaslOauthbearerMethod(SaslOauthbearerMethod? saslOauthbearerMethod)
Parameters
| Type | Name | Description |
|---|---|---|
| SaslOauthbearerMethod? | saslOauthbearerMethod | The login method to be used. |
Returns
| Type | Description |
|---|---|
| TBuilder | The builder so that additional calls can be chained. |
WithSaslOauthbearerScope(string?)
Sets the scope of the access request to the broker. Only used when SaslOauthbearerMethod is set to Confluent.Kafka.SaslOauthbearerMethod.Oidc.
Declaration
public TBuilder WithSaslOauthbearerScope(string? saslOauthbearerScope)
Parameters
| Type | Name | Description |
|---|---|---|
| string | saslOauthbearerScope | The scope of the access request to the broker. |
Returns
| Type | Description |
|---|---|
| TBuilder | The builder so that additional calls can be chained. |
WithSaslOauthbearerTokenEndpointUrl(string?)
Sets the OAuth/OIDC issuer token endpoint HTTP(S) URI used to retrieve the token. Only used when SaslOauthbearerMethod is set to Confluent.Kafka.SaslOauthbearerMethod.Oidc.
Declaration
public TBuilder WithSaslOauthbearerTokenEndpointUrl(string? saslOauthbearerTokenEndpointUrl)
Parameters
| Type | Name | Description |
|---|---|---|
| string | saslOauthbearerTokenEndpointUrl | The OAuth/OIDC issuer token endpoint HTTP(S) URI used to retrieve the token. |
Returns
| Type | Description |
|---|---|
| TBuilder | The builder so that additional calls can be chained. |
WithSaslPassword(string?)
Sets the SASL password to use with the PLAIN and SASL-SCRAM-.. mechanisms.
Declaration
public TBuilder WithSaslPassword(string? saslPassword)
Parameters
| Type | Name | Description |
|---|---|---|
| string | saslPassword | The SASL password to use with the PLAIN and SASL-SCRAM-.. mechanisms. |
Returns
| Type | Description |
|---|---|
| TBuilder | The builder so that additional calls can be chained. |
WithSaslUsername(string?)
Sets the SASL username to use with the PLAIN and SASL-SCRAM-.. mechanisms.
Declaration
public TBuilder WithSaslUsername(string? saslUsername)
Parameters
| Type | Name | Description |
|---|---|---|
| string | saslUsername | The SASL username to use with the PLAIN and SASL-SCRAM-.. mechanisms. |
Returns
| Type | Description |
|---|---|
| TBuilder | The builder so that additional calls can be chained. |
WithSecurityProtocol(SecurityProtocol?)
Sets the protocol to be used to communicate with the brokers.
Declaration
public TBuilder WithSecurityProtocol(SecurityProtocol? securityProtocol)
Parameters
| Type | Name | Description |
|---|---|---|
| SecurityProtocol? | securityProtocol | The protocol to be used to communicate with the brokers. |
Returns
| Type | Description |
|---|---|
| TBuilder | The builder so that additional calls can be chained. |
WithSocketConnectionSetupTimeoutMs(int?)
Sets the maximum time (in milliseconds) allowed for the setup of the broker connection (TCP connection setup and SSL/SASL handshake). The connection to the broker will be closed and retried, if the timeout elapses before it is fully functional.
Declaration
public TBuilder WithSocketConnectionSetupTimeoutMs(int? socketConnectionSetupTimeoutMs)
Parameters
| Type | Name | Description |
|---|---|---|
| int? | socketConnectionSetupTimeoutMs | The maximum time allowed for the setup of the broker connection. |
Returns
| Type | Description |
|---|---|
| TBuilder | The builder so that additional calls can be chained. |
WithSocketMaxFails(int?)
Sets the maximum number of send failures (e.g. timed out requests) before disconnecting. Disable with 0.
Warning: It is highly recommended to leave this setting at its default value of 1 to avoid the client and broker to
become desynchronized in case of request timeouts.
Note: The connection is automatically re-established.
Declaration
public TBuilder WithSocketMaxFails(int? socketMaxFails)
Parameters
| Type | Name | Description |
|---|---|---|
| int? | socketMaxFails | The maximum number of send failures before disconnecting. |
Returns
| Type | Description |
|---|---|
| TBuilder | The builder so that additional calls can be chained. |
WithSocketReceiveBufferBytes(int?)
Sets the socket receive buffer size. The system default is used if 0.
Declaration
public TBuilder WithSocketReceiveBufferBytes(int? socketReceiveBufferBytes)
Parameters
| Type | Name | Description |
|---|---|---|
| int? | socketReceiveBufferBytes | The socket receive buffer size. |
Returns
| Type | Description |
|---|---|
| TBuilder | The builder so that additional calls can be chained. |
WithSocketSendBufferBytes(int?)
Sets the socket send buffer size. The system default is used if 0.
Declaration
public TBuilder WithSocketSendBufferBytes(int? socketSendBufferBytes)
Parameters
| Type | Name | Description |
|---|---|---|
| int? | socketSendBufferBytes | The socket send buffer size. |
Returns
| Type | Description |
|---|---|
| TBuilder | The builder so that additional calls can be chained. |
WithSocketTimeoutMs(int?)
Sets the default timeout (in milliseconds) for network requests.
Declaration
public TBuilder WithSocketTimeoutMs(int? socketTimeoutMs)
Parameters
| Type | Name | Description |
|---|---|---|
| int? | socketTimeoutMs | The default timeout for network requests. |
Returns
| Type | Description |
|---|---|
| TBuilder | The builder so that additional calls can be chained. |
WithSslCaCertificateStores(string?)
Sets a comma-separated list of Windows certificate stores to load CA certificates from. The certificates will be loaded in the same order as stores are specified. If no certificates can be loaded from any of the specified stores an error is logged and the OpenSSL library's default CA location is used instead. Store names are typically one or more of: MY, Root, Trust, CA.
Declaration
public TBuilder WithSslCaCertificateStores(string? sslCaCertificateStores)
Parameters
| Type | Name | Description |
|---|---|---|
| string | sslCaCertificateStores | A comma-separated list of Windows certificate stores to load CA certificates from. |
Returns
| Type | Description |
|---|---|
| TBuilder | The builder so that additional calls can be chained. |
WithSslCaLocation(string?)
Sets the file or directory path to the CA certificate(s) for verifying the broker'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).
Declaration
public TBuilder WithSslCaLocation(string? sslCaLocation)
Parameters
| Type | Name | Description |
|---|---|---|
| string | sslCaLocation | The file or directory path to the CA certificate(s) for verifying the broker's key. |
Returns
| Type | Description |
|---|---|
| TBuilder | The builder so that additional calls can be chained. |
WithSslCaPem(string?)
Sets the CA certificate string (in PEM format) for verifying the broker's key.
Declaration
public TBuilder WithSslCaPem(string? sslCaPem)
Parameters
| Type | Name | Description |
|---|---|---|
| string | sslCaPem | The CA certificate string (in PEM format). |
Returns
| Type | Description |
|---|---|
| TBuilder | The builder so that additional calls can be chained. |
WithSslCertificateLocation(string?)
Sets the path to the client's public key (PEM) used for the authentication.
Declaration
public TBuilder WithSslCertificateLocation(string? sslCertificateLocation)
Parameters
| Type | Name | Description |
|---|---|---|
| string | sslCertificateLocation | The path to the client's public key (PEM). |
Returns
| Type | Description |
|---|---|
| TBuilder | The builder so that additional calls can be chained. |
WithSslCertificatePem(string?)
Sets the client's public key string (in PEM format) used for the authentication.
Declaration
public TBuilder WithSslCertificatePem(string? sslCertificatePem)
Parameters
| Type | Name | Description |
|---|---|---|
| string | sslCertificatePem | The client's public key string (in PEM format). |
Returns
| Type | Description |
|---|---|
| TBuilder | The builder so that additional calls can be chained. |
WithSslCipherSuites(string?)
Sets the SSL cipher suites.
Declaration
public TBuilder WithSslCipherSuites(string? sslCipherSuites)
Parameters
| Type | Name | Description |
|---|---|---|
| string | sslCipherSuites | The SSL cipher suites. |
Returns
| Type | Description |
|---|---|
| TBuilder | The builder so that additional calls can be chained. |
WithSslCrlLocation(string?)
Sets the path to the certificate revocation list (CRL) for verifying broker's certificate validity.
Declaration
public TBuilder WithSslCrlLocation(string? sslCrlLocation)
Parameters
| Type | Name | Description |
|---|---|---|
| string | sslCrlLocation | The path to the certificate revocation list (CRL). |
Returns
| Type | Description |
|---|---|
| TBuilder | The builder so that additional calls can be chained. |
WithSslCurvesList(string?)
Sets the supported SSL curves.
Declaration
public TBuilder WithSslCurvesList(string? sslCurvesList)
Parameters
| Type | Name | Description |
|---|---|---|
| string | sslCurvesList | The supported SSL curves. |
Returns
| Type | Description |
|---|---|
| TBuilder | The builder so that additional calls can be chained. |
WithSslEndpointIdentificationAlgorithm(SslEndpointIdentificationAlgorithm?)
Sets the endpoint identification algorithm to be used to validate the broker hostname using the certificate. OpenSSL >= 1.0.2 required.
Declaration
public TBuilder WithSslEndpointIdentificationAlgorithm(SslEndpointIdentificationAlgorithm? sslEndpointIdentificationAlgorithm)
Parameters
| Type | Name | Description |
|---|---|---|
| SslEndpointIdentificationAlgorithm? | sslEndpointIdentificationAlgorithm | The endpoint identification algorithm to be used to validate the broker hostname. |
Returns
| Type | Description |
|---|---|
| TBuilder | The builder so that additional calls can be chained. |
WithSslEngineId(string?)
Sets the OpenSSL engine id (the name used for loading engine).
Declaration
public TBuilder WithSslEngineId(string? sslEngineId)
Parameters
| Type | Name | Description |
|---|---|---|
| string | sslEngineId | The OpenSSL engine id. |
Returns
| Type | Description |
|---|---|
| TBuilder | The builder so that additional calls can be chained. |
WithSslEngineLocation(string?)
Sets the path to the OpenSSL engine library. OpenSSL >= 1.1.0 required.
Declaration
public TBuilder WithSslEngineLocation(string? sslEngineLocation)
Parameters
| Type | Name | Description |
|---|---|---|
| string | sslEngineLocation | The path to the OpenSSL engine library. |
Returns
| Type | Description |
|---|---|
| TBuilder | The builder so that additional calls can be chained. |
WithSslKeyLocation(string?)
Sets the path to the client's private key (PEM) used for the authentication.
Declaration
public TBuilder WithSslKeyLocation(string? sslKeyLocation)
Parameters
| Type | Name | Description |
|---|---|---|
| string | sslKeyLocation | The path to the client's private key (PEM). |
Returns
| Type | Description |
|---|---|
| TBuilder | The builder so that additional calls can be chained. |
WithSslKeyPassword(string?)
Sets the private key passphrase.
Declaration
public TBuilder WithSslKeyPassword(string? sslKeyPassword)
Parameters
| Type | Name | Description |
|---|---|---|
| string | sslKeyPassword | The private key passphrase. |
Returns
| Type | Description |
|---|---|
| TBuilder | The builder so that additional calls can be chained. |
WithSslKeyPem(string?)
Sets the client's private key string (in PEM format) used for the authentication.
Declaration
public TBuilder WithSslKeyPem(string? sslKeyPem)
Parameters
| Type | Name | Description |
|---|---|---|
| string | sslKeyPem | The client's private key string (in PEM format). |
Returns
| Type | Description |
|---|---|
| TBuilder | The builder so that additional calls can be chained. |
WithSslKeystoreLocation(string?)
Sets the path to the client's keystore (PKCS#12) used for the authentication.
Declaration
public TBuilder WithSslKeystoreLocation(string? sslKeystoreLocation)
Parameters
| Type | Name | Description |
|---|---|---|
| string | sslKeystoreLocation | The path to the client's keystore (PKCS#12). |
Returns
| Type | Description |
|---|---|
| TBuilder | The builder so that additional calls can be chained. |
WithSslKeystorePassword(string?)
Sets the client's keystore (PKCS#12) password.
Declaration
public TBuilder WithSslKeystorePassword(string? sslKeystorePassword)
Parameters
| Type | Name | Description |
|---|---|---|
| string | sslKeystorePassword | The client's keystore (PKCS#12) password. |
Returns
| Type | Description |
|---|---|
| TBuilder | The builder so that additional calls can be chained. |
WithSslProviders(string?)
Sets the comma-separated list of OpenSSL 3.0.x implementation providers.
Declaration
public TBuilder WithSslProviders(string? sslProviders)
Parameters
| Type | Name | Description |
|---|---|---|
| string | sslProviders | The comma-separated list of OpenSSL 3.0.x implementation providers. |
Returns
| Type | Description |
|---|---|
| TBuilder | The builder so that additional calls can be chained. |
WithSslSigalgsList(string?)
Sets the supported SSL signature algorithms.
Declaration
public TBuilder WithSslSigalgsList(string? sslSigalgsList)
Parameters
| Type | Name | Description |
|---|---|---|
| string | sslSigalgsList | The supported SSL signature algorithms. |
Returns
| Type | Description |
|---|---|
| TBuilder | The builder so that additional calls can be chained. |
WithStatisticsIntervalMs(int?)
Sets the statistics emit interval (in milliseconds). The granularity is 1000ms. A value of 0 disables statistics.
Declaration
public TBuilder WithStatisticsIntervalMs(int? statisticsIntervalMs)
Parameters
| Type | Name | Description |
|---|---|---|
| int? | statisticsIntervalMs | The statistics emit interval. |
Returns
| Type | Description |
|---|---|
| TBuilder | The builder so that additional calls can be chained. |
WithTopicBlacklist(string?)
Sets a comma-separated list of regular expressions for matching topic names that should be ignored in broker metadata information as if the topics did not exist.
Declaration
public TBuilder WithTopicBlacklist(string? topicBlacklist)
Parameters
| Type | Name | Description |
|---|---|---|
| string | topicBlacklist | The comma-separated list of regular expressions for the topic black list. |
Returns
| Type | Description |
|---|---|
| TBuilder | The builder so that additional calls can be chained. |
WithTopicMetadataPropagationMaxMs(int?)
Sets the delay (in milliseconds) to be applied before marking a topic as non-existent. The maximum propagation time is calculated from the time the topic is first referenced in the client.
Declaration
public TBuilder WithTopicMetadataPropagationMaxMs(int? topicMetadataPropagationMaxMs)
Parameters
| Type | Name | Description |
|---|---|---|
| int? | topicMetadataPropagationMaxMs | The delay to be observed before marking a topic as non-existent. |
Returns
| Type | Description |
|---|---|
| TBuilder | The builder so that additional calls can be chained. |
WithTopicMetadataRefreshFastIntervalMs(int?)
Sets the refresh interval (in milliseconds) to be applied instead of the TopicMetadataRefreshIntervalMs when a topic loses its leader and a new metadata request will be enqueued. This initial interval will be exponentially increased until the topic metadata has been refreshed. This is used to recover quickly from transitioning leader brokers.
Declaration
public TBuilder WithTopicMetadataRefreshFastIntervalMs(int? topicMetadataRefreshFastIntervalMs)
Parameters
| Type | Name | Description |
|---|---|---|
| int? | topicMetadataRefreshFastIntervalMs | The refresh interval. |
Returns
| Type | Description |
|---|---|
| TBuilder | The builder so that additional calls can be chained. |
WithTopicMetadataRefreshIntervalMs(int?)
Sets the interval (in milliseconds) at which the topic and broker metadata is refreshed to proactively discover any new brokers, topics, partitions, or partition leader changes. Use -1 to disable the intervalled refresh (not recommended). If there are no locally referenced topics (no topic objects created, no messages produced, no subscription or no assignment), then only the broker list will be refreshed every interval but no more often than every 10s.
Declaration
public TBuilder WithTopicMetadataRefreshIntervalMs(int? topicMetadataRefreshIntervalMs)
Parameters
| Type | Name | Description |
|---|---|---|
| int? | topicMetadataRefreshIntervalMs | The interval at which the topic and broker metadata is refreshed. |
Returns
| Type | Description |
|---|---|
| TBuilder | The builder so that additional calls can be chained. |