} else if (result.getQueueNotFound()) {
//name refers to an exchange
type = AMQDestination.TOPIC_TYPE;
} else {
//both a queue and exchange exist for that name
throw new AMQException("Ambiguous address, please specify queue or topic as node type");
}
dest.setAddressType(type);
dest.rebuildTargetAndSourceNodes(type);
return type;
}