From 4c78d5d148b794c8bdf5e9f4a3c07ca27fd38358 Mon Sep 17 00:00:00 2001 From: Dan Buch Date: Sat, 17 Nov 2012 08:16:21 -0500 Subject: [PATCH] Switching scala implementation to use env var for amqp uri --- .../com/meatballhat/sylvilagus/ch02/HelloWorldConsumer.scala | 2 +- .../com/meatballhat/sylvilagus/ch02/HelloWorldProducer.scala | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) 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()