Fixed a DMaaP Request Problem 22/78722/1
authorGuangrong Fu <fu.guangrong@zte.com.cn>
Tue, 19 Feb 2019 02:49:19 +0000 (10:49 +0800)
committerGuangrongFu <fu.guangrong@zte.com.cn>
Tue, 19 Feb 2019 02:49:19 +0000 (10:49 +0800)
Change-Id: I306fc87c86303040bc3b4cf8c23acbf3938da944
Issue-ID: HOLMES-198
Signed-off-by: GuangrongFu <fu.guangrong@zte.com.cn>
dmaap-dsa/src/main/java/org/onap/holmes/dsa/dmaappolling/Subscriber.java

index 16ddc15..b67fc8f 100644 (file)
@@ -57,7 +57,7 @@ public class Subscriber {
      * The number of milliseconds to poll interval time. This should normally be used, and set at
      * 15000 or higher.
      */
      * The number of milliseconds to poll interval time. This should normally be used, and set at
      * 15000 or higher.
      */
-    private int period = 15000;
+    private int period = timeout;
 
     private boolean secure;
     private String topic;
 
     private boolean secure;
     private String topic;
@@ -85,7 +85,7 @@ public class Subscriber {
     private List<String> getDMaaPData() throws Exception {
         String response;
         CloseableHttpClient closeableHttpClient = null;
     private List<String> getDMaaPData() throws Exception {
         String response;
         CloseableHttpClient closeableHttpClient = null;
-        HttpGet httpGet = new HttpGet(url + "/" + consumerGroup + "/" + consumer);
+        HttpGet httpGet = new HttpGet(url + "/" + consumerGroup + "/" + consumer + "?timeout=" + period);
         try {
             closeableHttpClient = HttpsUtils.getHttpClient(timeout);
             HttpResponse httpResponse = HttpsUtils
         try {
             closeableHttpClient = HttpsUtils.getHttpClient(timeout);
             HttpResponse httpResponse = HttpsUtils