-
- // in 1610, MM should only exist for edge-to-central
- // we use a cname for the central MR cluster that is active, and provision on agent topic on that target
- // but only send 1 message so MM Agents can read it relying on kafka delivery
- for( MR_Cluster central: clusters.getCentralClusters() ) {
- prov.makeTopicConnection(central, dmaap.getBridgeAdminFqtn(), centralFqdn );
- ApiError resp = prov.doPostMessage(mm.createMirrorMaker( defaultConsumerPort, defaultProducerPort ));
- if ( ! resp.is2xx() ) {
-
- errorLogger.error( DmaapbcLogMessageEnum.MM_PUBLISH_ERROR, "create MM", Integer.toString(resp.getCode()), resp.getMessage());
- mm.setStatus(DmaapObject_Status.INVALID);
- } else {
- prov.makeTopicConnection(central, dmaap.getBridgeAdminFqtn(), centralFqdn );
- resp = prov.doPostMessage(mm.getWhitelistUpdateJSON());
- if ( ! resp.is2xx()) {
- errorLogger.error( DmaapbcLogMessageEnum.MM_PUBLISH_ERROR,"MR Bridge", Integer.toString(resp.getCode()), resp.getMessage());
- mm.setStatus(DmaapObject_Status.INVALID);
- } else {
- mm.setStatus(DmaapObject_Status.VALID);
- }
- }
-
- // we only want to send one message even if there are multiple central clusters
- break;