diff --git a/components/mediation/tasks/org.wso2.micro.integrator.ntask.core/src/main/java/org/wso2/micro/integrator/ntask/coordination/task/TaskEventListener.java b/components/mediation/tasks/org.wso2.micro.integrator.ntask.core/src/main/java/org/wso2/micro/integrator/ntask/coordination/task/TaskEventListener.java index a43730e470..89346562d5 100644 --- a/components/mediation/tasks/org.wso2.micro.integrator.ntask.core/src/main/java/org/wso2/micro/integrator/ntask/coordination/task/TaskEventListener.java +++ b/components/mediation/tasks/org.wso2.micro.integrator.ntask.core/src/main/java/org/wso2/micro/integrator/ntask/coordination/task/TaskEventListener.java @@ -112,6 +112,7 @@ public void becameUnresponsive(String nodeId) { ScheduledExecutorService taskScheduler = dataHolder.getTaskScheduler(); if (taskScheduler != null) { LOG.info("Shutting down coordinated task scheduler scheduler since the node became unresponsive."); + // Shutdown the task scheduler forcefully since node became unresponsive and need to avoid task duplication. taskScheduler.shutdownNow(); dataHolder.setTaskScheduler(null); } diff --git a/components/org.wso2.micro.integrator.coordination/src/main/java/org/wso2/micro/integrator/coordination/RDBMSCommunicationBusContextImpl.java b/components/org.wso2.micro.integrator.coordination/src/main/java/org/wso2/micro/integrator/coordination/RDBMSCommunicationBusContextImpl.java index d4744a0de6..f470c2fb5b 100644 --- a/components/org.wso2.micro.integrator.coordination/src/main/java/org/wso2/micro/integrator/coordination/RDBMSCommunicationBusContextImpl.java +++ b/components/org.wso2.micro.integrator.coordination/src/main/java/org/wso2/micro/integrator/coordination/RDBMSCommunicationBusContextImpl.java @@ -97,11 +97,7 @@ public void storeMembershipEvent(String changedMember, String groupId, List