The EventBusBridge lets clients (browsers via SockJS) talk with other subscribers on the EventBus. That means you can send messages directly with Server-side Services or other clients.
You cannot change the permit/firewall rules for the bridge dynamically. But with regular expressions and using UUIDs, you should be able to implement a chat quite easily. Let me give you an example:
The server listens on address chat-server
. The outbound setting in the bridge is set to { "address_re" : "chat-clients\..*" }
. Every client registers a handler on chat-clients.<some_UUID_for_this_client>
and tells the server to send messages addressed to the client to the registered address.
We have written a chat module in Scala, which you can use as a reference.