Skip to content

ignatenko-denis/kafka-as-persistent-cache

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 

Repository files navigation

kafka-as-persistent-cache

# Run Zookeeper
bin/zookeeper-server-start.sh config/zookeeper.properties

# Run Kafka 
bin/kafka-server-start.sh config/server.properties

# Show topics
bin/kafka-topics.sh --list --bootstrap-server localhost:9092

# Write some events into the topic
bin/kafka-console-producer.sh --topic storage-topic --bootstrap-server localhost:9092

# For example
# key1:value1
# key2:value2
# key3:value3

# Read the events
bin/kafka-console-consumer.sh --topic storage-topic --from-beginning --property print.key=true --property print.value=true --bootstrap-server localhost:9092

# Terminate the kafka environment
# Remove log, topics, everything
rm -rf /tmp/kafka-logs /tmp/zookeeper

Application links, for testing