diff --git a/sylvilagus/scala/src/main/scala/com/meatballhat/sylvilagus/ch02/HelloWorldConsumer.scala b/sylvilagus/scala/src/main/scala/com/meatballhat/sylvilagus/ch02/HelloWorldConsumer.scala index d47851b..e6c4497 100644 --- a/sylvilagus/scala/src/main/scala/com/meatballhat/sylvilagus/ch02/HelloWorldConsumer.scala +++ b/sylvilagus/scala/src/main/scala/com/meatballhat/sylvilagus/ch02/HelloWorldConsumer.scala @@ -4,7 +4,7 @@ import com.rabbitmq.client._ object HelloWorldConsumer extends App { val factory = new ConnectionFactory() - factory.setUri("amqp://guest:guest@localhost:5672") + factory.setUri(sys.env("SYLVILAGUS_AMQP_URI")) val connection = factory.newConnection val channel = connection.createChannel diff --git a/sylvilagus/scala/src/main/scala/com/meatballhat/sylvilagus/ch02/HelloWorldProducer.scala b/sylvilagus/scala/src/main/scala/com/meatballhat/sylvilagus/ch02/HelloWorldProducer.scala index f2e5e1d..d796769 100644 --- a/sylvilagus/scala/src/main/scala/com/meatballhat/sylvilagus/ch02/HelloWorldProducer.scala +++ b/sylvilagus/scala/src/main/scala/com/meatballhat/sylvilagus/ch02/HelloWorldProducer.scala @@ -10,7 +10,7 @@ object HelloWorldProducer extends App { var messageBody = args(0) var factory = new ConnectionFactory() - factory.setUri("amqp://guest:guest@localhost:5672") + factory.setUri(sys.env("SYLVILAGUS_AMQP_URI")) var connection = factory.newConnection() var channel = connection.createChannel()