Class ClusterEntityChangeRelay

java.lang.Object
com.onec.spring.ClusterEntityChangeRelay

public class ClusterEntityChangeRelay extends Object
Publish side of cross-node live-UI sync: forwards every locally-originated EntityChangedEvent onto the ClusterEventBus so peer nodes can fan it out to their own SSE clients.

It listens for the same EntityChangedEvent every write path already emits (the generic controllers and repository.save/delete), so one relay covers all of them. Events that arrived from other nodes are delivered straight to the local SSE publisher (see the UI starter's cluster bridge) and are never re-published as a Spring event, so this listener only ever sees local originals — there is no relay loop. With the default NoOpClusterEventBus the publish call is inert, so single-node behaviour is unchanged.

  • Constructor Details

    • ClusterEntityChangeRelay

      public ClusterEntityChangeRelay(ClusterEventBus bus)
  • Method Details