ConfluentKafka-LinuxCommands
ConfluentKafka-LinuxCommands
$ export
JAVA_HOME=/usr/lib/jvm/java-21-openjdk-amd64
$ export PATH=$PATH:$JAVA_HOME/bin
https://docs.confluent.io/platform/current/i
nstallation/installing_cp/zip-tar.html -->
to download the confluent kafka development
environment
Control Center
./control-center-start
/home/kannan/confluent/etc/confluent-control
-center/control-center.properties
Kafka Connect
./connect-distributed
/home/kannan/confluent/etc/schema-registry/c
onnect-avro-distributed.properties
ksqlDB
./ksql-server-start
/home/kannan/confluent/etc/ksqldb/ksql-serve
r.properties
Start Kafka.
./kafka-server-start
/home/kannan/confluent/etc/kafka/server.prop
erties
Kafka Connect
./connect-distributed
/home/kannan/confluent/etc/schema-registry/c
onnect-avro-distributed.properties
ksqlDB
./ksql-server-start
/home/kannan/confluent/etc/ksqldb/ksql-serve
r.properties
To Uninstall
Remove the Confluent directory. For
example, if you have Confluent Platform
7.8.0 installed:
rm -rf $CONFLUENT_HOME
https://docs.confluent.io/platform/current/i
nstallation/installing_cp/scripted-install.h
tml#installing-systemd-unit --> please
check this
https://developer.confluent.io/courses
1. Very simple producer and consumer using
python
https://www.youtube.com/watch?v=NlSEm8JgrZo
https://developer.confluent.io/courses/data-
streaming-systems/overview/
sudo /home/kannan/confluent/bin/kafka-topics
--create --topic test --bootstrap-server
localhost:9092 --replication-factor 1
--partitions 1
sudo
/home/kannan/confluent/bin/kafka-avro-consol
e-producer --topic test \
--broker-list localhost:9092 \
--property
value.schema='{"type":"record","name":"testr
ecord","fields":[{"name":"message","type":"s
tring"}]}'
Supply the below one by one
{"message": "this is a testA"}
{"message": "this is a testB"}
{"message": "this is a testC"}
In another terminal
sudo
/home/kannan/confluent/bin/kafka-avro-consol
e-consumer --topic test --bootstrap-server
localhost:9092 --from-beginning
--------------------------------------------
--------------------------------------------
--------------------------
https://linuxgenie.net/create-python-virtual
-environment-ubuntu-24-04/ --> To install
python virtual environment in ubuntu