0

There are three clients (A, B, C).

I need A to push a message that only B responds to.

channel.push("call", { "device_id": clientBdeviceId });

Is there a scalable way to only send a message to B and not to all clients?

Afshin Moazami
  • 2,092
  • 5
  • 33
  • 55
bigpotato
  • 26,262
  • 56
  • 178
  • 334
  • You could have B listen to it's own topic. Something like `message:user_id`. That way, only B would get the message, because it wouldn't be sent to other users. – Justin Wood Dec 05 '16 at 17:19
  • oooo how would I be able to push a message to this topic from A? – bigpotato Dec 05 '16 at 17:20
  • 1
    Possible duplicate of [Phoenix channels: send push to a particular client](http://stackoverflow.com/questions/37680988/phoenix-channels-send-push-to-a-particular-client) – Justin Wood Dec 05 '16 at 18:03

0 Answers0