update the credentials in subscribe call
[dmaap/messagerouter/mirroragent.git] / src / main / java / org / onap / dmaap / mr / dmaapMMAgent / MirrorMakerAgent.java
index 23fd99f..61515bc 100644 (file)
@@ -56,7 +56,7 @@ public class MirrorMakerAgent {
        static final Logger logger = Logger.getLogger(MirrorMakerAgent.class);
        Properties mirrorMakerProperties = new Properties();
        ListMirrorMaker mirrorMakers = null;
-       String mmagenthome = "";
+       String mmagenthome = "/opt";
        String kafkahome = "";
        String topicURL = "";
        String topicname = "";
@@ -100,7 +100,7 @@ public class MirrorMakerAgent {
        private boolean checkStartup() {
                FileInputStream input = null;
                try {
-                       this.mmagenthome = System.getProperty("MMAGENTHOME");
+                       //this.mmagenthome = System.getProperty("MMAGENTHOME");
                        input = new FileInputStream(mmagenthome + "/etc/mmagent.config");
                        logger.info("mmagenthome is set :" + mmagenthome + " loading properties at /etc/mmagent.config");
                } catch (IOException ex) {
@@ -139,7 +139,7 @@ public class MirrorMakerAgent {
                        return false;
                }
                logger.info("Published to Topic :" + this.topicname + " Successfully");
-               response = topicUtil.subscribeTopic(topicURL, topicname, "1", response, response);
+               response = topicUtil.subscribeTopic(topicURL, topicname, "1", mechid, password);
                if (response != null && response.startsWith("ERROR:")) {
                        logger.error("Problem subscribing to topic, please verify the config " + this.topicname + " MR URL is:"
                                        + this.topicURL + " Error is:  " + response);