Table of Contents |
---|
Status
Current state: Under DiscussionAccepted
Discussion thread:
JIRA:
Jira | ||||||
---|---|---|---|---|---|---|
|
Jira server ASF JIRA serverId 5aa69414-a9e9-3523-82ec-879b028fb15b key KAFKA-15369
Please keep the discussion on the mailing list rather than commenting on the wiki (wiki discussions get unwieldy fast).
...
It is an error to set both bootstrap.controllers
and bootstrap.servers
. Only one can be set at a time. It is also an error to include broker endpoints in --bootstrap-controllerscontroller
. If we contact a broker via this mechanism, the command will fail.
...
The following command-line tools will get a new --bootstrap-controllers
argumentcontroller
argument:
- kafka-acls.sh
- kafka-cluster.sh
- kafka-configs.sh
- kafka-delegation-tokens.sh
- kafka-features.sh
- kafka-metadata-quorum.sh
kafka-metadata-shell.sh
- kafka-reassign-partitions.sh
When the --bootstrap-controllers
controller
argument is used --bootstrap-servers
must not be specified.
The --bootstrap-controllerscontroller
flag will set the bootstrap.controllers
configuration described above. It will also clear the bootstrap.servers
configuration if that has been set in some other way (for example, via a configuration file provided to the command-line tool).
The --bootstrap-controllers
flag controller
flag will be documented as follows:
Code Block |
---|
--bootstrap-controllerscontroller CONTROLLERS A comma-separted list of bootstrap.controllers that can be supplied instead of bootstrap-servers. This is useful for administrators who wish to bypass the brokers. |
Note that it is not necessary to specify the controller IDs when using --bootstrap-controllerscontroller
.
Here is an example --bootstrap-controllerscontroller
usage:
Code Block |
---|
./bin/kafka-cluster.sh cluster-id --bootstrap-controllerscontroller example.com:9090,example2.com:9090,example3.com:9090 |
...
Code Block |
---|
The Apache Kafka metadata tool positional arguments: command The command to run. optional arguments: -h, --help show this help message and exit --directory DIRECTORY, -d DIRECTORY The __cluster_metadata-0 directory to read. --bootstrap-controllerscontroller CONTROLLERS, -q CONTROLLERS The bootstrap.controllers, used to communicate directly with the metadata quorum. --config CONFIG Path to a property file containing a Kafka configuration |
...
Rather than having a bootstrap.controllers
configuration, we could have a separate configuration like direct.to.controller
and put the controller servers into bootstrap.servers
. Similarly, we could reuse --bootstrap-server
erather than adding --bootstrap-controllerscontroller
.
We decided to go with the scheme proposed above to make it clearer when a tool was going directly to the controller. This also makes it clearer which command-line tools have this capability and which do not.
For example, kafka-console-consumer.sh
does not have the capability to go direct to the controller, since the controller does not handle produces. Therefore, it's intuitive that kafka-console-consumer.sh
lacks the --bootstrap-controllers
flagcontroller
flag.
Another issue is that in the future, we may want to support using the controllers as bootstrap servers for the brokers. The scheme above leaves the door open for this, whereas a scheme that reused existing configurations would not.
...