Individual Members of PeerGroup

"Poole, Paul P1" <[email protected]> Wed, 07 Sep 2005 15:38:08 -0400
Newsgroups gmane.comp.java.jxta.user
Message-ID <[email protected]>
Hi all...

I was wondering if some of you could enlighten me on the best way to
send a message to only a few members of a peer group.  I don't want to
propagate the message to every member of a group, just a few of them.  I
know that RendezVousService has a couple of methods that could work... 

One possibility is to use propagateInGroup() with a low TTL (like 1),
but that will probably send to more peers than desired.  

Another possibility, is to get an enumeration of the peerIDs currently
connected to the rendezvous and then use a subset of that with the
RendezvousService method propagate(Enumeration destPeerIds, Message msg,
String serviceName, String serviceParam, int ttl).  However, the API
states that this method is very expensive. Is it still expensive if I
only use 2 or 3 peers?

Are there are any better solutions?

Thanks in advance for your insight!

Paul Poole 
Software Engineer 
Lockheed Martin