Skip to content

Instantly share code, notes, and snippets.

@shiponcs
Last active November 15, 2023 06:37
Show Gist options
  • Save shiponcs/9484abf05625334f3c48181f82ac0ccb to your computer and use it in GitHub Desktop.
Save shiponcs/9484abf05625334f3c48181f82ac0ccb to your computer and use it in GitHub Desktop.
How to run kafka server and client from local machine

First download this and extract it followed by getting inside.

Run Kafka server on local machine

Follow this

Create a topic to the server (running in local machine):

bin/kafka-topics.sh --create --topic quickstart-matin --bootstrap-server localhost:19092

Create a topic to the server (running in remote machine by KubeDB):

bin/kafka-topics.sh --command-config ../kf-notls.properties --create --topic matin --partitions 1 --replication-factor 1 --bootstrap-server localhost:19092

Some more:

kafkacat -C -F ../kf-notls.properties -b  172.105.44.182:9092  -t test
kafkacat -P -F ../kf-notls.properties -b 172.105.44.182:9092  -t test
kafkacat -b localhost:19092 -L -F ../kf-notls.properties
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment