-
Notifications
You must be signed in to change notification settings - Fork 41.5k
Closed
Description
The auto-configuration for Rabbit Streams looks at the spring.rabbit.stream.*
properties for various settings, sometimes falling back to a more general spring.rabbit
property:
Lines 102 to 115 in 99142db
static EnvironmentBuilder configure(EnvironmentBuilder builder, RabbitProperties properties) { | |
builder.lazyInitialization(true); | |
RabbitProperties.Stream stream = properties.getStream(); | |
PropertyMapper map = PropertyMapper.get(); | |
map.from(stream.getHost()).to(builder::host); | |
map.from(stream.getPort()).to(builder::port); | |
map.from(stream.getVirtualHost()) | |
.as(withFallback(properties::getVirtualHost)) | |
.whenNonNull() | |
.to(builder::virtualHost); | |
map.from(stream.getUsername()).as(withFallback(properties::getUsername)).whenNonNull().to(builder::username); | |
map.from(stream.getPassword()).as(withFallback(properties::getPassword)).whenNonNull().to(builder::password); | |
return builder; | |
} |
This fallback logic is incorrect as it ignores any RabbitConnectionDetails
that may have been defined so, for example, a @ServiceConnection
for Rabbit running in a container won't work correctly when using streams.
Metadata
Metadata
Assignees
Labels
type: bugA general bugA general bug