0Pricing
WebSockets & Real-Time Systems with Spring · Lesson

Configuring the STOMP Broker Relay

Replace the in-memory simple broker with a STOMP broker relay so Spring forwards messages to a real broker like RabbitMQ for horizontal scaling.

Limits of the Simple Broker

The default enableSimpleBroker keeps subscriptions and message routing in memory on one JVM. It is great for demos but cannot share state across instances, so it does not scale horizontally.

Enter the Broker Relay

A STOMP broker relay tells Spring to forward messages to a dedicated broker (RabbitMQ, ActiveMQ) that speaks STOMP. The broker, not the JVM, now handles routing and fan-out.

All lessons in this course

  1. Need for External Message Brokers
  2. Integrating with RabbitMQ/Kafka
  3. Distributed WebSocket Architectures
  4. Configuring the STOMP Broker Relay
← Back to WebSockets & Real-Time Systems with Spring