Table of Contents

Class ConfluentAdminClientFactoryBase

Namespace
Silverback.Messaging.Broker.Kafka
Assembly
Silverback.Integration.Kafka.dll

The base class for the IConfluentAdminClientFactory implementations. It resolves the configuration from the configured clients and leaves the creation of the Confluent.Kafka.IAdminClient to the derived class.

public abstract class ConfluentAdminClientFactoryBase : IConfluentAdminClientFactory
Inheritance
ConfluentAdminClientFactoryBase
Implements
Derived
Inherited Members

Constructors

ConfluentAdminClientFactoryBase(IProducerCollection, IConsumerCollection)

Initializes a new instance of the ConfluentAdminClientFactoryBase class.

protected ConfluentAdminClientFactoryBase(IProducerCollection producers, IConsumerCollection consumers)

Parameters

producers IProducerCollection

The IProducerCollection.

consumers IConsumerCollection

The IConsumerCollection.

Methods

GetClient(AdminClientConfig)

Returns an Confluent.Kafka.IAdminClient instance for the specified configuration.

public abstract IAdminClient GetClient(AdminClientConfig config)

Parameters

config AdminClientConfig

The client configuration.

Returns

IAdminClient

The Confluent.Kafka.IAdminClient.

GetClient(IConsumer)

Returns an Confluent.Kafka.IAdminClient instance using the configuration of the specified consumer.

public IAdminClient GetClient(IConsumer consumer)

Parameters

consumer IConsumer

The Kafka consumer.

Returns

IAdminClient

The Confluent.Kafka.IAdminClient.

GetClient(IProducer)

Returns an Confluent.Kafka.IAdminClient instance using the configuration of the specified producer.

public IAdminClient GetClient(IProducer producer)

Parameters

producer IProducer

The Kafka producer.

Returns

IAdminClient

The Confluent.Kafka.IAdminClient.

GetClient(KafkaClientConfiguration)

Returns an Confluent.Kafka.IAdminClient instance using the specified configuration.

public IAdminClient GetClient(KafkaClientConfiguration configuration)

Parameters

configuration KafkaClientConfiguration

The configuration.

Returns

IAdminClient

The Confluent.Kafka.IAdminClient.

GetClient(KafkaConsumerConfiguration)

Returns an Confluent.Kafka.IAdminClient instance using the specified configuration.

public IAdminClient GetClient(KafkaConsumerConfiguration configuration)

Parameters

configuration KafkaConsumerConfiguration

The configuration.

Returns

IAdminClient

The Confluent.Kafka.IAdminClient.

GetClient(KafkaProducerConfiguration)

Returns an Confluent.Kafka.IAdminClient instance using the specified configuration.

public IAdminClient GetClient(KafkaProducerConfiguration configuration)

Parameters

configuration KafkaProducerConfiguration

The configuration.

Returns

IAdminClient

The Confluent.Kafka.IAdminClient.

GetClient(Action<KafkaClientConfigurationBuilder>)

Returns an Confluent.Kafka.IAdminClient instance using the specified configuration.

public IAdminClient GetClient(Action<KafkaClientConfigurationBuilder> builderAction)

Parameters

builderAction Action<KafkaClientConfigurationBuilder>

An Action<T> that takes a KafkaClientConfigurationBuilder and configures it.

Returns

IAdminClient

The Confluent.Kafka.IAdminClient.

GetClientForConsumer(string)

Returns an Confluent.Kafka.IAdminClient instance using the configuration of the Kafka consumer with the specified name.

public IAdminClient GetClientForConsumer(string consumerName)

Parameters

consumerName string

The name specified when adding the consumer.

Returns

IAdminClient

The Confluent.Kafka.IAdminClient.

GetClientForConsumerEndpoint(string)

Returns an Confluent.Kafka.IAdminClient instance using the configuration of the Kafka consumer for the specified endpoint.

public IAdminClient GetClientForConsumerEndpoint(string endpointName)

Parameters

endpointName string

The endpoint friendly name or the name of one of the consumed topics, including the topics matching a subscribed pattern.

Returns

IAdminClient

The Confluent.Kafka.IAdminClient.

GetClientForProducer(string)

Returns an Confluent.Kafka.IAdminClient instance using the configuration of the Kafka producer with the specified name.

public IAdminClient GetClientForProducer(string producerName)

Parameters

producerName string

The name specified when adding the producer.

Returns

IAdminClient

The Confluent.Kafka.IAdminClient.

GetClientForProducerEndpoint(string)

Returns an Confluent.Kafka.IAdminClient instance using the configuration of the Kafka producer for the specified endpoint.

public IAdminClient GetClientForProducerEndpoint(string endpointName)

Parameters

endpointName string

The endpoint friendly name or the topic name. The endpoints with a dynamic target topic can be found by friendly name only.

Returns

IAdminClient

The Confluent.Kafka.IAdminClient.