Hi Nipuna, What you should use here is "getNodeId()" method in org.wso2.andes.server.cluster.coordination.hazelcast.HazelcastAgent class.
For more details: The ID returned by this method is created in the format "NODE/<host IP>_<Node UUID>". Here, the UUID is generated by Hazelcast and if the node restarts for some reason, as Hasitha mentioned, the Node ID will be changed. Thanks, Sewwandi On Sat, Sep 13, 2014 at 11:14 AM, Hasitha Hiranya <[email protected]> wrote: > Hi, > > Looping in Sewwandi. > This id is unique. But if you restart same node this id is different. > Sewwandi, IMO we need to fix this in such a way that even after the > restart it gives same ID. > > Thanks > > > On Sat, Sep 13, 2014 at 10:35 AM, Asitha Nanayakkara <[email protected]> > wrote: > >> Hi, >> >> You can use HazelcastAgent method getUniqueIdForTheNode() for this. It's >> in the latest code in git [1]. >> @Sewwandi correct me if I'm wrong. >> >> [1] >> https://github.com/wso2-dev/andes/blob/master/modules/andes-core/broker/src/main/java/org/wso2/andes/server/cluster/coordination/hazelcast/HazelcastAgent.java >> >> On Sat, Sep 13, 2014 at 9:23 AM, Nipuna Shanthidewa <[email protected]> >> wrote: >> >>> >>> we want to uniquely identify current server node in MB among other nodes >>> we are going to use IP address and port number for that.Is there any >>> better option than this ? >>> >>> Thanks >>> -- >>> Nipuna Shanthidewa >>> >>> Software Engineering Intern >>> WSO2 Inc. >>> >>> >>> _______________________________________________ >>> Dev mailing list >>> [email protected] >>> http://wso2.org/cgi-bin/mailman/listinfo/dev >>> >>> >> >> >> -- >> *Asitha Nanayakkara* >> Software Engineer >> WSO2, Inc. http://wso2.com/ >> Mob: + 94 77 85 30 682 >> >> >> _______________________________________________ >> Dev mailing list >> [email protected] >> http://wso2.org/cgi-bin/mailman/listinfo/dev >> >> > > > -- > *Hasitha Abeykoon* > Senior Software Engineer; WSO2, Inc.; http://wso2.com > *cell:* *+94 719363063* > *blog: **abeykoon.blogspot.com* <http://abeykoon.blogspot.com> > > -- Sewwandi Perera Software Engineer WSO2 Inc.; http://wso2.com lean.enterprise.middleware mobile: +94-713765098
_______________________________________________ Dev mailing list [email protected] http://wso2.org/cgi-bin/mailman/listinfo/dev
