Register producer DMaaP mediator producer

Issue-ID: NONRTRIC-584
Signed-off-by: elinuxhenrik <henrik.b.andersson@est.tech>
Change-Id: I7f9d8e6a2f68d13e91706722d171b5f6874bae78
diff --git a/dmaap-mediator-producer/main.go b/dmaap-mediator-producer/main.go
index 240bdbd..d38496f 100644
--- a/dmaap-mediator-producer/main.go
+++ b/dmaap-mediator-producer/main.go
@@ -39,8 +39,11 @@
 	}
 
 	log.Debug("Initializing DMaaP Mediator Producer")
-	if configuration.JobResultUri == "" {
-		log.Fatal("Missing JOB_RESULT_URI")
+	if configuration.InfoJobCallbackUrl == "" {
+		log.Fatal("Missing INFO_JOB_CALLBACK_URL")
+	}
+	if configuration.InfoProducerSupervisionCallbackUrl == "" {
+		log.Fatal("Missing INFO_PRODUCER_SUPERVISION_CALLBACK_URL")
 	}
 
 	registrator := config.NewRegistratorImpl(configuration.InfoCoordinatorAddress)
@@ -51,6 +54,14 @@
 	} else {
 		log.Fatalf("Unable to get types to register due to: %v", err)
 	}
+	producer := config.ProducerRegistrationInfo{
+		InfoProducerSupervisionCallbackUrl: configuration.InfoProducerSupervisionCallbackUrl,
+		SupportedInfoTypes:                 jobtypes.GetSupportedTypes(),
+		InfoJobCallbackUrl:                 configuration.InfoJobCallbackUrl,
+	}
+	if err := registrator.RegisterProducer("DMaaP_Mediator_Producer", &producer); err != nil {
+		log.Fatalf("Unable to register producer due to: %v", err)
+	}
 }
 
 func main() {