Unsubscribe from stream-room-messages


I’ve trying to unsubscribe from channels without success on the App that I’m working on.
Basically I call a subscription like this:

  "msg": "sub",
  "name": "stream-room-messages",
  "params": [
  "id": "ddp-reactnative-5"

And then I receive a reply like this:

  "msg": "ready",
  "subs": [

When the user moves to a different screen on the App, I call unsubscribe like this:

  "msg": "nosub",
  "id": "ddp-reactnative-5"

But all I receive is this:

  "msg": "nosub",
  "id": "ddp-reactnative-5"

What am I doing wrong? I tried the versions 0.65.2, 0.66.0 and 0.62.2 but none of them work. Am I missing something?


I have the same issue! Please can someone help? 2 weeks trying solve it…


that response looks ok… Are you just not happy with the reply, or are you still receiving events from that stream after unsubscribing?


I expected to receive a “msg”: “unsub” instead of “nosub”
And yes, I keep getting the events after this.


I think this is because streams are not normal subscriptions.

unsubscribing with streams may actually not be possible.

This is the package behind: https://github.com/RocketChat/meteor-streamer


@aaron.ogle So is this linked to https://github.com/RocketChat/meteor-streamer/issues/3 ?


Looks like that’s exactly the same issue you are coming across


But according to that issue, seems that streams can be removed by calling “stop()”.
Does this mean that Rocket Chat could have something on the unsubscribe method to invoke “stop” when referring a stream @aaron.ogle? Or is it definitely not possible?


I would ask in that issue and ask how one would stop the subscription over websocket/DDP or if its not possible.


Thanks @aaron.ogle. I just asked that. Will wait for some input :slight_smile: