Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
# Run every time you login or update .bash_profile
export KAFKA_HOME=/usr/hdp/current/kafka-broker
# Create topics --create \
--zookeeper,, \
--replication-factor 1 \
--partitions 1 \
--topic kafkadg
# List all topics --list \
# List one topic --list \
--zookeeper,, \
--topic kafkadg --delete \
--zookeeper,, \
--topic testdg
# Command to produce messages, start typing after running this kakfa-console-producer command
# The messages will be stored in topic kafkadg on the host where brokers are running \
--broker-list,, \
--topic kafkadg
# Open another shell and then run kafka-console-consumer command to see streaming messages \
--bootstrap-server,, \
--topic kafkadg \
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.