Our Community is getting an upgrade! To get everything ready for the relaunch, we’ll be placing the site in read-only mode starting September 21st.
We really appreciate your understanding while we get things set up behind the scenes. Catch up on all the exciting details about the move here.
Need help or have questions? Drop us a line at [email protected]
Created 05-31-2018 03:27 PM
I'm using kafka 0.11. I'm trying to reset the offset of a topic in a consumer group but don't see consistency among the option. How is the offset calculated for different options in kafka-consumer-groups ?
user1@xxxxxxxxxxxx:~$ kafka-consumer-groups.sh --bootstrap-server xxxxxxxxxxxx.devkafka.com:9092 --group testgroup --reset-offsets--by-duration PT1H30M0S--topic Test_Upgrade --export --command-config client.properties 2>/dev/null
Test_Upgrade,1,615
Test_Upgrade,0,625
user1@xxxxxxxxxxxx:~$ dateThu May 31 15:30:45 BST 2018
user1@xxxxxxxxxxx:~$ kafka-consumer-groups.sh --bootstrap-server xxxxxxxxxxxx.devkafka.com:9092 --group testgroup --reset-offsets--to-datetime 2018-05-31T14:00:00.000--topic Test_Upgrade --export --command-config client.properties 2>/dev/null
Test_Upgrade,1,754
Test_Upgrade,0,772
Created 05-31-2018 09:27 PM
by-duration is specified relative to the current time, but --to-datetime is in UTC unless otherwise specified. Since you are on BST (British Summer Time), you'd need to use UTC+1, specifying "--to-datetime 2018-05-31T14:00:00.000+01" to get the same result - assuming I have my ISO standards right...
Created 05-31-2018 09:27 PM
by-duration is specified relative to the current time, but --to-datetime is in UTC unless otherwise specified. Since you are on BST (British Summer Time), you'd need to use UTC+1, specifying "--to-datetime 2018-05-31T14:00:00.000+01" to get the same result - assuming I have my ISO standards right...
Created 06-01-2018 10:16 AM
Thanks @William Brooks will try that. From my initial checks, it seems working
Created 06-01-2018 01:10 PM
Glad it worked! If this answer helps, please mark it as an accepted answer, too!