@Subscribe
  public void onClusterComponentsRepoUpdate(ClusterComponentsRepoChangedEvent clusterComponentsRepoChangedEvent) throws AmbariException {
    Long clusterId = clusterComponentsRepoChangedEvent.getClusterId();

    TopologyCluster topologyCluster = new TopologyCluster();
    topologyCluster.setTopologyComponents(getTopologyComponentRepos(clusterId));
    TreeMap<String, TopologyCluster> topologyUpdates = new TreeMap<>();
    topologyUpdates.put(Long.toString(clusterId), topologyCluster);
    TopologyUpdateEvent topologyUpdateEvent = new TopologyUpdateEvent(topologyUpdates, UpdateEventType.UPDATE);
    updateData(topologyUpdateEvent);
  }
Is used during agent registering to provide base info about clusters topology.
@return filled TopologyUpdateEvent with info about all components and hosts in all clusters
ambari-server/src/main/java/org/apache/ambari/server/agent/stomp/TopologyHolder.java