Closed Shankar-khati closed 2 years ago
hey @jondubois can you please look into this issue?? I just want to get count for the channel subscribed by a broker.
@Shankar-khati Thanks for this detailed bug report. It was missing an unsubscribe
call. I've fixed this and integration tests are still passing.
I didn't yet get the time to check if it solves your issue specifically so please let me know (and close this issue) if it did.
The fix was implemented in:
The latest socketcluster/socketcluster:v16.0.3 container image was pushed to DockerHub.
Closed by accident. Please close this issue if it has been fixed.
Thanks @jondubois, I really appreciate it.
@jondubois I just tested with scc-broker-client@8.1.0
, its working amazingly!!
SCC configuration:
1 state
Steps to reproduce.
this.agServer.clients['clientId'].channelSubscriptionsCount
(You will get like 2 for Broker1 and 3 for Broker2)this.agServer.clients['clientId'].channelSubscriptionsCount
=> 5Again check
this.agServer.clients['clientId'].channelSubscriptionsCount
on both channels output will be like.Actual: Broker2 => 5 Broker3 => 2
Expected: Broker2 => 3 Broker3 => 2
Cause of this issue: https://github.com/SocketCluster/scc-broker-client/blob/51054380aaf47a034cc3bc39bed5a8eafbb22821/cluster-broker-client.js#L129 Here you can see we are gracefully closing the channel. But this doesn't send any message to server like unsubscribe does. So Broker channelSubscriptionsCount doesn't gets updated.