Repository navigation
Kafka
<kafka_dir>/bin/zookeeper-shell.sh localhost:2181 ls /brokers/ids
<kafka_dir>/bin/kafka-topics.sh --create --bootstrap-server <kafka_ip>:<port> --replication-factor 1 --partitions 1 --topic my-topic
<kafka_dir>/bin/kafka-topics.sh --list --bootstrap-server localhost:9092
<kafka_dir>/bin/kafka-topics.sh --describe --bootstrap-server localhost:9092 --topic my-topic
<kafka_dir>/bin/kafka-consumer-groups --all-groups --bootstrap-server <node ip>:9092 --describe
<kafka_dir>/bin/kafka-consumer-groups.sh --group <group name> --bootstrap-server <node ip>:9092 --describe
<kafka_dir>/bin/kafka-topics.sh --zookeeper localhost:2181 --describe --topics-with-overrides
<kafka_dir>/bin/kafka-topics.sh --zookeeper 127.0.0.1:2181 --alter --config retention.ms=43200000 --topic <topic name> --command-config /opt/kafka/config/client-ssl.properties
Add this paramenter in the end of the command:
--command-config /opt/kafka/config/client-ssl.properties
File client-ssl.properties must have:
ssl.truststore.location=/opt/kafka/ssl/kafka-server-172.16.210.113.truststore.p12 ssl.truststore.password=BGHtjekRXBQW8 security.inter.broker.protocol=SSL
For the correct execution of the above commands you should consider that:
- Kafka application directory is /opt/kafka
- Zookeeper is running on 2181 port
- Kafka is running on 9092 port
For more details please consult Kafka quickstart page: https://kafka.apache.org/quickstart