Class InterClusterConnection

java.lang.Object
io.confluent.common.InterClusterConnection

public class InterClusterConnection extends Object
  • Constructor Details

    • InterClusterConnection

      public InterClusterConnection()
  • Method Details

    • getBootstrapBrokerForListener

      public static String getBootstrapBrokerForListener(String listener, Map<String,?> cfgMap) throws org.apache.kafka.common.config.ConfigException
      Parameters:
      listener - Type of listener you want to connect to. Usually "INTERNAL" or "EXTERNAL"
      cfgMap - broker config of the broker you'll connect to. Should include advertised.listeners that includes the listener you want
      Returns:
      a string that you can use as "bootstrap.servers" config to connect to that broker
      Throws:
      org.apache.kafka.common.config.ConfigException
    • getListenerSecurityProtocol

      public static String getListenerSecurityProtocol(String listener, Map<String,?> cfgMap) throws org.apache.kafka.common.config.ConfigException
      Parameters:
      listener - Type of listener you want to connect to. Usually "INTERNAL" or "EXTERNAL"
      cfgMap - broker config of the broker you'll connect to. Should the mapping from listeners to security protocols
      Returns:
      String with the security protocol that is supported for the listener you picked
      Throws:
      org.apache.kafka.common.config.ConfigException