I'm using Twitter4J's streaming API, and I want to change the set of terms over time.
I'm using this code (scala):
def refresh_stream = {
stream.shutdown()
refresh_filter
stream.filter(filt)
}
This throws lots of "Too many login attempts in a short period of time" errors.
If I try without the shutdown(), or with cleanUp(), the results are similar (it's nondeterministic from my end).
Is there a clean and safe way to switch query terms, ideally without missing any tweets?
Do others observe the same behaviour? I'm running on Java 7.40 on OSX in case that helps.
(I'm aware of this question, but it's old, and the answers don't seem to apply.)