Create an Apache Kafka topic
In this step, you use the previously created client machine to create a topic on the serverless cluster.
To create a topic and write data to it
-
In the following
export
command, replacemy-endpoint
with the bootstrap-server string you that you saved after you created the cluster. Then, go to thekafka_2.12-2.8.1/bin
directory on the client machine and run theexport
command.export BS=
my-endpoint
Run the following command to create a topic called
msk-serverless-tutorial
.<path-to-your-kafka-installation>
/bin/kafka-topics.sh --bootstrap-server $BS --command-config client.properties --create --topic msk-serverless-tutorial --partitions 6
Next Step
Produce and consume data in MSK Serverless