Topics, partitions, and offsets in Kafka

Поделиться
HTML-код
  • Опубликовано: 4 фев 2025

Комментарии • 23

  • @KnowledgeAmplifier1
    @KnowledgeAmplifier1  2 года назад

    Codes used in the demo :
    --------------------------------------------
    Start Zookeeper:
    ---------------------------
    F:/kafka_2.12-3.2.0/bin/windows/zookeeper-server-start.bat F:/kafka_2.12-3.2.0/config/zookeeper.properties
    Start Kafka-server:
    -----------------------------
    F:/kafka_2.12-3.2.0/bin/windows/kafka-server-start.bat F:/kafka_2.12-3.2.0/config/server.properties
    Create a topic:
    -------------------------
    F:/kafka_2.12-3.2.0/bin/windows/kafka-topics.bat --create --topic demo_testing --bootstrap-server localhost:9092 --replication-factor 1 --partitions 3
    Start Producer:
    --------------------------
    F:/kafka_2.12-3.2.0/bin/windows/kafka-console-producer.bat --topic demo_testing --bootstrap-server localhost:9092
    Start Consumer:
    ----------------------------------
    F:/kafka_2.12-3.2.0/bin/windows/kafka-console-consumer.bat --topic demo_testing --from-beginning --bootstrap-server localhost:9092
    Reading message from specific partition:
    ---------------------------------------------------------------------
    F:/kafka_2.12-3.2.0/bin/windows/kafka-console-consumer.bat --topic demo_testing --from-beginning --bootstrap-server localhost:9092 --partition 2
    Reading message from specific offset inside a specific partition:
    ---------------------------------------------------------------------------------------------------------------
    F:/kafka_2.12-3.2.0/bin/windows/kafka-console-consumer.bat --topic demo_testing --bootstrap-server localhost:9092 --partition 2 --offset 1
    Reading message from specific offset :
    -------------------------------------------------------------------------
    F:/kafka_2.12-3.2.0/bin/windows/kafka-console-consumer.bat --topic demo_testing --bootstrap-server localhost:9092 --offset 0

  • @avinashbasetty-r4d
    @avinashbasetty-r4d Год назад +1

    Explained well. concepts are so clear.
    Below are the topics learned so far -
    1. Verifying multiple partitions in the server logs directory
    2. Checking the offset based on the flag parameter within the partition
    3. Content check for each message within the partition

  • @shreyas-s5g
    @shreyas-s5g Год назад +2

    absolute genius. amazing xplaination sir, thankyou so much.

  • @shobhitarya1637
    @shobhitarya1637 Год назад +1

    Wow, you explained the topics very well with practical as well as with internals. Its a very good tutorial for learning kafka. Thank you .

  • @bigdataprofessional1880
    @bigdataprofessional1880 2 года назад +2

    Crisp explanation, 100% perfect

  • @kamalnayan9157
    @kamalnayan9157 2 года назад +1

    Great work man! Thank you

  • @KeshavDeoSharma
    @KeshavDeoSharma 9 месяцев назад +1

    Thank you Sir

  • @ayansrivastava731
    @ayansrivastava731 Год назад +2

    if someone is using kafka >2.4 , this approach of round robin(random partitioning) will NOT work, instead there is something called sticky partitioner where you'll see all msgs going to same partition. WHY? because we didn't specify keys in the start. The partitioning strategy by kafka has changed.

    • @KnowledgeAmplifier1
      @KnowledgeAmplifier1  Год назад +1

      You are correct Ayan , here are the videos where I have explained the same -- ruclips.net/video/-eo4IPUshRo/видео.htmlsi=o_tQF0TYGE5qFO_D

    • @BOSS-AI-20
      @BOSS-AI-20 Год назад +1

      Thanks, I was also thinking about the same problem

  • @ohuuthai1678
    @ohuuthai1678 8 месяцев назад

    Why does my data only save to partition 0 when I was like you, I tried adding many other input data examples, but it only jumps to partition 0

  • @digitaltechconnect1318
    @digitaltechconnect1318 2 года назад

    Please provide us the session for Confluent Kafka

  • @vigneshr4197
    @vigneshr4197 2 года назад +1

    One kafka producer,two consumer subscribes to kafka topic then how partition works?

    • @KnowledgeAmplifier1
      @KnowledgeAmplifier1  2 года назад

      Hello Vignesh R , you can have a look in this video , I explained your scenario in detail -- ruclips.net/video/yKzdum_vX7k/видео.html
      Hope this will be helpful! Happy Learning

  • @alapysalapylalapy2352
    @alapysalapylalapy2352 2 года назад +1

    Can we connect?

    • @KnowledgeAmplifier1
      @KnowledgeAmplifier1  2 года назад

      Hello Namrata Pathak, please post your doubt here , If I know that topic or have any idea , I will surely reply asap , also for any kafka related doubts , please check this playlist once , might help you if the topic is covered in the playlist already -- ruclips.net/p/PLjfRmoYoxpNrs0VmIq6mOTqXP52RfZdRf

    • @alapysalapylalapy2352
      @alapysalapylalapy2352 2 года назад

      @@KnowledgeAmplifier1 hi i am facing one error with my assignment where to post the picture??

    • @alapysalapylalapy2352
      @alapysalapylalapy2352 2 года назад

      @@KnowledgeAmplifier1 what are the rules of data ingestion i.e Kafka to hdfs in which video it is present??