Commit 6aebbd6f authored by Roger Berlind's avatar Roger Berlind

made rabbitmq host configurable like in shipping app

parent ca72773d
......@@ -16,10 +16,14 @@ public class RabbitMqConfiguration
{
final static String queueName = "shipping-task";
@Value("${spring.rabbitmq.host}")
private String host;
@Bean
public ConnectionFactory connectionFactory()
{
CachingConnectionFactory connectionFactory = new CachingConnectionFactory("rabbitmq");
CachingConnectionFactory connectionFactory = new CachingConnectionFactory(host);
connectionFactory.setCloseTimeout(5000);
connectionFactory.setConnectionTimeout(5000);
connectionFactory.setUsername("guest");
......
server.port=${port:8080}
spring.rabbitmq.host=rabbitmq
endpoints.health.enabled=false
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