Class KafkaAdminOptions
Configuration options for the Kafka admin client.
public sealed class KafkaAdminOptions
- Inheritance
-
KafkaAdminOptions
- Inherited Members
- Extension Methods
Examples
services.AddKafkaAdmin(options =>
{
options.BootstrapServers = "broker1:9092,broker2:9092";
options.OperationTimeout = TimeSpan.FromSeconds(30);
});
Remarks
Provides configuration for administrative operations against Kafka clusters, such as creating, deleting, and describing topics. The admin client uses the same bootstrap servers as the producer/consumer but may have different timeout requirements for administrative operations.
Properties
BootstrapServers
Gets or sets the Kafka bootstrap servers.
[Required]
public string BootstrapServers { get; set; }
Property Value
- string
The comma-separated list of broker addresses.
OperationTimeout
Gets or sets the timeout for administrative operations.
public TimeSpan OperationTimeout { get; set; }
Property Value
- TimeSpan
The operation timeout. Default is 30 seconds.
Remarks
Administrative operations such as topic creation or deletion may take longer than normal produce/consume operations due to cluster coordination.