Some basic commands working with Kafka
for additional examples have a look at code_snippets
kafka-topics --create --bootstrap-server localhost:9092 --replication-factor 1 --partitions 1 --topic test_topic
[...]
Created topic Test123.
kafka-topics --list --bootstrap-server localhost:9092
should result in
kafka-topics --list --bootstrap-server localhost:9092
Test123
__consumer_offsets
_confluent-license
_confluent-telemetry-metrics
_confluent_balancer_api_state
_confluent_balancer_broker_samples
kafka-console-producer --broker-list localhost:9092 --topic Test123
kafka-console-consumer --bootstrap-server localhost:9092 --topic Test123 --from-beginning
kafka-topics --bootstrap-server localhost:9092 --topic Test123 --alter --partitions 5
kafka-configs --bootstrap-server localhost:9092 --alter --entity-type topics --entity-name 5_min_topic --add-config retention.ms=300000
kafka-topics --bootstrap-server localhost:9092 --topic Test123 --describe
kafka-topics --bootstrap-server localhost:9092 --describe
kafka-topics --bootstrap-server localhost:9092 --describe --under-replicated-partition