简体   繁体   English

WSO2动态检查群集中的ESB工作节点

[英]WSO2 dynamically checking ESB Worker Node in a cluster

im using WSO2 ESBs 4.8.1 configured in a cluster. 即时通讯使用在群集中配置的WSO2 ESB 4.8.1。 I'm also using an ELB for loadbalancing all the cluster nodes. 我还使用ELB对所有群集节点进行负载平衡。

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. 在我的项目需求中,我需要随时知道有多少esb节点连接到elb,因此有多少节点正在加入集群。 Is there the possibility to develop an application able to do that using wso2 api? 是否有可能开发能够使用wso2 api做到这一点的应用程序?

Thanks. 谢谢。

You have to use HazelCast to implement this functionality. 您必须使用HazelCast来实现此功能。 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();

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM