Hi Pumudu, I think we have to do the clean up in both places. Case 1 is required when the only node in the cluster leaves and come back. Case 2 is required when a single node leaves in a multi node cluster.
On Wed, Aug 12, 2015 at 5:38 PM, Pumudu Ruhunage <pum...@wso2.com> wrote: > Hi, > > Currently if MB node got killed unexpectedly non-durable topic > subscriptions bind to that node will remain in cluster. This can cause > unexpected behaviors in cluster since that node has already removed. > > IMO these topic subscriptions can clean up in two methods. > > 1. During each MB node start up, remove all non-durable topic > subscriptions for it's local node id. (This will ensure newly started node > won't receive any non-durable topic messages related to previously killed > MB node with same node id) > I think we can do this in org.wso2.andes.kernel.AndesKernelBoot or in a similar class. May be we can do this similar to the way we do the slot recovery task. > > 2. Cluster coordinator should remove all non-durable topic subscriptions > when a member left from cluster. (This can be a problem if coordinator node > killed. If there's a method to get previous coordinator node id by newly > elected coordinator this method can be implemented) > For this case we can do the clean up in org.wso2.andes.server.cluster.ClusterManager#memberRemoved method after checking if the current node is the coordinator. This will work even if the coordinator node get killed. > > How should we do the clean up. WDYT? > > Regards, > Pumudu > -- > Pumudu Ruhunage > Associate Software Engineer | WSO2 Inc > M: +94 779 664493 | http://wso2.com > > _______________________________________________ > Dev mailing list > Dev@wso2.org > http://wso2.org/cgi-bin/mailman/listinfo/dev > > -- Asanka Abeyweera Software Engineer WSO2 Inc. Phone: +94 712228648 Blog: a5anka.github.io
_______________________________________________ Dev mailing list Dev@wso2.org http://wso2.org/cgi-bin/mailman/listinfo/dev