twitter / hbc

A Java HTTP client for consuming Twitter's realtime Streaming API
https://developer.twitter.com/en/docs/tweets/filter-realtime/overview
Apache License 2.0
962 stars 373 forks source link

Sitestream: Add/remove user on reconnect #179

Closed bdeneuter closed 7 years ago

bdeneuter commented 7 years ago

Hi,

With Sitestream you can use a controlstream to add or remove users from the connection. When the client reconnects it will use the list of users at construction time to setup the connection. All users that were removed or added are not handled correctly:

Is this behaviour expected? It seems the client should maintain the correct list of users on the connection and adjust the request parameters correctly?

Kind regards, Bart

bobber205 commented 7 years ago

Sitestream is basically dead, esp for new users, as far as Twitter is concerned. Going to be removed soon my sources tell me.

Not worth fixing probably :(

GoSkyLine commented 7 years ago

I believe the behavior is expected, as when the client reconnects, you get a fresh new stream connection, the given users to the constructor are used as default users(at least one user) to keep new stream connection alive until all users are removed from that stream. Therefore, after client connects, you need to add your users, and then you can remove default user(s) if you want to. And you need to do this everytime client establish a new connection.