bin/
directory after downloading and extracting the Kafka distribution. These tools offer a range of capabilities, including starting and stopping Kafka, managing topics, and handling partitions. To learn how to use each tool, simply run it with no argument or use the --help
argument for detailed instructions.
You can use these tools by creating a configuration file that contains basic connectivity details such as the bootstrap server and a API key. You can use this file with any Kafka tool that accepts a configuration file. Some of the tools that provide a configuration option, and the option to specify the configuration file are listsed in the table that follows:
Kafka Tool | Config property option |
---|---|
kafka-configs.sh | --command-config |
kafka-console-consumer.sh | --consumer.config |
kafka-console-producer.sh | --producer.config |
kafka-consumer-groups.sh | --command-config |
cloud.properties
and save it in a secure location. You will populate this file with credentials to access your StreamNative Cloud account so you must keep in a safe place. Add the following content to the file:
bootstrap.servers
property in the cloud.properties
file.
cloud.properties
file.
test
in your StreamNative Cloud cluster using the kafka-console-producer.sh
tool. The command requires both the configuration file and bootstrap server to be specified as options. Before running this command:
test
exists in your cluster<bootstrap-server>
with your cluster’s actual bootstrap server addresscloud.properties
file locationkafka-console-consumer.sh
tool to read messages from the topic.