We have an application that uses ARI4Java.
The application is supposed to handle hundreds of callers and dozens of bridges.
We have written it so that it connects to Asterisk across 12 web sockets.
Each web socket must connect to a different stasis app, so we have set up a single extension with a dial plan that randomly selects which stasis application will receive the caller.
This works pretty well, but the problem is with bridge messages. Each web socket that deals with a given bridge becomes subscribed to that bridge and we start to receive messages on different sockets for each event, this causes multiple recording finished messages, playback started, etc…
The question is, is it necessary to have so many different web sockets, or will a single web socket handle the messaging for thousands of events?