Streaming and changing Track

Dec 1, 2012 at 9:49 PM

Hi,

I have a problem with streaming mode. Streaming works perfectly when I initialize Streaming the first time, with certain hashtags given as Track. The callback gets called OK whenever someone tweets with those given hashtags. But I have a situation when the hashtag list changes from time to time. I try to call CloseStream() to the stored Streaming object and then re-initialize the Streaming again, but seems that only the tweets with the initial hashtags are only causing the callback to fire. Should it work this way or have I misunderstood something?

Coordinator
Dec 1, 2012 at 10:10 PM

Hi,

If you haven't done so yet, can you try instantiating a new TwitterContext when you reset?

@JoeMayo

Dec 1, 2012 at 10:39 PM

Yep, instantiating a new TwitterContext seems to work. I also tried with an AutoResetEvent that waits for the next callback to fire before re-initializing the Streaming object (Keep-Alives seem to fire the event too?). That seemed to work also at least in my initial tests, but I suppose I'll stick to instantiating a new TwitterContext each time. 

Thanks!

Coordinator
Dec 1, 2012 at 10:50 PM
This discussion has been copied to a work item. Click here to go to the work item and continue the discussion.
Coordinator
Dec 1, 2012 at 10:53 PM

Thanks for letting me know. I created a work-item to look at it, but it's good to know there's a work-around.

@JoeMayo