O'Reilly logo

Spring MVC Cookbook by Alex Bretet

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Streaming social events with STOMP over SockJS

In this recipe, we broadcast user activities (events) with STOMP over SockJS. SockJS provides a custom implementation of WebSocket.

Getting ready

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.

How to do it…

  1. From the Git Perspective in Eclipse, checkout the latest version of the branch v8.1.x.
  2. Run the Maven clean and Maven install commands on the zipcloud-parent project (right-click on the project, select Run as… | Maven Clean, then select ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required