I worked with Spring for a while to understand that not all incoming requests that I receive in my application are based on HTTP. Some queries are email-based and need email-based responses, others are socket-based (receive notifications when a value changes in my NOSQL store). All of them, although they use more or less the same MVC infrastructure.
So I thought that perhaps back-archiving the application to remove the connection between the controllers and the HTTP infrastructure would help.
The dispatcher should no longer access the controller’s methods, but rather retrieve the request parameters and use them to create an abstract message (or event), which is then placed on the message bus. On the other hand, each controller will sign its actions (instances of the Action class - implementation of the Command template) for different events.
Since I'm new to integrating Spring, JMS, etc., I have no idea which messaging technology to choose. In addition, I am sure that such an architecture has already been developed. Maybe I can't even be on the right track.
I accept all kinds of suggestions on how to proceed.
source share