We will create a Confluent Producer using the Confluent console for Confluent Cloud (the same confluent cli is universal for both onpremise and cloud) and produce messages, then we are going to use the consumer to consume messages through the cli.
Lets list the available environments
confluent environment list
then we are going to specify the newly created environment (copy the id of the env)
confluent environment use <id>
Lets list the available kafka clusters for this environment
confluent kafka cluster list
Specify the newly create kafka cluster (copy the id of the cluster)
confluent kafka cluster use <id>
List again the cluster and check if it includes a *
Now lets create a topic test
confluent kafka topic create test
We will need an API Key to be able to send messages
confluent api-key create --resource <cluster ID>
Now lets Produce some messages. Write something and press enter (as many times as you wish) then press ctrl+c to finish
confluent kafka topic produce test --api-key <API key> --api-secret <API secret>
Now lets Read the messages created. Then press ctrl+c to stop
confluent kafka topic consume -b test --api-key <API key> --api-secret <API secret>
Check what happened on the cloud.
End of lab