summaryrefslogtreecommitdiffstats
path: root/adapters/mso-openstack-adapters/src/main/java
diff options
context:
space:
mode:
authorBoslet, Cory <cory.boslet@att.com>2020-06-25 08:49:10 -0400
committerBenjamin, Max (mb388a) <mb388a@att.com>2020-06-25 08:49:10 -0400
commit0a430810ec28976d53edf371382c781515937920 (patch)
tree1a5a0572b297f100245f2e44c50fd71667a99214 /adapters/mso-openstack-adapters/src/main/java
parent9f4721c6858cd3dc1b94b22febd2fe5e38f8de3c (diff)
Loop over max clients to fix topic not getting
Loop over max clients to fix topic not getting subscribed. Issue-ID: SO-3007 Signed-off-by: Benjamin, Max (mb388a) <mb388a@att.com> Change-Id: I8a63fed874946528d1318bfa2e10e663c688444b
Diffstat (limited to 'adapters/mso-openstack-adapters/src/main/java')
-rw-r--r--adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/inventory/delete/DeleteInventoryService.java10
1 files changed, 5 insertions, 5 deletions
diff --git a/adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/inventory/delete/DeleteInventoryService.java b/adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/inventory/delete/DeleteInventoryService.java
index b104c3310c..4d8c74dbfe 100644
--- a/adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/inventory/delete/DeleteInventoryService.java
+++ b/adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/inventory/delete/DeleteInventoryService.java
@@ -21,7 +21,6 @@
package org.onap.so.adapters.inventory.delete;
import javax.annotation.PostConstruct;
-import org.camunda.bpm.client.ExternalTaskClient;
import org.onap.so.utils.ExternalTaskServiceUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Profile;
@@ -43,10 +42,11 @@ public class DeleteInventoryService {
@PostConstruct
public void auditAAIInventory() throws Exception {
- ExternalTaskClient client = externalTaskServiceUtils.createExternalTaskClient();
- client.subscribe("InventoryDelete")
- .lockDuration(Long.parseLong(env.getProperty("mso.audit.lock-time", "60000")))
- .handler(deleteInventory::executeExternalTask).open();
+ for (int i = 0; i < externalTaskServiceUtils.getMaxClients(); i++) {
+ externalTaskServiceUtils.createExternalTaskClient().subscribe("InventoryDelete")
+ .lockDuration(Long.parseLong(env.getProperty("mso.audit.lock-time", "60000")))
+ .handler(deleteInventory::executeExternalTask).open();
+ }
}
}