In this recipe, we broadcast user activities (events) with STOMP over SockJS. SockJS provides a custom implementation of WebSocket.
There is some configuration work to be done beforehand, especially on the Apache HTTP proxy. After that, we will see how to initiate a WebSocket with SockJS and with AngularJS on the client side.
Our WebSocket will subscribe to a topic (for broadcasting) published via Spring from the cloudstreetmarket-api
module.
From the Git Perspective in Eclipse, checkout the latest version of the branch
v8.1.x
.Run the
Maven clean
andMaven install
commands on thezipcloud-parent
project (right-click on the project, select Run as… | Maven Clean, then select Run as… | Maven Install). After this, operate a Maven | Update Project to synchronize Eclipse with the Maven configuration (right-click on the project and then click Maven | Update Project…).Similarly, run the Maven clean and Maven install commands...