We can send a message to the co-ordinator using the Message() object. Here we have to set the sender address and the receiver address. If I want to send a message to the co-ordinator, then I can take the get(0) member from the view and use that as the destination addresss. But how do I set the sender address, should I use the IP address of my current machine, the MAC address or some other address?
You don't need to set the sender's address; the stack will fill it in for you.
Just to add you can do a point to point as well
Address newAddress = getAddress();
org.jgroups.Message performMessage = new org.jgroups.Message();
performMessage.setDest(newAddress);
getChannel.send(performMessage);
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.