I have been looking at ways to dispatch events, and the dispatcher in this thread seems to fit my needs nicely:
His gist here:
I see that it maintains a _lastProcessed Position, but doesn’t seem to store it permanently anywhere. I would think this would be a necessity if the dispatcher dies, etc. What would be the best way to do this? Write to a file? I honestly haven’t used flat file storage for real-time persistence, so am wondering what caveats if any I am missing in terms of best performance/safest way to store _lastProcessed.
Also, this post is from last July, so if there are better solutions, I’d love to hear about them.