kafka-ui 使用配置

516 阅读1分钟
docker run -d -p 9090:8080 -e DYNAMIC_CONFIG_ENABLED=true -e KAFKA_CLUSTERS_0_NAME=cluster_A -e KAFKA_CLUSTERS_0_BOOTSTRAPSERVERS=192.168.127.112:9092 -e KAFKA_CLUSTERS_1_NAME=cluster_B -e KAFKA_CLUSTERS_1_BOOTSTRAPSERVERS=192.168.127.81:9092  provectuslabs/kafka-ui
docker run -d -p 9090:8080 -e DYNAMIC_CONFIG_ENABLED=true -e KAFKA_CLUSTERS_0_NAME=cluster_A -e KAFKA_CLUSTERS_0_BOOTSTRAPSERVERS=node1:9092 -e KAFKA_CLUSTERS_1_NAME=cluster_B -e KAFKA_CLUSTERS_1_BOOTSTRAPSERVERS=node4:9092 --add-host node1:192.168.127.112 --add-host node4:192.168.127.81  provectuslabs/kafka-ui

bootstrap-servers

bootstrap-servers 和 listeners 里的配置有关,使用 ip 就是 ip,使用 hostname 则为 hostname,domainname 则为 domainname。

# The address the socket server listens on. It will get the value returned from 
# java.net.InetAddress.getCanonicalHostName() if not configured.
#   FORMAT:
#     listeners = listener_name://host_name:port
#   EXAMPLE:
#     listeners = PLAINTEXT://your.host.name:9092
listeners=PLAINTEXT://192.168.127.112:9092

# Hostname and port the broker will advertise to producers and consumers. If not set, 
# it uses the value for "listeners" if configured.  Otherwise, it will use the value
# returned from java.net.InetAddress.getCanonicalHostName().
advertised.listeners=PLAINTEXT://192.168.127.112:9092