'fanning out' pub sub broadcasts?

I'm looking for a clean approach for 'fanning out' pub sub broadcasts based on relationships. For example, if I have: * teams * team_members - team_id, user_id * users * subscriptions - team_id If a subscription changes, maybe I'd want to broadcast to all users in that team, with a topic like subscriptions:#{user_id}. But I'd need to get user_ids from subscription.team.team_members.user_id, not a direct attribute on subscriptions. Any ideas?
Solution:
I don't think there is any great way to do this declaratively right now. You can add a custom notifier that gets each notification (its just a module that implements the notify option) and broadcast it yourself
Jump to solution
3 Replies
Solution
ZachDaniel
ZachDaniel7d ago
I don't think there is any great way to do this declaratively right now. You can add a custom notifier that gets each notification (its just a module that implements the notify option) and broadcast it yourself
ZachDaniel
ZachDaniel7d ago
though
pikdum
pikdumOP7d ago
Makes sense, that's about what I was thinking too

Did you find this page helpful?