Spring.io WebSocket guide: https://spring.io/guides/gs/messaging-stomp-websocket/
This post is highly referenced from the WebSocket guide above by spring.io. The difference is, in this guide, I will show you how to do it across multiple applications. When you use microservices architecture, usually you will have an app as a “front” containing a user interface, and an app on the “back” to process business logic and database-related operations. For example, the use case is: you want your “back” app to send a notification to “front” when the order is completed so that the user can get a pop-up notification alert.
What I’m going to show is how to send WebSocket messages from your “back” app to the “front” app, where both apps based on SpringBoot. We will have 2 apps:
learn-websocket-sender
as the “back”, we will call it “sender”, running on port 8090learn-websocket-receiver
as the “front”, we will call it “receiver”, running on port 8091#spring-boot #stomp #websocket #java #messaging #springboot + websocket across multiple applications