Skip to content

Instantly share code, notes, and snippets.

@luminoso
Last active January 17, 2020 17:21
Show Gist options
  • Save luminoso/483fa4dbc63467bab1c0355347021bf0 to your computer and use it in GitHub Desktop.
Save luminoso/483fa4dbc63467bab1c0355347021bf0 to your computer and use it in GitHub Desktop.
start local kafka server
### Starting Zookeeper
./bin/zookeeper-server-start.sh config/zookeeper.properties
### Starting Kafka
./bin/kafka-server-start.sh config/server.properties
#################################################
### Topic creation
./bin/kafka-topics.sh --create --zookeeper localhost:2181 --replication-factor 1 --partitions 1 --topic ipma.3days_day
#################################################
### Configuration
./bin/kafka-configs.sh --zookeeper localhost:2181 --entity-type topics --alter --entity-name ipma.3days_day --add-config retention.ms=30000
### Checking
./bin/kafka-topics.sh --list --zookeeper localhost:2181
./bin/kafka-console-consumer.sh --bootstrap-server localhost:9092 --topic ipma.3days_day --from-beginning --group testing_deployment
./bin/kafka-topics.sh --describe --bootstrap-server localhost:9092 --topic ipma.3days_day
./bin/kafka-log-dirs.sh --bootstrap-server localhost:9092 --describe --topic-list ipma.3days_day
./bin/kafka-consumer-groups.sh --bootstrap-server localhost:9092 --list
./bin/kafka-consumer-groups.sh --bootstrap-server localhost:9092 --describe --group testing_deployment
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment