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:

digital tucr said...

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

Anonymous said...

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

machine learning online course

uday pavan said...

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

Stock Market Training in Hyderabad

Logo Designer said...

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

Mobile App Development Company said...

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

Mobile App Development company in Mumbai said...

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

Ankita Singh said...

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

Canon Printer Customer Support said...

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

swapna sri said...

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

Alexa Amazon App said...

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

Hp Support said...

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

Brother Printer Support Number said...

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

Hp printer toll free number said...

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

Danishsingh said...

Thanks for sharing such a great blog Keep posting.
marketing automation software
marketing automation tools India
sales automation
b2b database providers in India
database provider

Dell Printer Toll Free Number said...

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.

steve said...

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.

steve said...

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.

nisha said...

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.

vidya said...

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.

Techsolve Solutions said...

Thanks for sharing useful information. Keep on sharing.

Web design mississauga
Digital marketing agency mississauga

Special Writings said...

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.

Finland Server Hosting said...

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.

kilts for men said...

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.

Quickbooks Support said...

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

Quickbooks Customer Support Service said...

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

Google Blog said...

Nice Information

Link Building SEO Services - Nikke Tech