Message brokers can be used without STOMP, for example, RabbitMQ broker , it can be used with several other protocols; HTTP, AMQP, MQTT, AMQP. You can use them as an implementation of JMS.
Since there are multiple instances of the application, the best alternative is indeed a central messaging broker to process messages that should be published to customers of all applications.
Any alternative involves doing something like this manually, the servers in the backend must communicate and inform each other about these events in some way. An alternative would be to write certain events to the database and each server to poll some table, but this is the type of design that we try to avoid.
In addition, with regard to load balancing and web sockets, you must configure a load balancer to allow forwarding of HTTP Upgrade headers, which are usually disabled by default. For example, nginx needs some configuration to allow forwarding of these headers, otherwise Websockets will not work.
In this case, SockJS will automatically use some of the backup options that fire when web sockets are not possible.
Angular university
source share