Kafka Producer Consumer using spring boot | Kafka producer | Kafka Consumer

Поділитися
Вставка
  • Опубліковано 16 гру 2024

КОМЕНТАРІ • 23

  • @deeproy2719
    @deeproy2719 2 роки тому +1

    thank you
    I used docker to run the kafka, but your directions just work fine with that also

  • @Srikanta72
    @Srikanta72 4 роки тому +1

    Quite helpful video. Thanks

  • @chary2933
    @chary2933 3 роки тому

    Excellent

  • @seetaramaraotaduri90
    @seetaramaraotaduri90 4 роки тому +1

    Rajani ia awesome

  • @pavanim6258
    @pavanim6258 3 роки тому +2

    Hi very nice tutorial..if we need to read from multiple topics with different schemas,can we use same listener in consumer?

    • @JavaShastra
      @JavaShastra  3 роки тому +1

      If multiple topics are in same Kafka server then , you can ,
      But if two topics are part of two different server , you need to configure , separately for different servers . already I have done this one will upload .

    • @pavanim6258
      @pavanim6258 3 роки тому +1

      @@JavaShastra ok but schema will be different na for each topic,then how can we use same listener for all topics?

    • @cheenu78
      @cheenu78 3 роки тому

      @@pavanim6258 Guess you may want to use Polymorphism / interfaces and have wrapper methods to retrieve schema specific data

  • @muszic7636
    @muszic7636 3 роки тому +1

    One doubt.. currently in kafkalistener topic name is always same and it will consume from same topic. Is there a way to consume from a particular topic if i pass topic name via api? Assumption all topics are in same kafka server

  • @ashibindal6644
    @ashibindal6644 3 роки тому +2

    Hey , i have created publisher on one port and consumer on one port. Both are running fine separately. How can i link them together? Can you please help me with that

    • @JavaShastra
      @JavaShastra  3 роки тому

      Hi as here it’s running in different ports , you need to configure separate producer factory and consumer factory .

  • @pratapjavasingh3239
    @pratapjavasingh3239 4 роки тому +2

    First of all very nice video's but please tell me one thing Here u are implementing the restcontroller wd Apache Kafka can tell use cases for that videos where we can implement this Kafka concept architectural levels and how we can relate this concept to the project levels then I am very Thankful 😊👍

    • @pratapjavasingh3239
      @pratapjavasingh3239 4 роки тому +1

      Java shastra tell me the use cases bro can u relate this concept at any project levels

    • @JavaShastra
      @JavaShastra  4 роки тому +2

      1. First of all it will , decouple multiple systems .
      2. Real time project scenario :
      1 . We have Adhar , Driving licence ,PAN ,Voter ID. For each document we have separate application or api or portal .
      2. Consider Adhar is the main component . And if any changes in Adhar info like address , email and phone no , then this changes should propagate to all other portals .
      3. How you can achieve :
      First when ever any updates happens in Adhar details . Post that event to queue .
      Eg. you have updated address using UI or rest call in Adhar portal . Then we should post that info or message to queue .
      4. Then all other applications who ever want to update those info , then need to listen that topic and update their DB .
      Example 2:
      Suppose in a insurance project , at each month they will identify who have not paid the premium they want to terminate their policies .
      How we can approach:
      1. Fetch the records those need to be terminated.
      2. Push those lakhs of records to queue .
      3. Read from queue one by one and process .

    • @JavaShastra
      @JavaShastra  4 роки тому

      Check the below comment I have explained , the real-time scenarios .

    • @pratapjavasingh3239
      @pratapjavasingh3239 4 роки тому +1

      @@JavaShastra now thank you so much ❤️👍

    • @80sudha
      @80sudha 3 роки тому

      Excellent and lucid way of describing

  • @ishanalawade2985
    @ishanalawade2985 2 роки тому

    Whenever I post a message I get the following error:
    Can't convert value of class java.lang.String to class org.apache.kafka.common.serialization.ByteArraySerializer specified in value.serializer
    Can you please help me out here. I have followed your entire code

  • @vijayamanchi8781
    @vijayamanchi8781 2 роки тому

    How to share messages to kafka topic via hec event api can u please give some information

    • @JavaShastra
      @JavaShastra  2 роки тому

      I have never come across hec api.