+ log.Fatalf("Stopping producer due to error: %v", err)
+ }
+
+ retryClient := restclient.CreateRetryClient(cert)
+ kafkaFactory := kafkaclient.KafkaFactoryImpl{BootstrapServer: configuration.KafkaBootstrapServers}
+ distributionClient := restclient.CreateClientWithoutRetry(cert, 10*time.Second)
+
+ jobsManager := jobs.NewJobsManagerImpl(retryClient, configuration.DMaaPMRAddress, kafkaFactory, distributionClient)
+ go startCallbackServer(jobsManager, callbackAddress)
+
+ if err := registerTypesAndProducer(jobsManager, configuration.InfoCoordinatorAddress, callbackAddress, retryClient); err != nil {
+ log.Fatalf("Stopping producer due to: %v", err)
+ }
+ registered = true
+ jobsManager.StartJobsForAllTypes()
+
+ log.Debug("Starting DMaaP Mediator Producer")
+
+ keepProducerAlive()
+}
+
+func validateConfiguration(configuration *config.Config) error {
+ if configuration.InfoProducerHost == "" {
+ return fmt.Errorf("missing INFO_PRODUCER_HOST")