How to reset consumer group offset

First run describe on topic to check what it the current LAG its zero in this case

bin/kafka-consumer-groups.sh --bootstrap-server localhost:9092 --describe --group user.kafkaconsumer
Now run following command to just preview what will be the next offset if you reset

bin/kafka-consumer-groups.sh --bootstrap-server localhost:9092 --group user.kafkaconsumer --reset-offsets --to-earliest --all-topics
Shutdown the consumer so that you can restart the consumer Now go back/reset the offset so that it goes back to first message 3bin/kafka-consumer-groups.sh --bootstrap-server localhost:9092 --group user.kafkaconsumer --reset-offsets --to-earliest --all-topics --execute Go back and verify that the consumer offset actually went back by executing following command

bin/kafka-consumer-groups.sh --bootstrap-server localhost:9092 --describe --group user.kafkaconsumer
You should be able to see the offset set back to 22000 which is start of first message in Kafka.

26 comments:

  1. Data Science Certification Courses in Bangalore. ExcelR is the Best Data Science Training Institute in Bangalore with Placement assistance and offers a blended.

    ReplyDelete
  2. Informative !, I would like to hear more from you guys and more blogs to be shared.

    machine learning online course

    ReplyDelete
  3. Great Blog!, please share more blogs that i can go through. to uday.pavaan@gmail.com

    Stock Market Training in Hyderabad

    ReplyDelete
  4. Thanks for sharing great post. Its really useful for me.

    If you want to logo designing services than visit - Logo Designing Services Jaipur | Logo Designer in Jaipur | Logo maker in Jaipur

    ReplyDelete
  5. Thanks for sharing such a great blog... I am impressed with you taking time to post a nice info.
    Mobile App Development Company | Mobile App Development Company in Mumbai

    ReplyDelete
  6. Thanks for sharing valuable Information, I really very impressive on your blog. I hope you continue on blogging job.

    ReplyDelete
  7. Thanks for the List .. It's a good one, I always look forward to seeing your post. These Sites are so useful.
    https://www.bharattaxi.com

    ReplyDelete
  8. For obtaining support for all of your Canon printing problems, you’ll directly contact dial Canon Printer toll free Number to troubleshoot your printer problems in order that you’ll perform your printing tasks simply.

    epson printer support number | hp printer customer support | brother printer support

    ReplyDelete
  9. Thank You! For sharing such a great article, It’s been an amazing article.It provides lot’s of information, I really enjoyed to read this, I hope, I will get these kinds of information on a regular basis from your side.

    Blockchain Development Company in Bangalore
    mobile app development company in bangalore
    iphone app development in Mumbai

    ReplyDelete
  10. Kindle for PC is that the most desirable editions of Windows seven through ten, Windows XP even windows ninety-eight. Kindle app for Pc and laptop has all access to any or all styles of books.it's a touchscreen friendly app for kindle reader for Pc users. The net association is needed to transfer the books from Kindle thus it should be quick because it might be WI-FI or 3G association on download Kindle for Pc.

    Kindleforpc
    Kindle app for pc
    kindle reader for pc
    download kindle for pc
    kindle reader
    amazon kindle for pc

    ReplyDelete
  11. The Very Initial Release variant is Just like this Insider Sluggish. Lots of mates could have the very first re lease empowered and therefore so are pushing out it to beta-testers in your company.
    office.com/Setup
    www.office.com/Setup

    ReplyDelete
  12. If you get any difficulty whilist utilizing Brother Printer, Call Brother printer Toll Free Number and get a relaible solution with no type of delay.
    Brother printer support number | Brother printer support

    ReplyDelete
  13. HP printer support team, they got all skilled and knowledgeable technicians who can troubleshoot any model of printers made by HP.

    Brother printer support | Lexmark Printer Support | Lexmark printer support | Brother Printer Support

    ReplyDelete
  14. We own the technical expertise in handling the growing demand of expert Dell Printer Support services across the world. We have a team of technical experts who provide you instant Dell Printer support to you to help you in resolving your issues with the Dell Printers.

    ReplyDelete
  15. Best Web design and development company in Brampton
    A team of experience and energetic professionals expertise in all sort of web designing, web development, e-commerce and SEO marketing services.

    ReplyDelete
  16. Chauffeur cab service in Melbourne
    Silver Executive Cab is becoming the first choice of the people. It is only because of the best quality chauffeur cars & limos Melbourne. Our own VHA Chauffeur Cars & Limos network Melbourne.

    ReplyDelete
  17. Taman Saraswati Temple and Taman Ayun Temple are the sanchi stupa. Taman Saraswati Temple is dedicated to the Hindu goddess Saraswati. Taman Ayun temple is located on the outskirts of mengwi and there is a garden all around. These both temples are the best stupa sanchi.

    ReplyDelete
  18. Taman Saraswati Temple and Taman Ayun Temple are the famous temples of bali. Taman Saraswati Temple is dedicated to the Hindu goddess Saraswati. Taman Ayun temple is located on the outskirts of mengwi and there is a garden all around. These both temples are the best bali temples of bali.

    ReplyDelete
  19. I acknowledge the point that you want to highlight and think it should be important among the audience. Actually our principal purpose should be to give high-quality content to our blog or web visitors.

    ReplyDelete
  20. Thanks for ones this excellent posting, I actually enjoyed
    reading it, you are a great author. Here I also want to share some information on the best <a href="https://www.finlandserverhosting.com/finland-vps-hosting</a> services for your business website at a very affordable price.

    ReplyDelete
  21. Discover timeless elegance with our men's kilts. From classic tartans to contemporary designs, our kilts blend tradition with modern style. Crafted for comfort and durability, each kilt is a statement piece, reflecting Scottish heritage with a touch of sophistication. Embrace the essence of tradition in every step with our distinguished collection.

    ReplyDelete
  22. Very Interesting Blog ! If you are wondering how to use QuickBooks then our team at

    QuickBooks customer Service
    +1 855-746-5668 24/7. is available for you at affordable price

    ReplyDelete
  23. Great Content ! you have any query related to Software then feel free call at
    QuickBooks customer Service +1 615-523-1036

    ReplyDelete