public static void synchronizeSTOMPUpdatePublisher(Injector injector) {
    EventBus agentEventBus = new EventBus();
    EventBus apiEventBus = new EventBus();
    STOMPUpdatePublisher publisher = injector.getInstance(STOMPUpdatePublisher.class);

    replaceSTOMPEventBuses(STOMPUpdatePublisher.class, publisher, agentEventBus, apiEventBus);

    // register common agent event listeners
    registerSTOMPApiListeners(injector, apiEventBus);
  }
Force both {@link EventBus} from {@link STOMPUpdatePublisher} to be serial
and synchronous. Also register the known listeners. Registering known
listeners is necessary since the event bus was replaced.

@param injector
ambari-server/src/main/java/org/apache/ambari/server/utils/EventBusSynchronizer.java