Question

I'm working on developing an application where clients connect via websockets and there are several modules that are interconnected via messaging on the server side. The server needs to be scalable, have high performance and can be easily made highly available later. We want the server side logic to be split in modules and they need to be connected only via messages. So later we can port the modules to different VM altogether. We also need(later) to persist the messages sent/received by the modules. Also the rate of incoming messages may be higher than the rate the module can work on it, so we need buffering(possibly a queue) on the module's end. ActiveMQ looks like it can server our purpose but all places describe it to be used only in distributed applications. Ours is not. Is using ActiveMQ for communicating between modules within an application an overkill? Any suggestions welcome.

Note: We are using Spring boot, Java, Websockets in our application.

Was it helpful?

Solution

It is very common in Java EE web applications to utilize a JMS subsystem for intra application communication. This makes it easy to scale the application (or prepare for that possiblity..) and is a convenient way to queue asynchronous events for processing.

Your requirement seems very similar and that is legit use case of ActiveMQ imho.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top