public class TopicBasedPhysicalClusterMetadata extends io.confluent.kafka.multitenant.CommonTopicBasedPhysicalClusterMetadata<KafkaLogicalClusterMetadata>
| Modifier and Type | Field and Description |
|---|---|
SslCertificateManager |
sslCertificateManager |
TenantLifecycleManager |
tenantLifecycleManager |
| Constructor and Description |
|---|
TopicBasedPhysicalClusterMetadata(org.apache.kafka.common.metrics.Metrics metrics) |
TopicBasedPhysicalClusterMetadata(org.apache.kafka.common.metrics.Metrics metrics,
org.apache.kafka.common.utils.Time time) |
| Modifier and Type | Method and Description |
|---|---|
void |
configure(Map<String,?> configs)
Creates a consumer for the LKC metadata topic (named in the ConfluentConfigs.CDC_LKC_METADATA_TOPIC_CONFIG
config.)
Adds the instance for the given broker session UUID, specified in KafkaConfig.BrokerSessionUuidProp to the
static instance map.
|
String |
dedicatedLogicalClusterId() |
String |
getSessionUuid(Map<String,?> configs) |
Set<String> |
kafkaLogicalClusterIds() |
Set<String> |
logicalClusterIds() |
void |
registerTenantCallback(Function<String,Boolean> callback)
Registers tenant callback function to be invoked whenever a new tenant is added
|
void |
registerTenantDeactivatedCallback(Function<String,Boolean> callback) |
Map<org.apache.kafka.common.Endpoint,CompletableFuture<Void>> |
start(Map<String,Object> interBrokerClientConfig,
Collection<org.apache.kafka.common.Endpoint> endpoints) |
void |
startClients(Function<String,org.apache.kafka.clients.admin.Admin> adminClientSupplier) |
close, consume, isUp, logicalClusterIdsIncludingStale, metadata, startpublic TenantLifecycleManager tenantLifecycleManager
public SslCertificateManager sslCertificateManager
public TopicBasedPhysicalClusterMetadata(org.apache.kafka.common.metrics.Metrics metrics)
public TopicBasedPhysicalClusterMetadata(org.apache.kafka.common.metrics.Metrics metrics,
org.apache.kafka.common.utils.Time time)
public void configure(Map<String,?> configs)
configure in interface org.apache.kafka.common.Configurableconfigure in class io.confluent.kafka.multitenant.CommonTopicBasedPhysicalClusterMetadata<KafkaLogicalClusterMetadata>configs - broker configurationorg.apache.kafka.common.config.ConfigException - if KafkaConfig.BrokerSessionUuidProp is not set, or
ConfluentConfigs.CDC_LKC_METADATA_TOPIC_CONFIG is not set, or
ConfluentConfigs.CDC_TOPIC_LOAD_TIMEOUT_MS_CONFIG is not set, or
unable to monitor the SSL certificates on disk.UnsupportedOperationException - if another instance of this class with the same broker
session UUID was already configured.public String getSessionUuid(Map<String,?> configs)
getSessionUuid in class io.confluent.kafka.multitenant.CommonTopicBasedPhysicalClusterMetadata<KafkaLogicalClusterMetadata>public void startClients(Function<String,org.apache.kafka.clients.admin.Admin> adminClientSupplier)
public void registerTenantCallback(Function<String,Boolean> callback)
callback - Callback function that has to be invoked for all tenants. The callback function should take a
string(tenant ID) and return Boolean
The function receives the lkc id for that tenant as the argument, and handle it own errors if need be, as
exceptions thrown by this function would be rethrown, and could cause the broker to shut down if unhandled.
Note that it could be invoked before the tenant cache is in a running state, and thus tenant metadata
might not be yet accessible to this function.public void registerTenantDeactivatedCallback(Function<String,Boolean> callback)
public Map<org.apache.kafka.common.Endpoint,CompletableFuture<Void>> start(Map<String,Object> interBrokerClientConfig, Collection<org.apache.kafka.common.Endpoint> endpoints)
public String dedicatedLogicalClusterId()
public Set<String> logicalClusterIds()
logicalClusterIds in class io.confluent.kafka.multitenant.CommonTopicBasedPhysicalClusterMetadata<KafkaLogicalClusterMetadata>