Poll MR and send messages to consumers
Issue-ID: NONRTRIC-586
Signed-off-by: elinuxhenrik <henrik.b.andersson@est.tech>
Change-Id: I7e261aedb1a528c193390f6a3e99a49d7783d35e
diff --git a/dmaap-mediator-producer/main.go b/dmaap-mediator-producer/main.go
index 3fe92dc..47e12e9 100644
--- a/dmaap-mediator-producer/main.go
+++ b/dmaap-mediator-producer/main.go
@@ -76,7 +76,7 @@
wg := new(sync.WaitGroup)
// add two goroutines to `wg` WaitGroup, one for each avilable server
- wg.Add(2)
+ wg.Add(3)
log.Debugf("Starting status callback server at port %v", configuration.InfoProducerSupervisionCallbackPort)
go func() {
@@ -91,6 +91,11 @@
wg.Done()
}()
+ go func() {
+ jobs.RunJobs(fmt.Sprintf("%v:%v", configuration.MRHost, configuration.MRPort))
+ wg.Done()
+ }()
+
// wait until WaitGroup is done
wg.Wait()
log.Debug("Stopping DMaaP Mediator Producer")