Confluent/KRaft
Confluent/KRaft是Apache Kafka在2.8之後推出的功能,由Confluent包裝的版本,目的是為了取代Apache ZooKeeper的功能。
設定
先把/etc/kafka/kraft/controller.properties
複製到/etc/kafka/server.properties
下,然後把以下的設定值改成對應的值:
process.roles=controller
node.id=1
controller.quorum.voters=1@kafka-controller-1.example.com:19092,2@kafka-controller-2.example.com:19092,3@kafka-controller-3.example.com:19092
listeners=CONTROLLER://kafka-controller-1.example.com:19092
controller.listener.names=CONTROLLER
listener.security.protocol.map=CONTROLLER:PLAINTEXT,PLAINTEXT:PLAINTEXT,SSL:SSL,SASL_PLAINTEXT:SASL_PLAINTEXT,SASL_SSL:SASL_SSL
log.dirs=/opt/kraft-controller-logs