Artemis does support MQTT and you could build a chat application with it though I have not tried connection scaling personally with Artemis. Typically, you need to run multiple instances of a broker to scale connections beyond 10s of thousands and also need to be aware of potential message leak that may happen among the cluster members leading to reduced cluster throughput.
I have architected a couple of connection scaling projects, especially in the betting industry, but having a large number of bidirectional connections, and elastically scaling them up and down depending on the events (for example, you need to jump from a normal load of 2-3K concurrent connections to 100+K when something like Melbourne Cup is on). The solution works on both AWS (or any cloud) and open premise.
I’ve used Solace broker (you can
download the community or evaluation edition) which supports MQTT, AMQP, JMS, REST among other things at scale, each instances of which can support 100K concurrent connections, or smaller connection set, such as 10K per instances if you want elastic scalability with multiple instances (
details)
For getting to millions of connections, you would typically need a 2 tier architecture (same as IoT with device addressing consideration),
- a connection layer, an instance for every n connections (configurable based on elastic scalability considerations)
- a core layer which glues the connectivity later together, so any business logic applications don’t have to connect to a large number of instances
- sophisticated routing between these layers, such that messages can flow from any device to any device irrespective of where it is connected.
For Artemis, you might find this issue log useful -
link. Also, the documentation talks about the challenges with
Slow consumer isolation, so you need to work around that.
** disclaimer - I am a consultant majorly doing Solace projects among other things.
Regards,
Vidyadhar