I have N
subscribers to a Publisher. The message is a simple boolean value. The messaging pattern is slightly different from the regular PUB/SUB
:
- When one subscriber receives a
true
, all the other subscribers are supposed to receive afalse
.
So I would love to publish a false
to all but one subscriber. This exceptional subscriber is not fixed, but selected by user.
One idea I have right now is to PUB/SUB
a false
to all, then send a true
to the exceptional subscriber with a PUSH/PULL
or PAIR/PAIR
pattern. But this feels like a hack.
Will there be an easy solution based on PUB/SUB
pattern instead of looping through a 1-to-1 pattern?