Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

If I have multiple clients subscribed to a pusher channel, can I have only one of them receive the message?

Tags:

pusher

I have a load balanced situation, in which I have multiple instances running. I'm subscribing to a channel in each instance, but I only want one of them to trigger when a message comes through.

Is there any way to accomplish this?

like image 780
Shamoon Avatar asked Jun 22 '20 12:06

Shamoon


Video Answer


2 Answers

If you want to have different subscribers and some are only interested in a subset of the messages distributed by a your publisher. Then your messaging service must allow subscribers to specify the topics relevant for them and/or inspect the messages and specify the content they are interested in.

like image 182
a_e Avatar answered Sep 28 '22 02:09

a_e


that kind of goes against pub/sub pattern. Even if you added a streaming application in between you channel and your clients, this will still need to read all messages to decide which one to filter out to different clients

like image 23
Luca Mattia Ferrari Avatar answered Sep 28 '22 02:09

Luca Mattia Ferrari



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!