Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Never persists the tail-tracking to store #1

Open
PhilAndrew opened this issue Mar 1, 2014 · 1 comment
Open

Never persists the tail-tracking to store #1

PhilAndrew opened this issue Mar 1, 2014 · 1 comment

Comments

@PhilAndrew
Copy link

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

@PhilAndrew
Copy link
Author

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant