just a suggestion it would be nice and helpful if you share the link of written code so that if in case any error occurs (Typo or missing any line or keyword) we might refer the code file and correct the error
i have used the below code in android studio with gradle ,and also i have connected with kafka. When ever i run the code i will get error on below line final KafkaProducer producer=new KafkaProducer(props) can u please look after it a give me a solution for it . code: public static void main(String args[]){ Properties props = new Properties(); props.put(ProducerConfig.BOOTSTRAP_SERVERS_CONFIG, "localhost:9092"); props.put(ProducerConfig.KEY_SERIALIZER_CLASS_CONFIG, StringSerializer.class.getName()); props.put(ProducerConfig.VALUE_SERIALIZER_CLASS_CONFIG, JsonSerializer.class.getName()); final KafkaProducer producer=new KafkaProducer(props); ProducerRecordrecord=new ProducerRecord("student","key1","print1"); producer.send(record); producer.flush(); producer.close(); }
Your way of explaining the concepts are amazing.⭐⚡🔥
Thanks a lot 😊
Good initiative, u are so clear,pls make more videos in kafka transactions too and best practices in kafka
I will try my best
Thanks for the nice tutorial
Please make more videos on Kafka like methods used in consumer etc...
just a suggestion it would be nice and helpful if you share the link of written code so that if in case any error occurs (Typo or missing any line or keyword) we might refer the code file and correct the error
Thanks a lot
hello, how do i run kafka in android studio with gradle dependencies
can u please help me with one simple example.
It should be same as intellij
@@Codetuber No ..when ever i create a kafka object its getting crash in android studio
@@Codetuber can u create one small example of a kafka ,how it works on android studio,it will be a helpfull to us
i have used the below code in android studio with gradle ,and also i have connected with kafka.
When ever i run the code i will get error on below line
final KafkaProducer producer=new KafkaProducer(props)
can u please look after it a give me a solution for it .
code:
public static void main(String args[]){
Properties props = new Properties();
props.put(ProducerConfig.BOOTSTRAP_SERVERS_CONFIG, "localhost:9092");
props.put(ProducerConfig.KEY_SERIALIZER_CLASS_CONFIG, StringSerializer.class.getName());
props.put(ProducerConfig.VALUE_SERIALIZER_CLASS_CONFIG, JsonSerializer.class.getName());
final KafkaProducer producer=new KafkaProducer(props);
ProducerRecordrecord=new ProducerRecord("student","key1","print1");
producer.send(record);
producer.flush();
producer.close();
}