Merge "Added STD sim 2.0.0 tests"
[nonrtric.git] / policy-agent / src / main / java / org / oransc / policyagent / dmaap / DmaapMessageConsumer.java
index e141bab..0ee6213 100644 (file)
@@ -25,7 +25,6 @@ import com.google.gson.JsonArray;
 import com.google.gson.JsonElement;
 import com.google.gson.JsonParser;
 
-import java.io.IOException;
 import java.time.Duration;
 import java.util.ArrayList;
 import java.util.List;
@@ -129,7 +128,7 @@ public class DmaapMessageConsumer {
         return result;
     }
 
-    protected Iterable<String> fetchAllMessages() throws ServiceException, IOException {
+    protected Iterable<String> fetchAllMessages() throws ServiceException {
         String topicUrl = this.applicationConfig.getDmaapConsumerTopicUrl();
         AsyncRestClient consumer = getMessageRouterConsumer();
         ResponseEntity<String> response = consumer.getForEntity(topicUrl).block();
@@ -142,15 +141,16 @@ public class DmaapMessageConsumer {
         }
     }
 
-    private void processMsg(String msg) throws IOException {
+    private void processMsg(String msg) {
         logger.debug("Message Reveived from DMAAP : {}", msg);
         getDmaapMessageHandler().handleDmaapMsg(msg);
     }
 
-    protected DmaapMessageHandler getDmaapMessageHandler() throws IOException {
+    protected DmaapMessageHandler getDmaapMessageHandler() {
         if (this.dmaapMessageHandler == null) {
             String agentBaseUrl = "http://localhost:" + this.localServerHttpPort;
-            AsyncRestClient agentClient = new AsyncRestClient(agentBaseUrl);
+            AsyncRestClient agentClient =
+                new AsyncRestClient(agentBaseUrl, this.applicationConfig.getWebClientConfig());
             AsyncRestClient producer = new AsyncRestClient(this.applicationConfig.getDmaapProducerTopicUrl(),
                 this.applicationConfig.getWebClientConfig());
             this.dmaapMessageHandler = new DmaapMessageHandler(producer, agentClient);