Alex
Alex

Reputation: 1535

WSO2 dynamically checking ESB Worker Node in a cluster

i m using WSO2 ESBs 4.8.1 configured in a cluster. I'm also using an ELB for loadbalancing all the cluster nodes.

In my project requirements i need to know any time how many esb nodes are attached to the elb, so how many nodes are joining the cluster. Is there the possibility to develop an application able to do that using wso2 api?

Thanks.

Upvotes: 1

Views: 133

Answers (1)

Ravindra Ranwala
Ravindra Ranwala

Reputation: 21124

You have to use HazelCast to implement this functionality. I have attached a sample pseudo code below.

// Get the hazel cast inatance.
HazelcastInstance hz = Hazelcast.newHazelcastInstance();
// Then get the cluster information from it.
hz.getCluster().getMembers ().size();

Upvotes: 1

Related Questions