mirror of https://github.com/apache/kafka.git
MINOR: Update Kafka configuration documentation to use kafka-configs.…
…sh, instead of deprecated kafka-topics.sh --alter Author: Ashish Singh <asingh@cloudera.com> Reviewers: Gwen Shapira Closes #1772 from SinghAsDev/MinorKafkaConfigsDoc
This commit is contained in:
parent
32feed25ae
commit
dddb79f312
|
@ -39,16 +39,19 @@ Configurations pertinent to topics have both a server default as well an optiona
|
|||
<b> > bin/kafka-topics.sh --zookeeper localhost:2181 --create --topic my-topic --partitions 1
|
||||
--replication-factor 1 --config max.message.bytes=64000 --config flush.messages=1</b>
|
||||
</pre>
|
||||
Overrides can also be changed or set later using the alter topic command. This example updates the max message size for <i>my-topic</i>:
|
||||
Overrides can also be changed or set later using the alter configs command. This example updates the max message size for <i>my-topic</i>:
|
||||
<pre>
|
||||
<b> > bin/kafka-topics.sh --zookeeper localhost:2181 --alter --topic my-topic
|
||||
--config max.message.bytes=128000</b>
|
||||
<b> > bin/kafka-configs.sh --zookeeper localhost:2181 --entity-type topics --entity-name my-topic --alter --add-config max.message.bytes=128000</b>
|
||||
</pre>
|
||||
|
||||
To check overrides set on the topic you can do
|
||||
<pre>
|
||||
<b> > bin/kafka-configs.sh --zookeeper localhost:2181 --entity-type topics --entity-name my-topic --describe</b>
|
||||
</pre>
|
||||
|
||||
To remove an override you can do
|
||||
<pre>
|
||||
<b> > bin/kafka-topics.sh --zookeeper localhost:2181 --alter --topic my-topic
|
||||
--delete-config max.message.bytes</b>
|
||||
<b> > bin/kafka-configs.sh --zookeeper localhost:2181 --entity-type topics --entity-name my-topic --alter --delete-config max.message.bytes</b>
|
||||
</pre>
|
||||
|
||||
The following are the topic-level configurations. The server's default configuration for this property is given under the Server Default Property heading. A given server default config value only applies to a topic if it does not have an explicit topic config override.
|
||||
|
|
Loading…
Reference in New Issue