Search This Blog

Monday, June 14, 2021

Q36-Q40(Kafka)

Q36. How to create Topics in Kafka?
Q37. How to enforce schema validation in kafka?

==============================================================================
Q36. How to create Topics in Kafka?

Answer:
follow below steps
1. check if java is installed or not? if not install java
2. install kafka is not already installed. 
3. install zookeeper is not already installed. zoo keeper helps to manage brokers. 
4. Go to zookeeper folder and launch zoopkeeper and new terminal window will be alunched. 
5. Go to kafa folder and launch kafka. again a new terminal window will be launched. 
6.  Open another terminal session and run:
$ bin/kafka-topics.sh --create --topic quickstart-events --bootstrap-server localhost:9092

Step 4:
# Start the ZooKeeper service
# Note: Soon, ZooKeeper will no longer be required by Apache Kafka.
$ bin/zookeeper-server-start.sh config/zookeeper.properties

Step 5:
# Start the Kafka broker service
$ bin/kafka-server-start.sh config/server.properties

==============================================================================




==============================================================================





==============================================================================





==============================================================================

No comments:

Post a Comment

Q46-Q50

Q46.  If we have 3 types of constructor in code static, default, parametrized. In which order they will be called.  Q47. What is GAC? Q48.  ...