Fixed DmaapListener multiple consumer thread issue
authorshashikanth.vh <shashikanth.vh@huawei.com>
Tue, 16 Jan 2018 13:23:23 +0000 (18:53 +0530)
committerShashikanth VH <shashikanth.vh@huawei.com>
Thu, 18 Jan 2018 05:09:22 +0000 (05:09 +0000)
DmaapListener handleSubscriptions method returns after creating
consumer thread for first subscription string, issue is fixed by
removing return.
https://jira.onap.org/browse/CCSDK-173

Issue-ID: CCSDK-173
Change-Id: I796b000b22762cda0a4f4fa929d5e2aabdcc7e8b
Signed-off-by: shashikanth.vh <shashikanth.vh@huawei.com>
dmaap-listener/src/main/java/org/onap/ccsdk/sli/northbound/dmaapclient/DmaapListener.java

index ce099cd..2be08cb 100644 (file)
@@ -142,11 +142,11 @@ public class DmaapListener {
             }
 
             if (consumerClass != null) {
-                return handleConsumerClass(consumerClass, consumerClassName, propertyPath,
+                handleConsumerClass(consumerClass, consumerClassName, propertyPath,
                     properties, consumers);
             }
         }
-        return false;
+        return !consumers.isEmpty();
     }
 
     private static boolean handleConsumerClass(Class<?> consumerClass, String consumerClassName, String propertyPath,