sasl.client();
sasl.setMechanisms(new String[]{"ANONYMOUS"});
}
if ("amqps".equalsIgnoreCase(address.getScheme())) {
Transport transport = connector.getTransport();
SslDomain domain = makeDomain(address, SslDomain.Mode.CLIENT);
if (_trustedDb != null) {
domain.setPeerAuthentication(SslDomain.VerifyMode.VERIFY_PEER);
//domain.setPeerAuthentication(SslDomain.VerifyMode.VERIFY_PEER_NAME);
} else {
domain.setPeerAuthentication(SslDomain.VerifyMode.ANONYMOUS_PEER);
}
Ssl ssl = transport.ssl(domain);
//ssl.setPeerHostname(host);
}
connection.open();