I have a simple distributable chat application. It works with MySQL backend exposed thru REST API servlets. Client is written in HTML / JS using websockets with SockJS and STOMP protocol connecting to RabbitMQ server. I would like to expose RabbitMQ server also thru the java backend, is there a way to do it with a servlet?
I found some tutorials how to do this with Spring, but I don't want to rewrite the whole application just because of this. Maybe there is some way to use only Spring AMQP I'm missing...
I managed to create SockJS servlet endpoint using https://github.com/projectodd/sockjs-servlet, but the server endpoint is build once when deploying application, when I don't know anything. I would like to build endpoint based on URL (e.g. localhost/ws/room-4 to create endpoint for ROOM id#4, where you can listen for incoming messages).