summaryrefslogtreecommitdiffstats
path: root/src/main/java/org/onap/dmaap/dbcapi/service/MirrorMakerService.java
diff options
context:
space:
mode:
authordglFromAtt <dgl@research.att.com>2018-05-24 04:29:30 -0400
committerdglFromAtt <dgl@research.att.com>2018-05-24 04:29:43 -0400
commitad29261e05ff057134d48b7d6a99da1cd07849e0 (patch)
tree9d10eb2c81d84382106664bcef7fcd791c56e770 /src/main/java/org/onap/dmaap/dbcapi/service/MirrorMakerService.java
parent9308e9cbaa6c20a0b171b6524a834ef36feaa9f0 (diff)
Changes for configurable kafka ports
Change-Id: I6b646785584aea75809aa2dae4a36e701e313058 Signed-off-by: dglFromAtt <dgl@research.att.com> Issue-ID: DMAAP-506
Diffstat (limited to 'src/main/java/org/onap/dmaap/dbcapi/service/MirrorMakerService.java')
-rw-r--r--src/main/java/org/onap/dmaap/dbcapi/service/MirrorMakerService.java5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/main/java/org/onap/dmaap/dbcapi/service/MirrorMakerService.java b/src/main/java/org/onap/dmaap/dbcapi/service/MirrorMakerService.java
index 29010b6..a73d981 100644
--- a/src/main/java/org/onap/dmaap/dbcapi/service/MirrorMakerService.java
+++ b/src/main/java/org/onap/dmaap/dbcapi/service/MirrorMakerService.java
@@ -64,6 +64,9 @@ public class MirrorMakerService extends BaseLoggingClass {
DmaapConfig p = (DmaapConfig)DmaapConfig.getConfig();
String provUser = p.getProperty("MM.ProvUserMechId");
String provUserPwd = decryptor.decrypt(p.getProperty( "MM.ProvUserPwd", "notSet" ));
+ String defaultProducerPort = p.getProperty( "MM.KafkaProducerPort", "9092");
+ String defaultConsumerPort = p.getProperty( "MM.KafkaConsumerPort", "2181");
+
prov = new MrTopicConnection( provUser, provUserPwd );
String centralFqdn = p.getProperty("MR.CentralCname", "notSet");
@@ -76,7 +79,7 @@ public class MirrorMakerService extends BaseLoggingClass {
// 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());
+ 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());