Hi, when using RealTimeMessaging to push data changes to users who are viewing that data, every subscriber of a channel receives every message, and a client can also send to a channel.
Do you have a recommended best practice for pushing data that not every user is allowed to see?
Multiple channel subscriptions are basically “free” since there’s still only one network channel between browser and server[1].
So we would recommend a naming pattern like, for example: tenantId.role, where the client subscribes to “tenantId” and to "tenantId.role", with possibly multiple subscriptions to different roles for a user that is both a “siteAdmin” and “rootAdmin” or whatever.
If there are userId-specific updates (a record that only a specific user can see), the channel can be named after that userId.
[1] this depends on server configuration. If you’re running a JMS backplane, each “channel” could soak up significant resources - but this is all specific to the messaging backplane in use.