Is it possible to create rooms with STOMP and Spring 4? Socket.IO has rooms built in, so I'm wondering if Spring has this
My code at the moment:
@MessageMapping("/room/greet/{room}")
@SendTo("/room/{room}")
public Greeting greet(@DestinationVariable String room, HelloMessage message) throws Exception {
return new Greeting("Hello, " + room + "!");
}
It would be ideal to have @SendTo("/room/{room}")
however, I am limited to:
@SendTo("/room/room1")
@SendTo("/room/room2")
@SendTo("/room/room3")
etc...which is VERY VERY unideal
The client is:
stompClient.subscribe('/room/' + roomID, function(greeting){
showGreeting(JSON.parse(greeting.body).content);
});
where roomID can be room1, room2, or room3... What If I want more rooms? It feels like such a pain right now