Open PhilAndrew opened 10 years ago
As a note, this is now not really such a good implementation as it uses an entire thread, if I'm in Scala I would try to use an Actor so that a whole thread is not used all the time. Although it works.
Also if I'm calling tailTracking.persistToStore(); every time in the loop, this is going to be inefficient. I need to consider a different way to store state.
In MongoDbTailingProcess.java there is: // the loop finished, persist the lastValue just in case we are shutting down // TODO: perhaps add a functionality to persist every N records tailTracking.persistToStore(); }
The problem here is that this code is never reached if I ctrl-c my program, there is no time that the camelTailTracking is persisted to store.
I had to place: tailTracking.persistToStore();
inside the main while loop inside MongoDBTailingProcess.java