3

Spring WebSockets support using an External Message Broker like ActiveMQ Artemis. Usually in production environments, we need the Broker to run in clustered mode. Artemis supports High Availability and Failover like for example an active-passive setup where only one of the broker instances is active at any time (while the other broker instance is on standby).

According to Spring docs https://docs.spring.io/spring-framework/docs/current/reference/html/web.html#websocket-stomp-handle-broker-relay-configure, it is possible in WebSocketConfig to configure a supplier of addresses, instead of a fixed host and port thus indirectly allowing to connect to a cluster. However this example is too abstract, looks like targeting mostly load-balancing/round-robin scenarios and does not mention anything about the ReactorNettyTcpClient behavior if a node becomes unavailable, if timeouts occur how it handles them etc.

So my question is: how can we configure properly WebSockets with ArtemisMQ running in HA mode assuming a 2 node cluster in active-passive mode?

kmandalas
  • 418
  • 1
  • 5
  • 17

0 Answers0