Support "Empty" from DMaap Simulator

Change-Id: Idaf9f5df34017aad6c7f2a3aa1e65b971ff5d5bc
Issue-ID: DCAEGEN2-1361
Signed-off-by: Marcin Migdal <marcin.migdal@nokia.com>
diff --git a/prh-app-server/src/main/java/org/onap/dcaegen2/services/prh/service/DmaapConsumerJsonParser.java b/prh-app-server/src/main/java/org/onap/dcaegen2/services/prh/service/DmaapConsumerJsonParser.java
index d9a673c..531a8e5 100644
--- a/prh-app-server/src/main/java/org/onap/dcaegen2/services/prh/service/DmaapConsumerJsonParser.java
+++ b/prh-app-server/src/main/java/org/onap/dcaegen2/services/prh/service/DmaapConsumerJsonParser.java
@@ -24,6 +24,7 @@
 import com.google.gson.JsonElement;
 import com.google.gson.JsonObject;
 import com.google.gson.JsonParser;
+import com.google.gson.JsonPrimitive;
 import org.onap.dcaegen2.services.prh.exceptions.DmaapNotFoundException;
 import org.onap.dcaegen2.services.prh.model.ConsumerDmaapModel;
 import org.onap.dcaegen2.services.prh.model.ImmutableConsumerDmaapModel;
@@ -87,6 +88,11 @@
 
         LOGGER.debug("DmaapConsumerJsonParser input for parsing: {}",jsonElement);
 
+        if(jsonElement instanceof JsonPrimitive) {
+            LOGGER.debug("Response from DMaaP is Json primitive {}", jsonElement);
+            return Flux.empty();
+        }
+
         if(jsonElement instanceof JsonObject)
             return create(Flux.just((JsonObject) jsonElement));