Adding functionality to check isCoordinator before publish/subscribe