// remote instances will be received by self.
channel.setDiscardOwnMessages(true);
// if we have a TopologyAwareConsistentHash, we need to set our own address generator in JGroups:
if(configuration.hasTopologyInfo()) {
((JChannel)channel).setAddressGenerator(new AddressGenerator() {
public org.jgroups.Address generateAddress() {
return TopologyUUID.randomUUID(channel.getName(),
configuration.getSiteId(), configuration.getRackId(), configuration.getMachineId());