I am using KafkaProducer to send data to storm and when configuring spout I have written below code.
spoutConfig.useStartOffsetTimeIfOffsetOutOfRange=true;
spoutConfig.startOffsetTime=kafka.api.OffsetRequest.LatestTime();
but the problem is when i stop Storm Application(Dev environment) storm loses the data produced by the producer. If i use:
spoutConfig.startOffsetTime=kafka.api.OffsetRequest.ErliestTime()
the data insertion starts from beginning. Here I don't want any data loss if storm goes down still storm should take all data produced by the Producer.
LocalClusters clear their state every time you restart them (it essentially sets up a new Zookeeper cluster every time). They are for testing, not production workloads. This is why your spout is starting over.