Broker Nodes — Kafka Servers
|A Kafka server, a Kafka broker and a Kafka node all refer to the same concept and are synonyms (see the scaladoc of KafkaServer).|
|Given topics are always partitioned across brokers in a cluster a single broker hosts topic partitions of one or more topics actually (even when a topic is only partitioned to just a single partition).|
Quoting Broker article (from Wikipedia, the free encyclopedia):
A broker is an individual person who arranges transactions between a buyer and a seller for a commission when the deal is executed.
A broker’s prime responsibility is to bring sellers and buyers together and thus a broker is the third-person facilitator between a buyer and a seller.
A Kafka broker receives messages from producers and stores them on disk keyed by unique offset.
A Kafka broker allows consumers to fetch messages by topic, partition and offset.
Kafka brokers can create a Kafka cluster by sharing information between each other directly or indirectly using Zookeeper.
A Kafka cluster has exactly one broker that acts as the Controller.
You can start a single Kafka broker using
Only when Zookeeper is up and running you can start a Kafka server (that will connect to Zookeeper).
|Read kafka-server-start.sh script.|
kafka-server-start.sh starts a Kafka broker.
$ ./bin/kafka-server-start.sh USAGE: ./bin/kafka-server-start.sh [-daemon] server.properties [--override property=value]*
Before you run
config/log4j.properties for logging configuration that you can override using
KAFKA_LOG4J_OPTS environment variable.
EXTRA_ARGS environment variables.
-name— defaults to
kafkaServerwhen in daemon mode.
-loggc— enabled when in daemon mode.
-daemon— enables daemon mode.
valuethat should override the value set for
$ ./bin/kafka-server-start.sh config/server.properties --override broker.id=100 ... INFO [KafkaServer id=100] started (kafka.server.KafkaServer)