C# Класс Kafka.Client.Producers.Partitioning.ConfigBrokerPartitionInfo

Fetch broker info like ID, host and port from configuration.
Used when zookeeper based auto partition discovery is disabled
Наследование: IBrokerPartitionInfo
Показать файл Открыть проект Примеры использования класса

Открытые методы

Метод Описание
ConfigBrokerPartitionInfo ( Kafka.Client.Cfg.ProducerConfiguration config ) : System

Initializes a new instance of the ConfigBrokerPartitionInfo class.

Dispose ( ) : void

Releasing unmanaged resources if any are used.

Do nothing

GetAllBrokerInfo ( ) : Broker>.IDictionary

Gets a mapping from broker ID to the host and port for all brokers

GetBrokerInfo ( int brokerId ) : Broker

Gets the host and port information for the broker identified by the given broker ID

GetBrokerPartitionInfo ( string topic ) : SortedSet

Gets a mapping from broker ID to partition IDs

Partition ID would be allways 0

Приватные методы

Метод Описание
InitializeBrokers ( ) : void

Initialize list of brokers from configuration

Описание методов

ConfigBrokerPartitionInfo() публичный Метод

Initializes a new instance of the ConfigBrokerPartitionInfo class.
public ConfigBrokerPartitionInfo ( Kafka.Client.Cfg.ProducerConfiguration config ) : System
config Kafka.Client.Cfg.ProducerConfiguration The config.
Результат System

Dispose() публичный Метод

Releasing unmanaged resources if any are used.
Do nothing
public Dispose ( ) : void
Результат void

GetAllBrokerInfo() публичный Метод

Gets a mapping from broker ID to the host and port for all brokers
public GetAllBrokerInfo ( ) : Broker>.IDictionary
Результат Broker>.IDictionary

GetBrokerInfo() публичный Метод

Gets the host and port information for the broker identified by the given broker ID
public GetBrokerInfo ( int brokerId ) : Broker
brokerId int The broker ID.
Результат Kafka.Client.Cluster.Broker

GetBrokerPartitionInfo() публичный Метод

Gets a mapping from broker ID to partition IDs
Partition ID would be allways 0
public GetBrokerPartitionInfo ( string topic ) : SortedSet
topic string The topic for which this information is to be returned
Результат SortedSet