Fix Rabbit binder compiliation issues

This commit is contained in:
Soby Chacko
2024-10-14 14:19:45 -04:00
parent d9326ada75
commit bf9ea9e626
2 changed files with 4 additions and 3 deletions

View File

@@ -252,7 +252,7 @@ public class RabbitMessageChannelBinder extends
super.onInit();
if (this.clustered) {
String[] addresses = StringUtils.commaDelimitedListToStringArray(
this.rabbitProperties.getAddresses());
StringUtils.collectionToDelimitedString(this.rabbitProperties.getAddresses(), ","));
Assert.state(
addresses.length == this.adminAddresses.length

View File

@@ -72,8 +72,9 @@ public class RabbitBinderConfiguration {
ConfigurableApplicationContext applicationContext,
RabbitProperties rabbitProperties) throws Exception {
if (StringUtils.hasText(rabbitProperties.getAddresses())) {
connectionFactory.setAddresses(rabbitProperties.determineAddresses());
String addressesText = StringUtils.collectionToDelimitedString(rabbitProperties.getAddresses(), ",");
if (StringUtils.hasText(addressesText)) {
connectionFactory.setAddresses(addressesText);
}
connectionFactory.setPublisherConfirmType(rabbitProperties.getPublisherConfirmType() == null ? ConfirmType.NONE : rabbitProperties.getPublisherConfirmType());