Support Questions

Find answers, ask questions, and share your expertise
Announcements
Celebrating as our community reaches 100,000 members! Thank you!

How to remotely produce and consume from the local machine to the kafka broker which is present in the cloud?

avatar
 
1 REPLY 1

avatar
Super Guru

Hi @Kiran Hebbar,

In the below commands, replace the value localhost with ip/hostname of your kafka broker which is in cloud.

kafka/bin/kafka-console-producer.sh \
    --broker-list localhost:9092 \
    --topic my-topic
kafka/bin/kafka-console-consumer.sh \
    --bootstrap-server localhost:9092 \
    --topic my-topic \
    --from-beginning

Thanks,

Aditya