Could someone suggest what’s the best approach to go about this:
What I like to do is draw a continuous poll (or query) of a database table. And anytime a new update has occurred, I want to push this to the client in a Java application. The idea is users can suggest what data they want to subscribe to and define an event-handler to handle any incoming data.
I therefore need to have the polling being done in the background. But I seem to having trouble with doing this correctly. I’m looking at using a simple event bus for local JVM pub/sub, but I can’t seem to get the asynchronous continuous polling going.