Skip to content

Instantly share code, notes, and snippets.

@nickwallen
Last active May 23, 2017 17:29
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save nickwallen/bbf31f7f57098ad174cd141f24716b09 to your computer and use it in GitHub Desktop.
Save nickwallen/bbf31f7f57098ad174cd141f24716b09 to your computer and use it in GitHub Desktop.
kafka-console-consumer.sh  --zookeeper y113:2181 --topic bro --security-protocol SASL_PLAINTEXT

Change configuration for a specific topic.

[root@y136 ~]# kafka-configs.sh \
  --zookeeper $ZOOKEEPER \
  --alter \
  --entity-name pcap12 \
  --entity-type topics \
  --add-config max.message.bytes=100000000
[2017-05-11 15:46:18,515] ERROR

*****************************************************************************************************
*** WARNING: you are creating a topic where the max.message.bytes is greater than the broker's    ***
*** default max.message.bytes. This operation is dangerous. There are two potential side effects: ***
*** - Consumers will get failures if their fetch.message.max.bytes (old consumer) or              ***
***   max.partition.fetch.bytes (new consumer) < the value you are using                          ***
*** - Producer requests larger than replica.fetch.max.bytes will not replicate and hence have     ***
***   a higher risk of data loss                                                                  ***
*** You should ensure both of these settings are greater than the value set here before using     ***
*** this topic.                                                                                   ***
*****************************************************************************************************
- value set here: 100000000
- Default Broker replica.fetch.max.bytes: 1048576
- Default Broker max.message.bytes: 1000012
- Default Old Consumer fetch.message.max.bytes: 1048576
- Default New Consumer max.partition.fetch.bytes: 1048576

 (kafka.admin.TopicCommand$)
Are you sure you want to continue? [y/n]
y
Updated config for topic: "pcap12".

Show configuration for a specific topic.

[root@y136 ~]# kafka-configs.sh \
  --zookeeper $ZOOKEEPER \
  --describe \
  --entity-name pcap12 \
  --entity-type topics
Configs for topics:pcap12 are max.message.bytes=100000000
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment