You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Old subs from previous connection are never resubscribed. #800
Hey @bryaan, can you provide a little more information about what you're seeing and how I can reproduce this? I just wanted to more sure I can reproduce it and verify the fix.
It seems if i set reconnects to 0 and write a loop for connect and manually resub it works. So the issue looks confirmed with the internal resub logic.
Actually there seems to be another issue at work. I am subscribing to 4000+ symbols, the ws seems to either stop processing after some point or it's disconnecting and not returning. I turned on verbose logging to see if I can narrow it down.
Hey @bryaan, another option might be to something like subscribing to * all tickers and then in your code narrowing it down to what you're interested in. I remember doing something similar way back and it seemed to be easier to do it that way. Just less complex code handling everything. Then, you'll just have a map or something that quickly checks to see if the ticker you're seeing from the websocket is the ticker you're interested in. I guess it depends on what you're doing but for all of NASDAQ and NYSE it's something like 5300 tickers. So, you're almost looking at everything anyways.
Activity
justinpolygon commentedon Dec 4, 2024
Hey @bryaan, can you provide a little more information about what you're seeing and how I can reproduce this? I just wanted to more sure I can reproduce it and verify the fix.
bryaan commentedon Dec 4, 2024
If the websocket disconnects and retries and succeeds, the old subs are not resubbed.
justinpolygon commentedon Dec 4, 2024
Perfect, thanks @bryaan. I'll check it out.
bryaan commentedon Dec 4, 2024
It seems if i set reconnects to 0 and write a loop for connect and manually resub it works. So the issue looks confirmed with the internal resub logic.
justinpolygon commentedon Dec 4, 2024
Cool, thanks for checking @bryaan.
bryaan commentedon Dec 4, 2024
Actually there seems to be another issue at work. I am subscribing to 4000+ symbols, the ws seems to either stop processing after some point or it's disconnecting and not returning. I turned on verbose logging to see if I can narrow it down.
justinpolygon commentedon Dec 4, 2024
Hey @bryaan, another option might be to something like subscribing to
*all tickers and then in your code narrowing it down to what you're interested in. I remember doing something similar way back and it seemed to be easier to do it that way. Just less complex code handling everything. Then, you'll just have a map or something that quickly checks to see if the ticker you're seeing from the websocket is the ticker you're interested in. I guess it depends on what you're doing but for all of NASDAQ and NYSE it's something like 5300 tickers. So, you're almost looking at everything anyways.bryaan commentedon Dec 4, 2024
But why would your suggestion work and this does not? I'm subbing like this:
Could it be a server error where they are keeping the connection open but not sending data?
fix: keep pending WebSocket subscriptions across a reconnect