0

I would like to track changing keywords on the streaming API (from a java client) without losing tweets in the process - for instance, if I am tracking 'keyword1,keyword2' at this moment, a moment later, I would like to configure the streaming api to track say.. 'keyword1,keyword2,keyword3'. This adds a few problems to the context:

  1. Keyword3 has been newly added, so this would require me to drop the existing streaming connection, and reopen one with the new keywords.
  2. Reconnect would mean that I would lose some tweets on keyword1,keyword2 - I understand that I can use the count keyword to retrieve lost tweets (but this would require elevated access).

So, here are my questions in this context:

  1. Is it possible to track new keywords without reconnecting? Possibly open a new streaming connection (don't think twitter allows that from same IP?), start tracking on the new connection and kill the old connection?
  2. If I do not have elevated access, how do I go about retrieving lost tweets?
  3. Say, I have elevated access, Would I receive lost tweets for 'keyword1,keyword2' or would Twitter fail to give me lost tweets coz the keywords have had changed?
Jay
  • 2,394
  • 11
  • 54
  • 98

1 Answers1

2

I believe the docs say you should open a new connection with this new keyword, and as soon as that is connected disconnect the previous one. If this is done correctly you shouldn't lose any tweets in the process.

Schoentoon
  • 493
  • 3
  • 10
  • cool... if that is it, then I should probably worry about duplicates on the old one (for keyword1,keyword2). May be I should filter out the duplicates and that will do it. – Jay May 22 '12 at 15:36