public RabbitMqSetupService(final RabbitProperties properties) { hostname = properties.getHost(); username = properties.getUsername(); if (StringUtils.isEmpty(username)) { username = DEFAULT_USER; } password = properties.getPassword(); if (StringUtils.isEmpty(password)) { password = DEFAULT_PASSWORD; } }
public RabbitMqSetupService(RabbitProperties properties) { hostname = properties.getHost(); username = properties.getUsername(); if (StringUtils.isEmpty(username)) { username = DEFAULT_USER; } password = properties.getPassword(); if (StringUtils.isEmpty(password)) { password = DEFAULT_PASSWORD; } }
@Override public void onInit() throws Exception { super.onInit(); if (this.clustered) { String[] addresses = StringUtils.commaDelimitedListToStringArray(this.rabbitProperties.getAddresses()); Assert.state(addresses.length == this.adminAddresses.length && addresses.length == this.nodes.length, "'addresses', 'adminAddresses', and 'nodes' properties must have equal length"); this.connectionFactory = new LocalizedQueueConnectionFactory(this.connectionFactory, addresses, this.adminAddresses, this.nodes, this.rabbitProperties.getVirtualHost(), this.rabbitProperties.getUsername(), this.rabbitProperties.getPassword(), this.rabbitProperties.getSsl().isEnabled(), this.rabbitProperties.getSsl().getKeyStore(), this.rabbitProperties.getSsl().getTrustStore(), this.rabbitProperties.getSsl().getKeyStorePassword(), this.rabbitProperties.getSsl().getTrustStorePassword()); this.destroyConnectionFactory = true; } }
@Override public void onInit() throws Exception { super.onInit(); if (this.clustered) { String[] addresses = StringUtils.commaDelimitedListToStringArray(this.rabbitProperties.getAddresses()); Assert.state(addresses.length == this.adminAddresses.length && addresses.length == this.nodes.length, "'addresses', 'adminAddresses', and 'nodes' properties must have equal length"); this.connectionFactory = new LocalizedQueueConnectionFactory(this.connectionFactory, addresses, this.adminAddresses, this.nodes, this.rabbitProperties.getVirtualHost(), this.rabbitProperties.getUsername(), this.rabbitProperties.getPassword(), this.rabbitProperties.getSsl().isEnabled(), this.rabbitProperties.getSsl().getKeyStore(), this.rabbitProperties.getSsl().getTrustStore(), this.rabbitProperties.getSsl().getKeyStorePassword(), this.rabbitProperties.getSsl().getTrustStorePassword()); this.destroyConnectionFactory = true; } }