C# Class KafkaNet.KafkaMetadataProvider

This provider blocks while it attempts to get the MetaData configuration of the Kafka servers. If any retry errors occurs it will continue to block the downstream call and then repeatedly query kafka until the retry errors subside. This repeat call happens in a backoff manner, which each subsequent call waiting longer before a requery. Error Codes: LeaderNotAvailable = 5 NotLeaderForPartition = 6 ConsumerCoordinatorNotAvailableCode = 15 BrokerId = -1 Documentation: https://cwiki.apache.org/confluence/display/KAFKA/A+Guide+To+The+Kafka+Protocol#AGuideToTheKafkaProtocol-MetadataResponse
Inheritance: IDisposable
Afficher le fichier Open project: gigya/KafkaNetClient Class Usage Examples

Méthodes publiques

Méthode Description
Dispose ( ) : void
Get ( IKafkaConnection connections ) : Task

Given a collection of server connections, query for all topics metadata.

Get ( IKafkaConnection connections, IEnumerable topics ) : Task

Given a collection of server connections, query for the topic metadata.

KafkaMetadataProvider ( IKafkaLog log ) : KafkaNet.Protocol

Private Methods

Méthode Description
BackoffOnRetry ( int retryAttempt, bool performRetry ) : System.Threading.Tasks.Task
Get ( IKafkaConnection connections, MetadataRequest request ) : Task
GetMetadataResponse ( IKafkaConnection connections, MetadataRequest request ) : Task
ValidateBroker ( Broker broker ) : MetadataValidationResult
ValidateResponse ( MetadataResponse metadata ) : IEnumerable
ValidateTopic ( Topic topic ) : MetadataValidationResult

Method Details

Dispose() public méthode

public Dispose ( ) : void
Résultat void

Get() public méthode

Given a collection of server connections, query for all topics metadata.
public Get ( IKafkaConnection connections ) : Task
connections IKafkaConnection The server connections to query. Will cycle through the collection, starting at zero until a response is received.
Résultat Task

Get() public méthode

Given a collection of server connections, query for the topic metadata.
public Get ( IKafkaConnection connections, IEnumerable topics ) : Task
connections IKafkaConnection The server connections to query. Will cycle through the collection, starting at zero until a response is received.
topics IEnumerable The collection of topics to get metadata for.
Résultat Task

KafkaMetadataProvider() public méthode

public KafkaMetadataProvider ( IKafkaLog log ) : KafkaNet.Protocol
log IKafkaLog
Résultat KafkaNet.Protocol