[VOL-3707] Adding support for multiple onu-adapter and removing the OLT topic from configuration

Change-Id: Ic358a6d3c1b60a9a2bc2163a2ddb5e11c471fdd0
diff --git a/internal/pkg/config/config.go b/internal/pkg/config/config.go
index 6c2283d..75ff11d 100644
--- a/internal/pkg/config/config.go
+++ b/internal/pkg/config/config.go
@@ -41,7 +41,6 @@
 	defaultDisplayVersionOnly   = false
 	defaultAccIncrEvto          = false
 	defaultTopic                = "openonu"
-	defaultOltTopic             = "openolt"
 	defaultCoreTopic            = "rwcore"
 	defaultEventTopic           = "voltha.events"
 	defaultOnunumber            = 1
@@ -78,7 +77,6 @@
 	KVStoreHost                 string
 	KVStorePort                 int
 	Topic                       string
-	OltTopic                    string
 	CoreTopic                   string
 	EventTopic                  string
 	LogLevel                    string
@@ -114,7 +112,6 @@
 		KVStoreHost:                 defaultKvstorehost,
 		KVStorePort:                 defaultKvstoreport,
 		Topic:                       defaultTopic,
-		OltTopic:                    defaultOltTopic,
 		CoreTopic:                   defaultCoreTopic,
 		EventTopic:                  defaultEventTopic,
 		LogLevel:                    defaultLoglevel,
@@ -155,10 +152,7 @@
 	flag.IntVar(&(so.KafkaClusterPort), "kafka_cluster_port", defaultKafkaclusterport, help)
 
 	help = fmt.Sprintf("Open ONU topic")
-	flag.StringVar(&(so.Topic), "adapter_topic", defaultTopic, help)
-
-	help = fmt.Sprintf("Open OLT topic")
-	flag.StringVar(&(so.OltTopic), "olt_adapter_topic", defaultOltTopic, help)
+	baseAdapterTopic := flag.String("adapter_topic", defaultTopic, help)
 
 	help = fmt.Sprintf("Core topic")
 	flag.StringVar(&(so.CoreTopic), "core_topic", defaultCoreTopic, help)
@@ -239,6 +233,8 @@
 		so.InstanceID = containerName
 	}
 
+	so.Topic = fmt.Sprintf("%s_%d", *baseAdapterTopic, int32(so.CurrentReplica))
+
 }
 
 func getContainerInfo() string {