Commit dddf2c00 authored by Stephane Nicoll's avatar Stephane Nicoll

Polish "Expose default RabbitMQ credentials in the metadata"

Closes gh-6863
parent 878a2e1a
......@@ -116,6 +116,20 @@ public class RabbitAutoConfigurationTests {
});
}
@Test
public void testDefaultConnectionFactoryConfiguration() {
this.contextRunner.withUserConfiguration(TestConfiguration.class)
.run((context) -> {
RabbitProperties properties = new RabbitProperties();
com.rabbitmq.client.ConnectionFactory rabbitConnectionFactory = getTargetConnectionFactory(
context);
assertThat(rabbitConnectionFactory.getUsername())
.isEqualTo(properties.getUsername());
assertThat(rabbitConnectionFactory.getPassword())
.isEqualTo(properties.getPassword());
});
}
@Test
public void testConnectionFactoryWithOverrides() {
this.contextRunner.withUserConfiguration(TestConfiguration.class)
......
......@@ -1045,7 +1045,7 @@ content into your application. Rather, pick only the properties that you need.
spring.rabbitmq.listener.simple.retry.stateless=true # Whether or not retry is stateless or stateful.
spring.rabbitmq.listener.simple.transaction-size= # Number of messages to be processed in a transaction. That is, the number of messages between acks. For best results, it should be less than or equal to the prefetch count.
spring.rabbitmq.listener.type=simple # Listener container type.
spring.rabbitmq.password= # Login to authenticate against the broker.
spring.rabbitmq.password=guest # Login to authenticate against the broker.
spring.rabbitmq.port=5672 # RabbitMQ port.
spring.rabbitmq.publisher-confirms=false # Whether to enable publisher confirms.
spring.rabbitmq.publisher-returns=false # Whether to enable publisher returns.
......@@ -1068,7 +1068,7 @@ content into your application. Rather, pick only the properties that you need.
spring.rabbitmq.template.retry.max-interval=10000 # Maximum number of attempts to publish a message.
spring.rabbitmq.template.retry.multiplier=1.0 # Multiplier to apply to the previous publishing retry interval.
spring.rabbitmq.template.routing-key= # Value of a default routing key to use for send operations.
spring.rabbitmq.username= # Login user to authenticate to the broker.
spring.rabbitmq.username=guest # Login user to authenticate to the broker.
spring.rabbitmq.virtual-host= # Virtual host to use when connecting to the broker.
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment