Setting the leads of the Kafka topic to -1 -


i consuming kfka topic on cluster using spark streaming. restrat streaming application , read topic mnessages again.

is there way reset kafka topic leads on cluster?

when describe topics bellow description:

topic:mahditest partitioncount:3        replicationfactor:2     configs:         topic: mahditest        partition: 0    leader: 1020    replicas: 1020,1019     isr: 1020,1019 

but need resent leads -1 each topic can re-read messages.

depends on storing offsets if storing them in kafka using new consumer api in kafka 0.11 can reset kafka consumer's offsets (stored in __consumer_offsets topic) if run

$ kafka-consumer-groups.sh --bootstrap-server localhost:9092 --topic mahditest --group yourconsumer --reset-offsets --to-earliest --execute

you should shut down consumers in group before running reset offsets command

the 0.11 version of command should work reset offsets on 0.10.2 cluster


Comments

Popular posts from this blog

python Tkinter Capturing keyboard events save as one single string -

android - InAppBilling registering BroadcastReceiver in AndroidManifest -

javascript - Z-index in d3.js -