I\'am new to apache kafka and I\'am trying to use it on android studio in order to produce data to my server located on my pc using codes from A simple Kafka Consumer and Pr
I figured out that we cannot create kafka in android. It is better to create an application for kafka that exposes REST end points, which can be later called in android app. You can create it in any language or framework, I have done it in spring boot and it is working fine.
https://github.com/vpkeerthan/Kafka/tree/master/KafkaRestService
Android app using RESTful endpoints exposed for kafka services https://github.com/vpkeerthan/Android-Tutorial/tree/master/Kafka-REST-Android
You wouldn't. This would be insecure. You'd send a request to a webservice, and it would send data to Kafka. Anything else would require your Kafka servers to be public with the authentication info in the app, which is basically then open to anyone.