Use SimpMessagingTemplate without creating a web socket message broker Spring 4

Viewed 1210

Can I send a message to a message broker using SimpMessagingTemplate#convertAndSendToUser or SimpMessagingTemplate#convertAndSend methods without settings up a websocket message broker using @EnableWebSocketMessageBroker?

What I'm trying to do is utilise one websocket server to provide messaging for two application server instances(One spring 4 and one Spring 3). I created a one web server with Spring 4, Spring boot plus websocket message broker enabled.

Now I want two application servers to push messages to rabbitmq so it will broadcast them to clients subscribed to it.

First issue I faced is if there is no websockt message broker configuration available, SimpMessagingTemplate will not get autowired to application context. I couldn't get it injected without creating a websocket message board either.

Please help me to find out whether this is possible.

BTW I have a previous question unanswered related to this.

1 Answers
Related