Class CommonTopicBasedPhysicalClusterMetadata<LCMType extends org.apache.kafka.server.multitenant.LogicalClusterMetadata>

java.lang.Object
io.confluent.kafka.multitenant.BasePhysicalClusterMetadata<LCMType>
io.confluent.kafka.multitenant.CommonTopicBasedPhysicalClusterMetadata<LCMType>
All Implemented Interfaces:
org.apache.kafka.common.Configurable, org.apache.kafka.common.Reconfigurable, org.apache.kafka.server.multitenant.MultiTenantMetadata

public abstract class CommonTopicBasedPhysicalClusterMetadata<LCMType extends org.apache.kafka.server.multitenant.LogicalClusterMetadata> extends BasePhysicalClusterMetadata<LCMType>
  • Field Details

  • Constructor Details

    • CommonTopicBasedPhysicalClusterMetadata

      public CommonTopicBasedPhysicalClusterMetadata(org.apache.kafka.common.metrics.Metrics metrics)
    • CommonTopicBasedPhysicalClusterMetadata

      public CommonTopicBasedPhysicalClusterMetadata(org.apache.kafka.common.metrics.Metrics metrics, org.apache.kafka.common.utils.Time time)
  • Method Details

    • configure

      public void configure(Map<String,?> configs)
      Creates a consumer for the LC metadata topic (named in the ConfluentConfigs.CDC_LC_METADATA_TOPIC_CONFIG config.) Adds the instance for the given broker session UUID, specified in KafkaConfig.BrokerSessionUuidProp to the static instance map. The caller of this method must call close() when done to remove the instance from the static map.
      Parameters:
      configs - broker configuration
      Throws:
      org.apache.kafka.common.config.ConfigException - if KafkaConfig.BrokerSessionUuidProp is not set, or ConfluentConfigs.CDC_LC_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.
    • close

      public void close(String sessionUuid)
    • start

      public CompletableFuture<Void> start(Map<String,Object> clientConfig)
    • logicalClusterIds

      public abstract Set<String> logicalClusterIds()
    • logicalClusterIdsIncludingStale

      public Set<String> logicalClusterIdsIncludingStale()
      Description copied from class: BasePhysicalClusterMetadata
      Returns all active logical clusters hosted by this physical cluster, including logical clusters with stale/invalid metadata
      Specified by:
      logicalClusterIdsIncludingStale in class BasePhysicalClusterMetadata<LCMType extends org.apache.kafka.server.multitenant.LogicalClusterMetadata>
      Returns:
      set of logical cluster IDs
    • metadata

      public LCMType metadata(String logicalClusterId)
      Description copied from class: BasePhysicalClusterMetadata
      Returns metadata LCMType of a given logical cluster ID
      Specified by:
      metadata in interface org.apache.kafka.server.multitenant.MultiTenantMetadata
      Specified by:
      metadata in class BasePhysicalClusterMetadata<LCMType extends org.apache.kafka.server.multitenant.LogicalClusterMetadata>
      Parameters:
      logicalClusterId - logical cluster ID
      Returns:
      logical cluster metadata LCMType or null if logical cluster does not exist or its metadata is stale
    • consume

      public void consume(org.apache.kafka.clients.consumer.ConsumerRecord<String,byte[]> record)