1 of 1 people found this helpful
Like all messages, broadcast messages are sent to a specific subject on the bus. Messages are only delivered to clients who have to subscribed to that subject. So the trick is to define a different subject name for each chat room/channel/conversation. A chat room is a bus subject.
But how does a client know which subject(s) to subscribe to? Well, you could have one conversational service (or RPC service) with a well-known name (like ChatRoomListService) which responds with a list of subject names that the requesting client is allowed to enter.
If you want your chat rooms to be secure, incorporate some securely-generated random hash into each chat room name. As long as the name is impossible to guess, unauthorized clients will not be able to gain access to the messages sent to that subject.