When you try to run several Kafka brokers with different brokerages. One of them is the default value server.properties, and the other serverTest.propertieswith 2 lines is changed, those that are broker.id=1and listeners=PLAINTEXT://localhost:6000. The rest is the same default setting. First I run zookeeper, then the default kafka server.properties, but when you start serverTest.propertiesreceiving the following exception: kafka.common.InconsistentBrokerIdException: Configured brokerId 1 doesn't match stored brokerId 0 in meta.properties. My understanding is that the following should actually run several nodes, as I have seen what others do in textbooks. I am using Kafka 9.0.
server.properties
serverTest.properties
broker.id=1
listeners=PLAINTEXT://localhost:6000
kafka.common.InconsistentBrokerIdException: Configured brokerId 1 doesn't match stored brokerId 0 in meta.properties
config/serverTest.properties :
broker.id=2 port=9093 log.dir=/tmp/kafka-logs-2
:
cp config/server.properties config/server3.properties
config/server3.properties :
broker.id=3 port=9094 log.dir=/tmp/kafka-logs-3
,
advertised.host.name=192.168.x.x
else, vmware, , log.dir,
, , broker.id kafka-logs - */meta.properties ( ).
, . , server.properties server.properties, :
# A comma separated list of directories under which to store log files log.dirs=/tmp/kafka-logs
, , , meta.properties kafka-logs, 0 0.
, /tmp log.dirs=/tmp/kafka-logs -logs *, log.dirs=/tmp/kafka-logs , :)
log.dirs=/tmp/kafka-logs
, server.properties serverTest.properties log.dirs
log.dirs
- log.dirs log.dirs, ,